From fae67e1661842bd514929aa41ce21528ae56c571 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Wed, 17 Mar 2010 18:21:55 -0700 Subject: Changed the embed/link dialog to use radio buttons instead of a checkbox to make the link/embed effect clearer. (bzr r9202) --- src/ui/clipboard.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ui/clipboard.cpp') 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 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; -- cgit v1.2.3