Code

Add missing selection cue option to preferences for tweak, calligraphy, and paint...
authorcilix42 <cilix42@users.sourceforge.net>
Fri, 11 Jan 2008 13:22:46 +0000 (13:22 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Fri, 11 Jan 2008 13:22:46 +0000 (13:22 +0000)
src/dyna-draw-context.cpp
src/flood-context.cpp
src/tweak-context.cpp
src/ui/dialog/inkscape-preferences.cpp
src/ui/dialog/inkscape-preferences.h

index 849e97c972c2fab9ea9b3cb16b5cdbd5a3843319..7a229883ec175937959e676b76ada827efeb0ac0 100644 (file)
@@ -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
index 5838c2b59c06cb102c02407ccd8452264d734c08..7dc832843cf02a16f5a8cacb0274fbcb76ea64ec 100644 (file)
@@ -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
index 85831a648f77f8728cf3ae7a6ce40ad3438dcd56..09e13f1fc21a7e37f954690160c246d6c8c25f79 100644 (file)
@@ -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
index eec1f6d44a3ba73cb27de88784667e8eccdaf2b3..e88ba74b1884e162cbf9695d02338048feac9263 100644 (file)
@@ -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);
index 4b62f3947d9edf53cfcf24184cfd4a3e728690f2..b0c47a8f0826bbafbbe4af8a3268ac28d598fadc 100644 (file)
@@ -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;