summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorTingPing <tingping@fedoraproject.org>2014-05-23 18:47:27 -0400
committerTingPing <tingping@fedoraproject.org>2014-05-23 18:47:27 -0400
commit011514e1ad5bc3b2b07da4702b8135ee7efdf179 (patch)
treea512d2f4ad369d910e6c482946addeb4290480fd /src/fe-gtk
parent6fb8cf40e1df25daedf8d2f1ba4557eb05c94909 (diff)
Enable drag and drop on Windows
The issues around it no longer seem to exist in current GTK
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/chanview-tree.c2
-rw-r--r--src/fe-gtk/maingui.c6
-rw-r--r--src/fe-gtk/userlistgui.c2
3 files changed, 0 insertions, 10 deletions
diff --git a/src/fe-gtk/chanview-tree.c b/src/fe-gtk/chanview-tree.c
index 07806860..4a1682ba 100644
--- a/src/fe-gtk/chanview-tree.c
+++ b/src/fe-gtk/chanview-tree.c
@@ -167,7 +167,6 @@ cv_tree_init (chanview *cv)
 							 GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
 	gtk_drag_source_set (view, GDK_BUTTON1_MASK, dnd_src_target, 1, GDK_ACTION_COPY);
 
-#ifndef WIN32
 	g_signal_connect (G_OBJECT (view), "drag_begin",
 							G_CALLBACK (mg_drag_begin_cb), NULL);
 	g_signal_connect (G_OBJECT (view), "drag_drop",
@@ -176,7 +175,6 @@ cv_tree_init (chanview *cv)
 							G_CALLBACK (mg_drag_motion_cb), NULL);
 	g_signal_connect (G_OBJECT (view), "drag_end",
 							G_CALLBACK (mg_drag_end_cb), NULL);
-#endif
 
 	((treeview *)cv)->tree = GTK_TREE_VIEW (view);
 	((treeview *)cv)->scrollw = win;
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 6db2399e..d8b88b6d 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -2358,7 +2358,6 @@ mg_create_textarea (session *sess, GtkWidget *box)
 	gui->vscrollbar = gtk_vscrollbar_new (GTK_XTEXT (xtext)->adj);
 	gtk_box_pack_start (GTK_BOX (inbox), gui->vscrollbar, FALSE, TRUE, 0);
 
-#ifndef WIN32	/* needs more work */
 	gtk_drag_dest_set (gui->vscrollbar, 5, dnd_dest_targets, 2,
 							 GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
 	g_signal_connect (G_OBJECT (gui->vscrollbar), "drag_begin",
@@ -2374,7 +2373,6 @@ mg_create_textarea (session *sess, GtkWidget *box)
 							 GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
 	g_signal_connect (G_OBJECT (gui->xtext), "drag_data_received",
 							G_CALLBACK (mg_dialog_dnd_drop), NULL);
-#endif
 }
 
 static GtkWidget *
@@ -3785,7 +3783,6 @@ mg_is_gui_target (GdkDragContext *context)
 gboolean
 mg_drag_begin_cb (GtkWidget *widget, GdkDragContext *context, gpointer userdata)
 {
-#ifndef WIN32	/* leaks GDI pool memory - don't use on win32 */
 	int width, height;
 	GdkColormap *cmap;
 	GdkPixbuf *pix, *pix2;
@@ -3804,7 +3801,6 @@ mg_drag_begin_cb (GtkWidget *widget, GdkDragContext *context, gpointer userdata)
 
 	gtk_drag_set_icon_pixbuf (context, pix2, 0, 0);
 	g_object_set_data (G_OBJECT (widget), "ico", pix2);
-#endif
 
 	return TRUE;
 }
@@ -3816,9 +3812,7 @@ mg_drag_end_cb (GtkWidget *widget, GdkDragContext *context, gpointer userdata)
 	if (!mg_is_gui_target (context))
 		return;
 
-#ifndef WIN32
 	g_object_unref (g_object_get_data (G_OBJECT (widget), "ico"));
-#endif
 }
 
 /* drop complete */
diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c
index 5a18d8b8..97d08506 100644
--- a/src/fe-gtk/userlistgui.c
+++ b/src/fe-gtk/userlistgui.c
@@ -643,7 +643,6 @@ userlist_create (GtkWidget *box)
 							G_CALLBACK (userlist_key_cb), 0);
 
 	/* tree/chanview DND */
-#ifndef WIN32	/* leaks GDI pool memory, don't enable */
 	g_signal_connect (G_OBJECT (treeview), "drag_begin",
 							G_CALLBACK (mg_drag_begin_cb), NULL);
 	g_signal_connect (G_OBJECT (treeview), "drag_drop",
@@ -652,7 +651,6 @@ userlist_create (GtkWidget *box)
 							G_CALLBACK (mg_drag_motion_cb), NULL);
 	g_signal_connect (G_OBJECT (treeview), "drag_end",
 							G_CALLBACK (mg_drag_end_cb), NULL);
-#endif
 
 	userlist_add_columns (GTK_TREE_VIEW (treeview));