Logo Search packages:      
Sourcecode: inkscape version File versions

void GrDragger::updateTip (  ) 

Updates the statusbar tip of the dragger knot, based on its draggables

Definition at line 659 of file gradient-drag.cpp.

References GrDraggable::fill_or_stroke, isA(), GrDraggable::item, GrDraggable::point_num, sp_item_description(), and SPKnot::tip.

Referenced by addDraggable().

      if (this->knot && this->knot->tip) {
            g_free (this->knot->tip);
            this->knot->tip = NULL;

    if (g_slist_length (this->draggables) == 1) {
        GrDraggable *draggable = (GrDraggable *) this->draggables->data;
        char *item_desc = sp_item_description(draggable->item);
        this->knot->tip = g_strdup_printf (_("%s for: %s%s; drag with <b>Ctrl</b> to snap angle, with <b>Ctrl+Alt</b> to preserve angle, with <b>Ctrl+Shift</b> to scale around center"),
                                           draggable->fill_or_stroke == false ? _(" (stroke)") : "");
    } else if (g_slist_length (draggables) == 2 && isA (POINT_RG_CENTER) && isA (POINT_RG_FOCUS)) {
        this->knot->tip = g_strdup_printf (_("Radial gradient <b>center</b> and <b>focus</b>; drag with <b>Shift</b> to separate focus"));
    } else {
        int length = g_slist_length (this->draggables);
        this->knot->tip = g_strdup_printf (ngettext("Gradient point shared by <b>%d</b> gradient; drag with <b>Shift</b> to separate",
                                                    "Gradient point shared by <b>%d</b> gradients; drag with <b>Shift</b> to separate",

Generated by  Doxygen 1.6.0   Back to index