summaryrefslogtreecommitdiffstats
path: root/src/extension/param/enum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension/param/enum.cpp')
-rw-r--r--src/extension/param/enum.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index 292e677a7..9cdc05049 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -175,6 +175,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) {