From b1e6cb19b4711644ec5ff6f502c53f44b146704f Mon Sep 17 00:00:00 2001 From: buliabyak Date: Tue, 3 Oct 2006 06:22:53 +0000 Subject: [PATCH] rename drag to wiggle with value inversion; edit tooltips --- src/dyna-draw-context.cpp | 8 ++++---- src/widgets/toolbox.cpp | 30 +++++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index 5b6b75fa5..e4fac3293 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -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); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index d4282bd66..a4c550418 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -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); } -- 2.30.2