summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/gdkpixbuf-input.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-03-18 01:21:55 +0000
committerJon A. Cruz <jon@joncruz.org>2010-03-18 01:21:55 +0000
commitfae67e1661842bd514929aa41ce21528ae56c571 (patch)
tree5244778438528c6d367937602fec42f3a3d5074e /src/extension/internal/gdkpixbuf-input.cpp
parentAdded wrappers for the "optiongroup" type that correspond to existing "float"... (diff)
downloadinkscape-fae67e1661842bd514929aa41ce21528ae56c571.tar.gz
inkscape-fae67e1661842bd514929aa41ce21528ae56c571.zip
Changed the embed/link dialog to use radio buttons instead of a checkbox to make the link/embed effect clearer.
(bzr r9202)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index 3f78b3f36..a1295406c 100644
--- a/src/extension/internal/gdkpixbuf-input.cpp
+++ b/src/extension/internal/gdkpixbuf-input.cpp
@@ -30,7 +30,8 @@ static std::set<Glib::ustring> create_lossy_set()
SPDocument *
GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
{
- bool embed = !mod->get_param_bool("link");
+ bool embed = (strcmp(mod->get_param_optiongroup("link"), "embed") == 0);
+
SPDocument *doc = NULL;
GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL );
static std::set<Glib::ustring> lossy = create_lossy_set();
@@ -147,9 +148,11 @@ GdkpixbufInput::init(void)
"<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
"<name>" N_("%s GDK pixbuf Input") "</name>\n"
"<id>org.inkscape.input.gdkpixbuf.%s</id>\n"
- "<param name=\"link\" gui-text=\""
- N_("Link to image? (Leave unchecked to embed)")
- "\" type=\"boolean\">false</param>"
+ "<param name='link' type='optiongroup' appearance='full' _gui-text='" N_("Link or embed image:") "' >\n"
+ "<_option value='embed'>" N_("embed") "</_option>\n"
+ "<_option value='link'>" N_("link") "</_option>\n"
+ "</param>\n"
+ "<_param name='help' type='description'>" N_("Embed results in stand-alone, larger SVG files. Link references a file outside this SVG document and all files must be moved together.") "</_param>\n"
"<input>\n"
"<extension>.%s</extension>\n"
"<mimetype>%s</mimetype>\n"