diff src/gtkconv.c @ 9300:98f01c233a40

[gaim-migrate @ 10104] Some dnd fixes (I hope). I think this should also allow receivng HTML drops, but I can't figure out why it doesn't from Mozilla. It seems Mozilla is giving the text as a link, but I'm not sure why. Maybe it's a Mozilla bug? Maybe it's my bug. Hopefully someone else can take a look at it. I was unable to find anything else that supported dragging HTML text out to test with. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 17 Jun 2004 00:26:57 +0000
parents 391a6533296a
children 3d5519a84d02
line wrap: on
line diff
--- a/src/gtkconv.c	Wed Jun 16 06:51:24 2004 +0000
+++ b/src/gtkconv.c	Thu Jun 17 00:26:57 2004 +0000
@@ -3801,7 +3801,6 @@
 						   G_CALLBACK(refocus_entry_cb), gtkconv);
 
 	gaim_setup_imhtml(gtkconv->imhtml);
-
 	gtk_widget_show(gtkconv->imhtml);
 
 	/* Build the right pane. */
@@ -4028,10 +4027,8 @@
 
 	gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml),
 			gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps"));
-
 	gaim_setup_imhtml(gtkconv->imhtml);
 	gtk_widget_show(gtkconv->imhtml);
-
 	vbox2 = gtk_vbox_new(FALSE, 6);
 	gtk_paned_pack2(GTK_PANED(paned), vbox2, FALSE, TRUE);
 	gtk_widget_show(vbox2);
@@ -4127,7 +4124,6 @@
 {
 	GaimConvWindow *win = conv->window;
 	GaimConversation *c;
-
 	if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE))
 	{
 		GaimBlistNode *n = NULL;
@@ -4174,6 +4170,7 @@
 
 		gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
 	}
+		gtk_drag_finish(dc, FALSE, FALSE, t);
 }
 
 /**************************************************************************
@@ -4387,31 +4384,30 @@
 
 		/* Setup drag-and-drop */
 		gtk_drag_dest_set(pane,
-						  GTK_DEST_DEFAULT_MOTION |
-						  GTK_DEST_DEFAULT_DROP,
-						  te, sizeof(te) / sizeof(GtkTargetEntry),
-						  GDK_ACTION_COPY);
-		gtk_drag_dest_set(gtkconv->imhtml,
-						  GTK_DEST_DEFAULT_MOTION |
-				                  GTK_DEST_DEFAULT_DROP,
-						  te, sizeof(te) / sizeof(GtkTargetEntry),
-						  GDK_ACTION_DEFAULT | GDK_ACTION_COPY |
-						  GDK_ACTION_MOVE);
-		gtk_drag_dest_set(gtkconv->entry,
-						  GTK_DEST_DEFAULT_MOTION |
-						  GTK_DEST_DEFAULT_DROP,
-						  te, sizeof(te) / sizeof(GtkTargetEntry),
-						  GDK_ACTION_COPY);
-
+				  GTK_DEST_DEFAULT_MOTION |
+				  GTK_DEST_DEFAULT_DROP,
+				  te, sizeof(te) / sizeof(GtkTargetEntry),
+				  GDK_ACTION_COPY);
+		gtk_drag_dest_set(pane,
+				  GTK_DEST_DEFAULT_MOTION |
+				  GTK_DEST_DEFAULT_DROP,
+				  te, sizeof(te) / sizeof(GtkTargetEntry),
+				  GDK_ACTION_COPY);
+		gtk_drag_dest_set(gtkconv->imhtml, 0,
+				  te, sizeof(te) / sizeof(GtkTargetEntry),
+				  GDK_ACTION_COPY);
+		
+		gtk_drag_dest_set(gtkconv->entry, 0,
+				  te, sizeof(te) / sizeof(GtkTargetEntry),
+				  GDK_ACTION_COPY);
+		
 		g_signal_connect(G_OBJECT(pane), "drag_data_received",
-						 G_CALLBACK(conv_dnd_recv), conv);
+				 G_CALLBACK(conv_dnd_recv), conv);
 		g_signal_connect(G_OBJECT(gtkconv->imhtml), "drag_data_received",
-						 G_CALLBACK(conv_dnd_recv), conv);
-#if 0
+				 G_CALLBACK(conv_dnd_recv), conv);
 		g_signal_connect(G_OBJECT(gtkconv->entry), "drag_data_received",
-						 G_CALLBACK(conv_dnd_recv), conv);
-#endif
-
+				 G_CALLBACK(conv_dnd_recv), conv);
+		
 		/* Setup the container for the tab. */
 		gtkconv->tab_cont = tab_cont = gtk_vbox_new(FALSE, 6);
 		gtk_container_set_border_width(GTK_CONTAINER(tab_cont), 6);