Code

rename drag to wiggle with value inversion; edit tooltips
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 3 Oct 2006 06:22:53 +0000 (06:22 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 3 Oct 2006 06:22:53 +0000 (06:22 +0000)
src/dyna-draw-context.cpp
src/widgets/toolbox.cpp

index 5b6b75fa541a14cc27b9ad3d8ab10b227f2e8457..e4fac3293d38f724dca4c9bb35dc98b18ce79871 100644 (file)
@@ -222,7 +222,7 @@ sp_dyna_draw_context_setup(SPEventContext *ec)
     g_signal_connect(G_OBJECT(ddc->currentshape), "event", G_CALLBACK(sp_desktop_root_handler), ec->desktop);
 
     sp_event_context_read(ec, "mass");
-    sp_event_context_read(ec, "drag");
+    sp_event_context_read(ec, "wiggle");
     sp_event_context_read(ec, "angle");
     sp_event_context_read(ec, "width");
     sp_event_context_read(ec, "thinning");
@@ -247,9 +247,9 @@ sp_dyna_draw_context_set(SPEventContext *ec, gchar const *key, gchar const *val)
     if (!strcmp(key, "mass")) {
         double const dval = ( val ? g_ascii_strtod (val, NULL) : 0.2 );
         ddc->mass = CLAMP(dval, -1000.0, 1000.0);
-    } else if (!strcmp(key, "drag")) {
-        double const dval = ( val ? g_ascii_strtod (val, NULL) : DRAG_DEFAULT );
-        ddc->drag = CLAMP(dval, DRAG_MIN, DRAG_MAX);
+    } else if (!strcmp(key, "wiggle")) {
+        double const dval = ( val ? g_ascii_strtod (val, NULL) : (1 - DRAG_DEFAULT));
+        ddc->drag = CLAMP((1 - dval), DRAG_MIN, DRAG_MAX); // drag is inverse to wiggle
     } else if (!strcmp(key, "angle")) {
         double const dval = ( val ? g_ascii_strtod (val, NULL) : 0.0);
         ddc->angle = CLAMP (dval, -90, 90);
index d4282bd663ac3afb529f79e09374938b9b348f13..a4c5504186563b4817c78b1b2520fd59d6b7962d 100644 (file)
@@ -1943,9 +1943,9 @@ sp_ddc_mass_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
 }
 
 static void
-sp_ddc_drag_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
+sp_ddc_wiggle_value_changed(GtkAdjustment *adj, GtkWidget *tbl)
 {
-    prefs_set_double_attribute("tools.calligraphic", "drag", adj->value);
+    prefs_set_double_attribute("tools.calligraphic", "wiggle", adj->value);
     spinbutton_defocus(GTK_OBJECT(tbl));
 }
 
@@ -2013,7 +2013,7 @@ static void sp_ddc_defaults(GtkWidget *, GtkWidget *tbl)
         double value;
     } const key_values[] = {
         {"mass", 0.02},
-        {"drag", 1.0},
+        {"wiggle", 0.0},
         {"angle", 30.0},
         {"width", 15},
         {"thinning", 0.1},
@@ -2079,7 +2079,7 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop)
 
     /* Fixation */
     {
-        GtkWidget *hb = sp_tb_spinbutton(_("Fixation:"), _("How fixed is the pen angle (0 = always perpendicular to stroke direction, 1 = fixed)"),
+        GtkWidget *hb = sp_tb_spinbutton(_("Fixation:"), _("Angle behavior (0 = nib always perpendicular to stroke direction, 1 = fixed angle)"),
                                          "tools.calligraphic", "flatness", 0.9,
                                          NULL, tbl, FALSE, NULL,
                                          0.0, 1.0, 0.01, 0.1,
@@ -2090,7 +2090,7 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop)
     /* Cap Rounding */
     {
         // TRANSLATORS: "cap" means "end" (both start and finish) here
-        GtkWidget *hb = sp_tb_spinbutton(_("Round:"), _("How much the ends of a stroke are rounded"),
+        GtkWidget *hb = sp_tb_spinbutton(_("Round:"), _("Increase to round the ends of strokes"),
                                          "tools.calligraphic", "cap_rounding", 0.0,
                                          NULL, tbl, FALSE, NULL,
                                          0.0, 1.0, 0.01, 0.1,
@@ -2103,7 +2103,7 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop)
 
     /* Tremor */
     {
-        GtkWidget *hb = sp_tb_spinbutton(_("Tremor:"), _("How uneven or trembling is the pen stroke"),
+        GtkWidget *hb = sp_tb_spinbutton(_("Tremor:"), _("Increase to make strokes rugged and trembling"),
                                          "tools.calligraphic", "tremor", 0.0,
                                          NULL, tbl, FALSE, NULL,
                                          0.0, 1.0, 0.01, 0.1,
@@ -2111,24 +2111,24 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop)
         gtk_box_pack_start(GTK_BOX(tbl), hb, FALSE, FALSE, AUX_SPACING);
     }
 
-    /* Mass */
+    /* Wiggle */
     {
-        GtkWidget *hb = sp_tb_spinbutton(_("Mass:"), _("How much inertia affects the movement of the pen"),
-                                         "tools.calligraphic", "mass", 0.02,
+        GtkWidget *hb = sp_tb_spinbutton(_("Wiggle:"), _("Increase to make the pen waver and wiggle"),
+                                         "tools.calligraphic", "wiggle", 0.0,
                                          NULL, tbl, FALSE, NULL,
                                          0.0, 1.0, 0.01, 0.1,
-                                         sp_ddc_mass_value_changed, 0.01, 2);
+                                         sp_ddc_wiggle_value_changed, 0.01, 2);
         gtk_box_pack_start(GTK_BOX(tbl), hb, FALSE, FALSE, AUX_SPACING);
     }
 
-    /* Drag */
+
+    /* Mass */
     {
-        // TRANSLATORS: "drag" means "resistance" here
-        GtkWidget *hb = sp_tb_spinbutton(_("Drag:"), _("How much resistance affects the movement of the pen"),
-                                         "tools.calligraphic", "drag", 1,
+        GtkWidget *hb = sp_tb_spinbutton(_("Mass:"), _("Increase to make the pen drag behind, as if slowed by inertia"),
+                                         "tools.calligraphic", "mass", 0.02,
                                          NULL, tbl, FALSE, NULL,
                                          0.0, 1.0, 0.01, 0.1,
-                                         sp_ddc_drag_value_changed, 0.01, 2);
+                                         sp_ddc_mass_value_changed, 0.01, 2);
         gtk_box_pack_start(GTK_BOX(tbl), hb, FALSE, FALSE, AUX_SPACING);
     }