summaryrefslogtreecommitdiffstats
path: root/src/extension/param/enum.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-07-04 15:27:06 +0000
committerJaviertxo <jtx@jtx.marker.es>2013-07-04 15:27:06 +0000
commitb8ef835cd10460cf7548bae4970b395e9d7767d9 (patch)
tree12e14b42023385cf8bf8192c2ae482a4f59deff1 /src/extension/param/enum.cpp
parentIm not sure what changes are (diff)
parentShape calculations. do not quantize the coordinates. (Bug 168158) (diff)
downloadinkscape-b8ef835cd10460cf7548bae4970b395e9d7767d9.tar.gz
inkscape-b8ef835cd10460cf7548bae4970b395e9d7767d9.zip
Upadate to trunk
(bzr r11950.1.122)
Diffstat (limited to 'src/extension/param/enum.cpp')
-rw-r--r--src/extension/param/enum.cpp22
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) {