diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-11-18 12:33:53 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-11-18 12:33:53 +0000 |
| commit | f1a9fc07d9f4cfa94da390247c25ce4ba693a34e (patch) | |
| tree | e2086e2b37c097ab210558c879c16c3a59e9ec67 /src/interface.cpp | |
| parent | Fix for 177931 : Layer dialog toggle solo mode with Shift/Alt click (diff) | |
| download | inkscape-f1a9fc07d9f4cfa94da390247c25ce4ba693a34e.tar.gz inkscape-f1a9fc07d9f4cfa94da390247c25ce4ba693a34e.zip | |
Fix for 1079971 : Symbol dialog : Drag & Drop to the canvas
(bzr r11880)
Diffstat (limited to '')
| -rw-r--r-- | src/interface.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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: { |
