From 9cb51a7211f2a0e0d7d264d179fe68825655f4f6 Mon Sep 17 00:00:00 2001 From: cilix42 Date: Tue, 22 Jul 2008 14:53:10 +0000 Subject: [PATCH] Separate shape settings for pen and pencil tool --- src/draw-context.cpp | 2 +- src/widgets/toolbox.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/draw-context.cpp b/src/draw-context.cpp index 6a9e63436..a87ca43b6 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -282,7 +282,7 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item) Effect::createAndApply(SPIRO, dc->desktop->doc(), item); } - int shape = prefs_get_int_attribute("tools.freehand", "shape", 0); + int shape = prefs_get_int_attribute(tool_name(dc), "shape", 0); bool shape_applied = false; SPCSSAttr *css_item = sp_css_attr_from_object (SP_OBJECT(item), SP_STYLE_FLAG_ALWAYS); const char *cstroke = sp_repr_css_property(css_item, "stroke", "none"); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 16e2f3f68..eb4528297 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -3328,9 +3328,9 @@ static void sp_add_spiro_toggle(GtkActionGroup* mainActions, GObject* holder, bo } } -static void sp_freehand_change_shape(EgeSelectOneAction* act, GObject */*dataKludge*/) { +static void sp_freehand_change_shape(EgeSelectOneAction* act, GObject *dataKludge) { gint shape = ege_select_one_action_get_active( act ); - prefs_set_int_attribute("tools.freehand", "shape", shape); + prefs_set_int_attribute(freehand_tool_name(dataKludge), "shape", shape); } /** @@ -3366,10 +3366,10 @@ sp_freehand_add_advanced_shape_options(GtkActionGroup* mainActions, GObject* hol items = 0; EgeSelectOneAction* act1 = ege_select_one_action_new( tool_is_pencil ? "SetPencilShapeAction" : "SetPenShapeAction", - _("Shape:"), (""), NULL, GTK_TREE_MODEL(model)); + _("Shape:"), ("Shape"), NULL, GTK_TREE_MODEL(model)); g_object_set( act1, "short_label", _("Shape:"), NULL ); ege_select_one_action_set_appearance( act1, "compact" ); - ege_select_one_action_set_active( act1, prefs_get_int_attribute("tools.freehand", "shape", 0) ); + ege_select_one_action_set_active( act1, prefs_get_int_attribute(freehand_tool_name(holder), "shape", 0) ); g_signal_connect( G_OBJECT(act1), "changed", G_CALLBACK(sp_freehand_change_shape), holder ); gtk_action_group_add_action( mainActions, GTK_ACTION(act1) ); g_object_set_data( holder, "shape_action", act1 ); -- 2.30.2