Enable drag and drop on Windows

The issues around it no longer seem to exist in current GTK
This commit is contained in:
TingPing 2014-05-23 18:47:27 -04:00
parent 6fb8cf40e1
commit 011514e1ad
3 changed files with 0 additions and 10 deletions

View File

@ -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;

View File

@ -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 */

View File

@ -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));