diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2007-10-17 08:50:01 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2007-10-17 08:50:01 +0000 |
| commit | 2eb95c6c2969385ca6ca977aaf2e04d09fc8304e (patch) | |
| tree | ef3be46ada27a8f4e6916a1c275e04b1e714101c /src/interface.cpp | |
| parent | Added a Rename menu item to the popup for the filter list in the filter effec... (diff) | |
| download | inkscape-2eb95c6c2969385ca6ca977aaf2e04d09fc8304e.tar.gz inkscape-2eb95c6c2969385ca6ca977aaf2e04d09fc8304e.zip | |
Hooks for visual feedback during drag-n-drop
(bzr r3922)
Diffstat (limited to 'src/interface.cpp')
| -rw-r--r-- | src/interface.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index 6806c6957..775f53b35 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -110,6 +110,17 @@ static void sp_ui_drag_data_received(GtkWidget *widget, guint info, guint event_time, gpointer user_data); +static void sp_ui_drag_motion( GtkWidget *widget, + GdkDragContext *drag_context, + gint x, gint y, + GtkSelectionData *data, + guint info, + guint event_time, + gpointer user_data ); +static void sp_ui_drag_leave( GtkWidget *widget, + GdkDragContext *drag_context, + guint event_time, + gpointer user_data ); static void sp_ui_menu_item_set_sensitive(SPAction *action, unsigned int sensitive, void *data); @@ -240,10 +251,20 @@ sp_create_window(SPViewWidget *vw, gboolean editable) completeDropTargets, completeDropTargetsCount, GdkDragAction(GDK_ACTION_COPY | GDK_ACTION_MOVE)); + + g_signal_connect(G_OBJECT(win->gobj()), "drag_data_received", G_CALLBACK(sp_ui_drag_data_received), NULL); + g_signal_connect(G_OBJECT(win->gobj()), + "drag_motion", + G_CALLBACK(sp_ui_drag_motion), + NULL); + g_signal_connect(G_OBJECT(win->gobj()), + "drag_leave", + G_CALLBACK(sp_ui_drag_leave), + NULL); win->show(); // needed because the first ACTIVATE_DESKTOP was sent when there was no window yet @@ -1294,6 +1315,31 @@ sp_ui_drag_data_received(GtkWidget *widget, } } +#include "gradient-context.h" + +void sp_ui_drag_motion( GtkWidget *widget, + GdkDragContext *drag_context, + gint x, gint y, + GtkSelectionData *data, + guint info, + guint event_time, + gpointer user_data) +{ + SPDocument *doc = SP_ACTIVE_DOCUMENT; + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + + +// g_message("drag-n-drop motion (%4d, %4d) at %d", x, y, event_time); +} + +static void sp_ui_drag_leave( GtkWidget *widget, + GdkDragContext *drag_context, + guint event_time, + gpointer user_data ) +{ +// g_message("drag-n-drop leave at %d", event_time); +} + static void sp_ui_import_files(gchar *buffer) { |
