summaryrefslogtreecommitdiffstats
path: root/src/ui/interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/interface.cpp')
-rw-r--r--src/ui/interface.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index b19b10221..5edaab193 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -750,8 +750,6 @@ static void
sp_recent_open(GtkRecentChooser *recent_menu, gpointer /*user_data*/)
{
// dealing with the bizarre filename convention in Inkscape for now
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- prefs->setString("/options/openmethod/value", "open");
gchar *uri = gtk_recent_chooser_get_current_uri(GTK_RECENT_CHOOSER(recent_menu));
gchar *local_fn = g_filename_from_uri(uri, nullptr, nullptr);
gchar *utf8_fn = g_filename_to_utf8(local_fn, -1, nullptr, nullptr, nullptr);
@@ -759,7 +757,6 @@ sp_recent_open(GtkRecentChooser *recent_menu, gpointer /*user_data*/)
g_free(utf8_fn);
g_free(local_fn);
g_free(uri);
- prefs->setString("/options/openmethod/value", "done");
}
static void
@@ -1249,6 +1246,8 @@ sp_ui_drag_data_received(GtkWidget *widget,
case SVG_DATA:
case SVG_XML_DATA: {
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ prefs->setBool("/options/onimport", true);
gchar *svgdata = (gchar *)gtk_selection_data_get_data (data);
Inkscape::XML::Document *rnewdoc = sp_repr_read_mem(svgdata, gtk_selection_data_get_length (data), SP_SVG_NS_URI);
@@ -1293,13 +1292,17 @@ sp_ui_drag_data_received(GtkWidget *widget,
Inkscape::GC::release(newgroup);
DocumentUndo::done( doc, SP_VERB_NONE,
- _("Drop SVG") );
+ _("Drop SVG") );
+ prefs->setBool("/options/onimport", false);
break;
}
case URI_LIST: {
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ prefs->setBool("/options/onimport", true);
gchar *uri = (gchar *)gtk_selection_data_get_data (data);
sp_ui_import_files(uri);
+ prefs->setBool("/options/onimport", false);
break;
}