From f1a9fc07d9f4cfa94da390247c25ce4ba693a34e Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 18 Nov 2012 21:33:53 +0900 Subject: Fix for 1079971 : Symbol dialog : Drag & Drop to the canvas (bzr r11880) --- src/interface.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index bad95adc6..823119953 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -59,6 +59,7 @@ #include "dialogs/dialog-events.h" #include "message-context.h" #include "ui/uxmanager.h" +#include "ui/clipboard.h" #include "display/sp-canvas.h" #include "color.h" @@ -97,6 +98,7 @@ typedef enum { APP_X_INKY_COLOR, APP_X_COLOR, APP_OSWB_COLOR, + APP_X_INK_PASTE } ui_drop_target_info; static GtkTargetEntry ui_drop_target_entries [] = { @@ -109,7 +111,8 @@ static GtkTargetEntry ui_drop_target_entries [] = { {(gchar *)"application/x-inkscape-color", 0, APP_X_INKY_COLOR}, #endif // ENABLE_MAGIC_COLORS {(gchar *)"application/x-oswb-color", 0, APP_OSWB_COLOR }, - {(gchar *)"application/x-color", 0, APP_X_COLOR } + {(gchar *)"application/x-color", 0, APP_X_COLOR }, + {(gchar *)"application/x-inkscape-paste", 0, APP_X_INK_PASTE } }; static GtkTargetEntry *completeDropTargets = 0; @@ -1430,6 +1433,13 @@ sp_ui_drag_data_received(GtkWidget *widget, break; } + case APP_X_INK_PASTE: { + Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get(); + cm->paste(desktop); + DocumentUndo::done( doc, SP_VERB_NONE, _("Drop Symbol") ); + break; + } + case PNG_DATA: case JPEG_DATA: case IMAGE_DATA: { -- cgit v1.2.3