From 4cec6d0c7d401ed0616e91a923a7ec4caf806f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20dos=20Santos=20Oliveira?= Date: Wed, 5 Jun 2013 16:03:06 -0300 Subject: Add command line option to specify PDF export version. Patch from schwieni. From the patch's author: Additional command line option added to export to different PDF-versions supported by cairo (currently only "PDF 1.4" and "PDF 1.5"). The user must provide the exact string found in the PDF-export dialog of Inkscape. This feature was previously only accessible via the GUI of Inkscape. This option is useful for people opting for PDF-a conformance in their PDFs. Moreover, the Extension and Parameter classes are extended by setters for enum parameters (used in combo boxes). (bzr r12348) --- src/extension/param/enum.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/extension/param/enum.cpp') 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(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) { -- cgit v1.2.3