diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2013-06-19 17:21:34 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2013-06-19 17:21:34 +0000 |
| commit | a3fb899bc1ae08cac5050791c9958437184b55e0 (patch) | |
| tree | 444647a2e316a13162f20041634fce7f4bf7f674 /src/extension/param/enum.cpp | |
| parent | changes_2013_05_22a.patch: (diff) | |
| parent | Fix my own mis-credit and some symbols labels (diff) | |
| download | inkscape-a3fb899bc1ae08cac5050791c9958437184b55e0.tar.gz inkscape-a3fb899bc1ae08cac5050791c9958437184b55e0.zip | |
merge from trunk (r12380)
(bzr r11668.1.72)
Diffstat (limited to 'src/extension/param/enum.cpp')
| -rw-r--r-- | src/extension/param/enum.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp index 18a73beb6..bb50c06e1 100644 --- a/src/extension/param/enum.cpp +++ b/src/extension/param/enum.cpp @@ -18,6 +18,10 @@ # include "config.h" #endif +#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H +#include <glibmm/threads.h> +#endif + #include <gtkmm/box.h> #include <gtkmm/comboboxtext.h> #include <glibmm/i18n.h> @@ -173,6 +177,24 @@ const gchar *ParamComboBox::set(const gchar * in, SPDocument * /*doc*/, Inkscape return _value; } +/** + * function to test if \c guitext is selectable + */ +bool ParamComboBox::contains(const gchar * guitext, SPDocument const * /*doc*/, Inkscape::XML::Node const * /*node*/) const +{ + if (guitext == NULL) { + return false; /* Can't have NULL string */ + } + + for (GSList * list = choices; list != NULL; list = g_slist_next(list)) { + enumentry * entr = reinterpret_cast<enumentry *>(list->data); + if ( !entr->guitext.compare(guitext) ) + return true; + } + // if we did not find the guitext in this ParamComboBox: + return false; +} + void ParamComboBox::changed (void) { |
