From: cilix42 Date: Fri, 11 Jan 2008 13:22:46 +0000 (+0000) Subject: Add missing selection cue option to preferences for tweak, calligraphy, and paint... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e6d243379ddfa3709bcbf794f60ae6498d9dbb0e;p=inkscape.git Add missing selection cue option to preferences for tweak, calligraphy, and paint bucket tools --- diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index 849e97c97..7a229883e 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -45,6 +45,7 @@ #include "desktop-affine.h" #include "desktop-style.h" #include "message-context.h" +#include "prefs-utils.h" #include "pixmaps/cursor-calligraphy.xpm" #include "libnr/n-art-bpath.h" #include "libnr/nr-path.h" @@ -294,6 +295,10 @@ sp_dyna_draw_context_setup(SPEventContext *ec) ddc->is_drawing = false; ddc->_message_context = new Inkscape::MessageContext((ec->desktop)->messageStack()); + + if (prefs_get_int_attribute("tools.calligraphic", "selcue", 0) != 0) { + ec->enableSelectionCue(); + } } static void diff --git a/src/flood-context.cpp b/src/flood-context.cpp index 5838c2b59..7dc832843 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -221,6 +221,10 @@ static void sp_flood_context_setup(SPEventContext *ec) ); rc->_message_context = new Inkscape::MessageContext((ec->desktop)->messageStack()); + + if (prefs_get_int_attribute("tools.paintbucket", "selcue", 0) != 0) { + rc->enableSelectionCue(); + } } inline static void diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index 85831a648..09e13f1fc 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -264,6 +264,14 @@ sp_tweak_context_setup(SPEventContext *ec) tc->style_set_connection = ec->desktop->connectSetStyle( // catch style-setting signal in this tool sigc::bind(sigc::ptr_fun(&sp_tweak_context_style_set), tc) ); + + if (prefs_get_int_attribute("tools.tweak", "selcue", 0) != 0) { + ec->enableSelectionCue(); + } + + if (prefs_get_int_attribute("tools.tweak", "gradientdrag", 0) != 0) { + ec->enableGrDrag(); + } } static void diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index eec1f6d44..e88ba74b1 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -358,6 +358,10 @@ void InkscapePreferences::initPageTools() this->AddPage(_page_node, _("Node"), iter_tools, PREFS_PAGE_TOOLS_NODE); AddSelcueCheckbox(_page_node, "tools.nodes", true); AddGradientCheckbox(_page_node, "tools.nodes", true); + //Tweak + this->AddPage(_page_tweak, _("Tweak"), iter_tools, PREFS_PAGE_TOOLS_NODE); + AddSelcueCheckbox(_page_tweak, "tools.tweak", true); + AddGradientCheckbox(_page_tweak, "tools.tweak", false); //Zoom this->AddPage(_page_zoom, _("Zoom"), iter_tools, PREFS_PAGE_TOOLS_ZOOM); AddSelcueCheckbox(_page_zoom, "tools.zoom", true); @@ -396,6 +400,7 @@ void InkscapePreferences::initPageTools() this->AddNewObjectsStyle(_page_pen, "tools.freehand.pen"); //Calligraphy this->AddPage(_page_calligraphy, _("Calligraphy"), iter_tools, PREFS_PAGE_TOOLS_CALLIGRAPHY); + this->AddSelcueCheckbox(_page_calligraphy, "tools.calligraphic", false); this->AddNewObjectsStyle(_page_calligraphy, "tools.calligraphic"); _page_calligraphy.add_line( false, "", _calligrapy_use_abs_size, "", _("If on, pen width is in absolute units (px) independent of zoom; otherwise pen width depends on zoom so that it looks the same at any zoom")); @@ -403,6 +408,7 @@ void InkscapePreferences::initPageTools() _("If on, each newly created object will be selected (deselecting previous selection)")); //Paint Bucket this->AddPage(_page_paintbucket, _("Paint Bucket"), iter_tools, PREFS_PAGE_TOOLS_PAINTBUCKET); + this->AddSelcueCheckbox(_page_paintbucket, "tools.paintbucket", false); this->AddNewObjectsStyle(_page_paintbucket, "tools.paintbucket"); //Text this->AddPage(_page_text, _("Text"), iter_tools, PREFS_PAGE_TOOLS_TEXT); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 4b62f3947..b0c47a8f0 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -106,7 +106,7 @@ protected: DialogPage _page_mouse, _page_scrolling, _page_steps, _page_tools, _page_windows, _page_clones, _page_mask, _page_transforms, _page_filters, _page_select, _page_importexport, _page_cms, _page_grids, _page_misc; - DialogPage _page_selector, _page_node, _page_zoom, _page_shapes, _page_pencil, _page_pen, + DialogPage _page_selector, _page_node, _page_tweak, _page_zoom, _page_shapes, _page_pencil, _page_pen, _page_calligraphy, _page_text, _page_gradient, _page_connector, _page_dropper; DialogPage _page_rectangle, _page_3dbox, _page_ellipse, _page_star, _page_spiral, _page_paintbucket;