summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface.cpp46
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)
{