From 418e9e2ea620d6b61b6ca0c05aa5a0a9037fbfd7 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 26 Feb 2007 19:32:23 +0000 Subject: [PATCH] rename flood to paintbucket, copyedit --- share/icons/icons.svg | 2 +- share/keys/default.xml | 6 ++++++ share/keys/inkscape.xml | 6 ++++++ src/flood-context.cpp | 8 ++++---- src/preferences-skeleton.h | 2 +- src/tools-switch.cpp | 8 ++++---- src/tools-switch.h | 2 +- src/ui/dialog/inkscape-preferences.cpp | 6 +++--- src/ui/dialog/inkscape-preferences.h | 4 ++-- src/verbs.cpp | 20 ++++++++++---------- src/verbs.h | 4 ++-- src/widgets/toolbox.cpp | 16 ++++++++-------- 12 files changed, 48 insertions(+), 36 deletions(-) diff --git a/share/icons/icons.svg b/share/icons/icons.svg index 262d2ae03..2c91bb653 100644 --- a/share/icons/icons.svg +++ b/share/icons/icons.svg @@ -14945,7 +14945,7 @@ http://www.inkscape.org/ id="path5831" /> + + + + + + diff --git a/share/keys/inkscape.xml b/share/keys/inkscape.xml index 30473a873..39737a82a 100644 --- a/share/keys/inkscape.xml +++ b/share/keys/inkscape.xml @@ -140,6 +140,12 @@ override) the bindings in the main default.xml. + + + + + + diff --git a/src/flood-context.cpp b/src/flood-context.cpp index 46e7cbb91..f9b3c5ffc 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -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; } diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index bd10f1134..a715ac5e5 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -72,7 +72,7 @@ static char const preferences_skeleton[] = " \n" " \n" " \n" -" \n" +" \n" " \n" " \n" " \n" diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index c5b5bd5a4..1d92d74d1 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -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, _("Click and drag 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, _("Click to paint an unfilled area.")); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click to paint a bounded area.")); break; } } diff --git a/src/tools-switch.h b/src/tools-switch.h index 93aa9b3a9..252add758 100644 --- a/src/tools-switch.h +++ b/src/tools-switch.h @@ -30,7 +30,7 @@ enum { TOOLS_ZOOM, TOOLS_DROPPER, TOOLS_CONNECTOR, - TOOLS_FLOOD + TOOLS_PAINTBUCKET }; int tools_isactive(SPDesktop *dt, unsigned num); diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index c9e154201..16be12449 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -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() diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 96aea6e61..bf327bf0e 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -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; diff --git a/src/verbs.cpp b/src/verbs.cpp index 2dec64a2f..401390fba 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -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"), diff --git a/src/verbs.h b/src/verbs.h index c1cbb6fc7..4143c6fd7 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -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, diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index f31b5f38a..43ebb6b5d 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -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: -- 2.30.2