summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.cpp
diff options
context:
space:
mode:
authorDenis Declara <declara91@gmail.com>2012-03-20 10:09:49 +0000
committerDenis Declara <declara91@gmail.com>2012-03-20 10:09:49 +0000
commit1cd9c8450500b945614a12a762e06c057ee85bbe (patch)
tree9973553a223ef7d6c5f9d18c35766fb3e7296e57 /src/ui/clipboard.cpp
parentFix deprecated Gtk::Widget flags (diff)
parentdesktop cutting plotter dxf output. ignore orphaned clones (Bug 957086) (diff)
downloadinkscape-1cd9c8450500b945614a12a762e06c057ee85bbe.tar.gz
inkscape-1cd9c8450500b945614a12a762e06c057ee85bbe.zip
Merged with trunk
(bzr r11073.1.1)
Diffstat (limited to 'src/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index e32f59fa3..b9d6e0c6b 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -82,6 +82,7 @@
#include "sp-namedview.h"
#include "snap.h"
#include "persp3d.h"
+#include "preferences.h"
/// Made up mimetype to represent Gdk::Pixbuf clipboard contents.
#define CLIPBOARD_GDK_PIXBUF_TARGET "image/x-gdk-pixbuf"
@@ -926,16 +927,16 @@ bool ClipboardManagerImpl::_pasteImage(SPDocument *doc)
++i;
}
Inkscape::Extension::Extension *png = *i;
- bool save = (strcmp(png->get_param_optiongroup("link"), "embed") == 0);
- png->set_param_optiongroup("link", "embed");
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring attr = prefs->getString("/dialogs/import/link");
+ prefs->setString("/dialogs/import/link", "embed");
png->set_gui(false);
gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-clipboard-import", NULL );
img->save(filename, "png");
file_import(doc, filename, png);
g_free(filename);
-
- png->set_param_optiongroup("link", save ? "embed" : "link");
+ prefs->setString("/dialogs/import/link", attr);
png->set_gui(true);
return true;