diff options
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) { |
