diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2015-04-14 12:44:34 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2015-04-14 12:44:34 +0000 |
| commit | 0f8b775f3a02380dd593ae58ad3b989f58aec643 (patch) | |
| tree | a909c92a8e985a5889539d418c7bb0a0772020b1 /src/ui/tools/flood-tool.cpp | |
| parent | Fix for the bug 1443039. Now reset old perspective-envelope effects and preve... (diff) | |
| download | inkscape-0f8b775f3a02380dd593ae58ad3b989f58aec643.tar.gz inkscape-0f8b775f3a02380dd593ae58ad3b989f58aec643.zip | |
Replace GList by std::vector
(bzr r14057)
Diffstat (limited to 'src/ui/tools/flood-tool.cpp')
| -rw-r--r-- | src/ui/tools/flood-tool.cpp | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp index bb8782dfa..ffd41d97d 100644 --- a/src/ui/tools/flood-tool.cpp +++ b/src/ui/tools/flood-tool.cpp @@ -84,6 +84,28 @@ const std::string& FloodTool::getPrefsPath() { const std::string FloodTool::prefsPath = "/tools/paintbucket"; +// TODO: Replace by C++11 initialization +// Must match PaintBucketChannels enum +Glib::ustring ch_init[8] = { + _("Visible Colors"), + _("Red"), + _("Green"), + _("Blue"), + _("Hue"), + _("Saturation"), + _("Lightness"), + _("Alpha"), +}; +const std::vector<Glib::ustring> FloodTool::channel_list( ch_init, ch_init+8 ); + +Glib::ustring gap_init[4] = { + C_("Flood autogap", "None"), + C_("Flood autogap", "Small"), + C_("Flood autogap", "Medium"), + C_("Flood autogap", "Large") +}; +const std::vector<Glib::ustring> FloodTool::gap_list( gap_init, gap_init+4 ); + FloodTool::FloodTool() : ToolBase(cursor_paintbucket_xpm, 11, 30) , item(NULL) @@ -174,38 +196,6 @@ inline unsigned char * get_trace_pixel(guchar *trace_px, int x, int y, int width } /** - * Generate the list of trace channel selection entries. - */ -GList * flood_channels_dropdown_items_list() { - GList *glist = NULL; - - glist = g_list_append (glist, _("Visible Colors")); - glist = g_list_append (glist, _("Red")); - glist = g_list_append (glist, _("Green")); - glist = g_list_append (glist, _("Blue")); - glist = g_list_append (glist, _("Hue")); - glist = g_list_append (glist, _("Saturation")); - glist = g_list_append (glist, _("Lightness")); - glist = g_list_append (glist, _("Alpha")); - - return glist; -} - -/** - * Generate the list of autogap selection entries. - */ -GList * flood_autogap_dropdown_items_list() { - GList *glist = NULL; - - glist = g_list_append (glist, (void*) C_("Flood autogap", "None")); - glist = g_list_append (glist, (void*) C_("Flood autogap", "Small")); - glist = g_list_append (glist, (void*) C_("Flood autogap", "Medium")); - glist = g_list_append (glist, (void*) C_("Flood autogap", "Large")); - - return glist; -} - -/** * Compare a pixel in a pixel buffer with another pixel to determine if a point should be included in the fill operation. * @param check The pixel in the pixel buffer to check. * @param orig The original selected pixel to use as the fill target color. |
