summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.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/ui/clipboard.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/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index db509da2e..649f5408a 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -874,6 +874,7 @@ bool ClipboardManagerImpl::_pasteImage()
Glib::RefPtr<Gdk::Pixbuf> img = _clipboard->wait_for_image();
if (!img) return false;
+ // TODO unify with interface.cpp's sp_ui_drag_data_received()
// AARGH stupid
Inkscape::Extension::DB::InputList o;
Inkscape::Extension::db.get_input_list(o);
@@ -882,8 +883,8 @@ bool ClipboardManagerImpl::_pasteImage()
++i;
}
Inkscape::Extension::Extension *png = *i;
- bool save = png->get_param_bool("link");
- png->set_param_bool("link", false);
+ bool save = (strcmp(png->get_param_optiongroup("link"), "embed") == 0);
+ png->set_param_optiongroup("link", "embed");
png->set_gui(false);
gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-clipboard-import", NULL );
@@ -891,7 +892,7 @@ bool ClipboardManagerImpl::_pasteImage()
file_import(doc, filename, png);
g_free(filename);
- png->set_param_bool("link", save);
+ png->set_param_optiongroup("link", save ? "embed" : "link");
png->set_gui(true);
return true;