diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-09-22 11:17:10 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-09-22 11:17:10 +0000 |
| commit | 0c63ba89a507f817dcd7b54cf60af8951e14e2c9 (patch) | |
| tree | d97f5ff77162216ee8948ef3893f6af1eabb1e12 /src/ui/interface.cpp | |
| parent | Fix problems on dialogs with extensions. TODO: Add dialog on drag&drop a SVG (diff) | |
| download | inkscape-0c63ba89a507f817dcd7b54cf60af8951e14e2c9.tar.gz inkscape-0c63ba89a507f817dcd7b54cf60af8951e14e2c9.zip | |
Allow ask for SVG dragged import method. Also split ask question from one to 2 (Bitmap and SVG)
Diffstat (limited to 'src/ui/interface.cpp')
| -rw-r--r-- | src/ui/interface.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 35723af04..5edaab193 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1246,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); @@ -1291,12 +1293,16 @@ sp_ui_drag_data_received(GtkWidget *widget, Inkscape::GC::release(newgroup); DocumentUndo::done( doc, SP_VERB_NONE, _("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; } |
