Code

rename flood to paintbucket, copyedit
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 26 Feb 2007 19:32:23 +0000 (19:32 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 26 Feb 2007 19:32:23 +0000 (19:32 +0000)
12 files changed:
share/icons/icons.svg
share/keys/default.xml
share/keys/inkscape.xml
src/flood-context.cpp
src/preferences-skeleton.h
src/tools-switch.cpp
src/tools-switch.h
src/ui/dialog/inkscape-preferences.cpp
src/ui/dialog/inkscape-preferences.h
src/verbs.cpp
src/verbs.h
src/widgets/toolbox.cpp

index 262d2ae03593f148a5bfd0701e0ecbeb222114ad..2c91bb65398ffd3de54c5f6dd1af13dc45cefb88 100644 (file)
@@ -14945,7 +14945,7 @@ http://www.inkscape.org/</dc:description>
        id="path5831" />
   </g>
   <g
-     id="draw_flood"
+     id="draw_paintbucket"
      transform="matrix(0.8333394,0,0,0.8333394,467.46488,369.87223)">
     <rect
        y="-53.571178"
index 30473a873bc9be9c058cfc65911babce995b4e99..39737a82aadc1c90ddb4836505a4451cdb01554e 100644 (file)
@@ -140,6 +140,12 @@ override) the bindings in the main default.xml.
 
   <bind action="CalligraphicPrefs" />
 
+  <bind key="F7" modifiers="Shift" action="ToolPaintBucket" display="true"/>
+  <bind key="u" action="ToolPaintBucket" />
+  <bind key="U" action="ToolPaintBucket" />
+
+  <bind action="PaintBucketPrefs" />
+
   <bind key="F8" action="ToolText" display="true"/>
   <bind key="t" action="ToolText" />
   <bind key="T" action="ToolText" />
index 30473a873bc9be9c058cfc65911babce995b4e99..39737a82aadc1c90ddb4836505a4451cdb01554e 100644 (file)
@@ -140,6 +140,12 @@ override) the bindings in the main default.xml.
 
   <bind action="CalligraphicPrefs" />
 
+  <bind key="F7" modifiers="Shift" action="ToolPaintBucket" display="true"/>
+  <bind key="u" action="ToolPaintBucket" />
+  <bind key="U" action="ToolPaintBucket" />
+
+  <bind action="PaintBucketPrefs" />
+
   <bind key="F8" action="ToolText" display="true"/>
   <bind key="t" action="ToolText" />
   <bind key="T" action="ToolText" />
index 46e7cbb91fae81a90442019c7c9ce88514639a21..f9b3c5ffc84b71c0fd51743300ce0dbc6a2f1c99 100644 (file)
@@ -298,7 +298,7 @@ static void do_trace(GdkPixbuf *px, SPDesktop *desktop, NR::Matrix transform) {
 
         Inkscape::XML::Node *pathRepr = xml_doc->createElement("svg:path");
         /* Set style */
-        sp_desktop_apply_style_tool (desktop, pathRepr, "tools.flood", false);
+        sp_desktop_apply_style_tool (desktop, pathRepr, "tools.paintbucket", false);
 
         NArtBpath *bpath = sp_svg_read_path(result.getPathData().c_str());
         Path *path = bpath_to_Path(bpath);
@@ -504,7 +504,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even
 
     g_free(trace_px);
     
-    sp_document_done(document, SP_VERB_CONTEXT_FLOOD, _("Flood fill"));
+    sp_document_done(document, SP_VERB_CONTEXT_PAINTBUCKET, _("Fill bounded area"));
 }
 
 static gint sp_flood_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEvent *event)
@@ -583,8 +583,8 @@ static void sp_flood_finish(SPFloodContext *rc)
         sp_canvas_end_forced_full_redraws(desktop->canvas);
 
         sp_desktop_selection(desktop)->set(rc->item);
-        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_RECT,
-                         _("Create floodangle"));
+        sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_PAINTBUCKET,
+                         _("Fill bounded area"));
 
         rc->item = NULL;
     }
index bd10f1134030dbbb9be1425231063447c38635fb..a715ac5e5c36a91875cb885e9709716a9aa9194f 100644 (file)
@@ -72,7 +72,7 @@ static char const preferences_skeleton[] =
 "    <eventcontext id=\"dropper\" selcue=\"1\" gradientdrag=\"1\" pick=\"1\" setalpha=\"1\"/>\n"
 "    <eventcontext id=\"select\" selcue=\"1\" gradientdrag=\"0\"/>\n"
 "    <eventcontext id=\"connector\" style=\"fill:none;fill-rule:evenodd;stroke:black;stroke-opacity:1;stroke-linejoin:miter;stroke-width:1px;stroke-linecap:butt;\" selcue=\"1\"/>\n"
-"    <eventcontext id=\"flood\" style=\"fill:#808080;\" usecurrent=\"1\"/>\n"
+"    <eventcontext id=\"paintbucket\" style=\"fill:#808080;\" usecurrent=\"1\"/>\n"
 "  </group>\n"
 "  <group id=\"palette\">\n"
 "    <group id=\"dashes\">\n"
index c5b5bd5a4e7d334148ff66543e6c57d9088bd760..1d92d74d13e2e9f27ffe74010b1382e11a2cff50 100644 (file)
@@ -65,7 +65,7 @@ static char const *const tool_names[] = {
     "tools.zoom",
     "tools.dropper",
     "tools.connector",
-    "tools.flood",
+    "tools.paintbucket",
     NULL
 };
 
@@ -85,7 +85,7 @@ static char const *const tool_ids[] = {
     "zoom",
     "dropper",
     "connector",
-    "flood",
+    "paintbucket",
     NULL
 };
 
@@ -209,11 +209,11 @@ tools_switch(SPDesktop *dt, int num)
             inkscape_eventcontext_set(sp_desktop_event_context(dt));
             dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Click and drag</b> between shapes to create a connector."));
             break;
-        case TOOLS_FLOOD:
+        case TOOLS_PAINTBUCKET:
             dt->set_event_context(SP_TYPE_FLOOD_CONTEXT, tool_names[num]);
             dt->activate_guides(false);
             inkscape_eventcontext_set(sp_desktop_event_context(dt));
-            dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Click</b> to paint an unfilled area."));
+            dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Click</b> to paint a bounded area."));
             break;
     }
 }
index 93aa9b3a965208ca0f9c7a7447bb8d58cdfa00ad..252add75855c932a9b8a3c0971fc0153241451ed 100644 (file)
@@ -30,7 +30,7 @@ enum {
   TOOLS_ZOOM,
   TOOLS_DROPPER,
   TOOLS_CONNECTOR,
-  TOOLS_FLOOD 
+  TOOLS_PAINTBUCKET 
 };
 
 int tools_isactive(SPDesktop *dt, unsigned num);
index c9e1542017074245108008dae9dbb6e4b1a9e33c..16be12449b8752582f89dea769ac9556f79c01e6 100644 (file)
@@ -380,6 +380,9 @@ void InkscapePreferences::initPageTools()
                             _("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"));
     _page_calligraphy.add_line( false, "", _calligrapy_keep_selected, "", 
                             _("If on, each object created with this tool will remain selected after you finish drawing it"));
+    //Paint Bucket
+    this->AddPage(_page_paintbucket, _("Paint Bucket"), iter_tools, PREFS_PAGE_TOOLS_PAINTBUCKET);
+    this->AddNewObjectsStyle(_page_paintbucket, "tools.paintbucket");
     //Text
     this->AddPage(_page_text, _("Text"), iter_tools, PREFS_PAGE_TOOLS_TEXT);
     this->AddSelcueCheckbox(_page_text, "tools.text", true);
@@ -397,9 +400,6 @@ void InkscapePreferences::initPageTools()
     this->AddPage(_page_dropper, _("Dropper"), iter_tools, PREFS_PAGE_TOOLS_DROPPER);
     this->AddSelcueCheckbox(_page_dropper, "tools.dropper", true);
     this->AddGradientCheckbox(_page_dropper, "tools.dropper", true);
-    //Flood
-    this->AddPage(_page_flood, _("Flood Fill"), iter_tools, PREFS_PAGE_TOOLS_FLOOD);
-    this->AddNewObjectsStyle(_page_flood, "tools.flood");
 }
 
 void InkscapePreferences::initPageWindows()
index 96aea6e61d84fa3750e633cfc79df9291eb55709..bf327bf0e801333f5842e1202051695e957c22db 100644 (file)
@@ -48,11 +48,11 @@ enum {
     PREFS_PAGE_TOOLS_PENCIL,
     PREFS_PAGE_TOOLS_PEN,
     PREFS_PAGE_TOOLS_CALLIGRAPHY,
+    PREFS_PAGE_TOOLS_PAINTBUCKET,
     PREFS_PAGE_TOOLS_TEXT,
     PREFS_PAGE_TOOLS_GRADIENT,
     PREFS_PAGE_TOOLS_CONNECTOR,
     PREFS_PAGE_TOOLS_DROPPER,
-    PREFS_PAGE_TOOLS_FLOOD,
     PREFS_PAGE_WINDOWS,
     PREFS_PAGE_CLONES,
     PREFS_PAGE_FILTERS,
@@ -99,7 +99,7 @@ protected:
                _page_clones, _page_transforms, _page_filters, _page_select, _page_misc;
     DialogPage _page_selector, _page_node, _page_zoom, _page_shapes, _page_pencil, _page_pen,
                _page_calligraphy, _page_text, _page_gradient, _page_connector, _page_dropper;
-    DialogPage _page_rectangle, _page_ellipse, _page_star, _page_spiral, _page_flood;
+    DialogPage _page_rectangle, _page_ellipse, _page_star, _page_spiral, _page_paintbucket;
 
     PrefSpinButton _mouse_sens, _mouse_thres;
 
index 2dec64a2f5b498fc7065bf13fa9c2fbd4df29706..401390fba04f8b9ab80679037a1267b9d1a4cb77 100644 (file)
@@ -1335,7 +1335,7 @@ ContextVerb::perform(SPAction *action, void *data, void *pdata)
     /** \todo !!! hopefully this can go away soon and actions can look after
      * themselves
      */
-    for (vidx = SP_VERB_CONTEXT_SELECT; vidx <= SP_VERB_CONTEXT_FLOOD_PREFS; vidx++)
+    for (vidx = SP_VERB_CONTEXT_SELECT; vidx <= SP_VERB_CONTEXT_PAINTBUCKET_PREFS; vidx++)
     {
         SPAction *tool_action= get((sp_verb_t)vidx)->get_action(dt);
         if (tool_action) {
@@ -1386,8 +1386,8 @@ ContextVerb::perform(SPAction *action, void *data, void *pdata)
         case SP_VERB_CONTEXT_CONNECTOR:
             tools_switch_current (TOOLS_CONNECTOR);
             break;
-        case SP_VERB_CONTEXT_FLOOD:
-            tools_switch_current(TOOLS_FLOOD);
+        case SP_VERB_CONTEXT_PAINTBUCKET:
+            tools_switch_current(TOOLS_PAINTBUCKET);
             break;
 
         case SP_VERB_CONTEXT_SELECT_PREFS:
@@ -1446,8 +1446,8 @@ ContextVerb::perform(SPAction *action, void *data, void *pdata)
             prefs_set_int_attribute ("dialogs.preferences", "page", PREFS_PAGE_TOOLS_CONNECTOR);
             dt->_dlg_mgr->showDialog("InkscapePreferences");
             break;
-        case SP_VERB_CONTEXT_FLOOD_PREFS:
-            prefs_set_int_attribute ("dialogs.preferences", "page", PREFS_PAGE_TOOLS_FLOOD);
+        case SP_VERB_CONTEXT_PAINTBUCKET_PREFS:
+            prefs_set_int_attribute ("dialogs.preferences", "page", PREFS_PAGE_TOOLS_PAINTBUCKET);
             dt->_dlg_mgr->showDialog("InkscapePreferences");
             break;
 
@@ -2230,11 +2230,11 @@ Verb *Verb::_base_verbs[] = {
     new ContextVerb(SP_VERB_CONTEXT_ZOOM, "ToolZoom", N_("Zoom"),
                     N_("Zoom in or out"), "draw_zoom"),
     new ContextVerb(SP_VERB_CONTEXT_DROPPER, "ToolDropper", N_("Dropper"),
-                    N_("Pick averaged colors from image"), "draw_dropper"),
+                    N_("Pick colors from image"), "draw_dropper"),
     new ContextVerb(SP_VERB_CONTEXT_CONNECTOR, "ToolConnector", N_("Connector"),
                     N_("Create connectors"), "draw_connector"),
-    new ContextVerb(SP_VERB_CONTEXT_FLOOD, "ToolFlood", N_("Flood Fill"),
-                    N_("Fill open areas"), "draw_flood"),
+    new ContextVerb(SP_VERB_CONTEXT_PAINTBUCKET, "ToolPaintBucket", N_("Paint Bucket"),
+                    N_("Fill bounded areas"), "draw_paintbucket"),
 
     /* Tool prefs */
     new ContextVerb(SP_VERB_CONTEXT_SELECT_PREFS, "SelectPrefs", N_("Selector Preferences"),
@@ -2265,8 +2265,8 @@ Verb *Verb::_base_verbs[] = {
                     N_("Open Preferences for the Dropper tool"), NULL),
     new ContextVerb(SP_VERB_CONTEXT_CONNECTOR_PREFS, "ConnectorPrefs", N_("Connector Preferences"),
                     N_("Open Preferences for the Connector tool"), NULL),
-    new ContextVerb(SP_VERB_CONTEXT_FLOOD_PREFS, "FloodPrefs", N_("Flood Fill Preferences"),
-                    N_("Open Preferences for the Flood Fill tool"), NULL),
+    new ContextVerb(SP_VERB_CONTEXT_PAINTBUCKET_PREFS, "PaintBucketPrefs", N_("Paint Bucket Preferences"),
+                    N_("Open Preferences for the Paint Bucket tool"), NULL),
 
     /* Zoom/View */
     new ZoomVerb(SP_VERB_ZOOM_IN, "ZoomIn", N_("Zoom In"), N_("Zoom in"), "zoom_in"),
index c1cbb6fc7079033da94bc85e306e2624521297f4..4143c6fd722ee29f294049c4e5742e0c7bce42a6 100644 (file)
@@ -147,7 +147,7 @@ enum {
     SP_VERB_CONTEXT_ZOOM,
     SP_VERB_CONTEXT_DROPPER,
     SP_VERB_CONTEXT_CONNECTOR,
-    SP_VERB_CONTEXT_FLOOD,
+    SP_VERB_CONTEXT_PAINTBUCKET,
     /* Tool preferences */
     SP_VERB_CONTEXT_SELECT_PREFS,
     SP_VERB_CONTEXT_NODE_PREFS,
@@ -163,7 +163,7 @@ enum {
     SP_VERB_CONTEXT_ZOOM_PREFS,
     SP_VERB_CONTEXT_DROPPER_PREFS,
     SP_VERB_CONTEXT_CONNECTOR_PREFS,
-    SP_VERB_CONTEXT_FLOOD_PREFS,
+    SP_VERB_CONTEXT_PAINTBUCKET_PREFS,
     /* Zooming and desktop settings */
     SP_VERB_ZOOM_IN,
     SP_VERB_ZOOM_OUT,
index f31b5f38a0260f64dd1fb164a32b5cd0a9f6e10c..43ebb6b5d7acab1f23a82d26b877b6462ac547f5 100644 (file)
@@ -101,7 +101,7 @@ static GtkWidget *sp_calligraphy_toolbox_new(SPDesktop *desktop);
 static GtkWidget *sp_dropper_toolbox_new(SPDesktop *desktop);
 static GtkWidget *sp_empty_toolbox_new(SPDesktop *desktop);
 static GtkWidget *sp_connector_toolbox_new(SPDesktop *desktop);
-static GtkWidget *sp_flood_toolbox_new(SPDesktop *desktop);
+static GtkWidget *sp_paintbucket_toolbox_new(SPDesktop *desktop);
 
 namespace { GtkWidget *sp_text_toolbox_new (SPDesktop *desktop); }
 
@@ -122,7 +122,7 @@ static struct {
     { "SPPencilContext",   "pencil_tool",    SP_VERB_CONTEXT_PENCIL, SP_VERB_CONTEXT_PENCIL_PREFS },
     { "SPPenContext",      "pen_tool",       SP_VERB_CONTEXT_PEN, SP_VERB_CONTEXT_PEN_PREFS },
     { "SPDynaDrawContext", "dyna_draw_tool", SP_VERB_CONTEXT_CALLIGRAPHIC, SP_VERB_CONTEXT_CALLIGRAPHIC_PREFS },
-    { "SPFloodContext",    "flood_tool",     SP_VERB_CONTEXT_FLOOD, SP_VERB_CONTEXT_FLOOD_PREFS },
+    { "SPFloodContext",    "paintbucket_tool",     SP_VERB_CONTEXT_PAINTBUCKET, SP_VERB_CONTEXT_PAINTBUCKET_PREFS },
     { "SPTextContext",     "text_tool",      SP_VERB_CONTEXT_TEXT, SP_VERB_CONTEXT_TEXT_PREFS },
     { "SPConnectorContext","connector_tool", SP_VERB_CONTEXT_CONNECTOR, SP_VERB_CONTEXT_CONNECTOR_PREFS },
     { "SPGradientContext", "gradient_tool",  SP_VERB_CONTEXT_GRADIENT, SP_VERB_CONTEXT_GRADIENT_PREFS },
@@ -149,7 +149,7 @@ static struct {
     { "SPDropperContext", "dropper_toolbox", sp_dropper_toolbox_new },
     { "SPGradientContext", "gradient_toolbox", sp_gradient_toolbox_new },
     { "SPConnectorContext", "connector_toolbox", sp_connector_toolbox_new },
-    { "SPFloodContext",  "flood_toolbox",  sp_flood_toolbox_new },
+    { "SPFloodContext",  "paintbucket_toolbox",  sp_paintbucket_toolbox_new },
     { NULL, NULL, NULL }
 };
 
@@ -4433,21 +4433,21 @@ sp_connector_toolbox_new(SPDesktop *desktop)
 } // end of sp_connector_toolbox_new()
 
 static GtkWidget *
-sp_flood_toolbox_new(SPDesktop *desktop)
+sp_paintbucket_toolbox_new(SPDesktop *desktop)
 {
     GtkWidget *tbl = gtk_hbox_new(FALSE, 0);
     
-    Inkscape::UI::Widget::StyleSwatch *swatch = new Inkscape::UI::Widget::StyleSwatch(NULL, _("Style of new rectangles"));
+    Inkscape::UI::Widget::StyleSwatch *swatch = new Inkscape::UI::Widget::StyleSwatch(NULL, _("Style of Paint Bucket fill objects"));
     swatch->setDesktop (desktop);
-    swatch->setClickVerb (SP_VERB_CONTEXT_RECT_PREFS);
-    swatch->setWatchedTool ("tools.shapes.rect", true);
+    swatch->setClickVerb (SP_VERB_CONTEXT_PAINTBUCKET_PREFS);
+    swatch->setWatchedTool ("tools.paintbucket", true);
     GtkWidget *swatch_ = GTK_WIDGET(swatch->gobj());
     gtk_box_pack_end(GTK_BOX(tbl), swatch_, FALSE, FALSE, 0);
 
     gtk_widget_show_all(tbl);
     sp_set_font_size_smaller (tbl);
     return tbl;
-} // end of sp_flood_toolbox_new()
+} 
 
 /*
   Local Variables: