Code

excise never-used code and stale comments
[inkscape.git] / src / gradient-drag.cpp
index 7e23b5750ec2e98e995733fc9ee3727ac9e7fd9e..1e8626602ace28033c1ce49aa26dc218c915696b 100644 (file)
@@ -656,8 +656,11 @@ GrDragger::updateTip ()
     } 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 {
-        this->knot->tip = g_strdup_printf (_("Gradient point shared by <b>%d</b> gradients; drag with <b>Shift</b> to separate"),
-                                           g_slist_length (this->draggables));
+        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",
+                                                    length),
+                                           length);
     }
 }
 
@@ -758,12 +761,10 @@ GrDragger::GrDragger (GrDrag *parent, NR::Point p, GrDraggable *draggable)
 
     // create the knot
     this->knot = sp_knot_new (parent->desktop, NULL);
-    g_object_set (G_OBJECT (this->knot->item), "mode", SP_KNOT_MODE_XOR, NULL);
-    this->knot->fill [SP_KNOT_STATE_NORMAL] = GR_KNOT_COLOR_NORMAL;
-    this->knot->stroke [SP_KNOT_STATE_NORMAL] = 0x000000ff;
-    this->knot->stroke [SP_KNOT_STATE_DRAGGING] = 0x000000ff;
-    this->knot->stroke [SP_KNOT_STATE_MOUSEOVER] = 0x000000ff;
-    g_object_set (G_OBJECT (this->knot->item), "stroke_color", 0x000000ff, NULL);
+    this->knot->setMode(SP_KNOT_MODE_XOR);
+    this->knot->setFill(GR_KNOT_COLOR_NORMAL, GR_KNOT_COLOR_NORMAL, GR_KNOT_COLOR_NORMAL);
+    this->knot->setStroke(0x000000ff, 0x000000ff, 0x000000ff);
+    sp_knot_update_ctrl(this->knot);
 
     // move knot to the given point
     sp_knot_set_position (this->knot, &p, SP_KNOT_STATE_NORMAL);