[Commits] mimeview.c 1.83.2.187 1.83.2.188

pawel at claws-mail.org pawel at claws-mail.org
Fri Jan 20 23:30:06 CET 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv30862/src

Modified Files:
      Tag: gtk2
	mimeview.c 
Log Message:
2012-01-20 [pawel]	3.8.0cvs15

	* src/mimeview.c
		Fix bug #2582 'Expanded mimeview drag n drop no longer works'

Index: mimeview.c
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.c,v
retrieving revision 1.83.2.187
retrieving revision 1.83.2.188
diff -u -d -r1.83.2.187 -r1.83.2.188
--- mimeview.c	29 Dec 2011 23:16:22 -0000	1.83.2.187
+++ mimeview.c	20 Jan 2012 22:30:03 -0000	1.83.2.188
@@ -89,10 +89,6 @@
 
 static void mimeview_selected		(GtkTreeSelection	*selection,
 					 MimeView	*mimeview);
-static void mimeview_start_drag 	(GtkWidget	*widget,
-					 gint		 button,
-					 GdkEvent	*event,
-					 MimeView	*mimeview);
 static gint mimeview_button_pressed	(GtkWidget	*widget,
 					 GdkEventButton	*event,
 					 MimeView	*mimeview);
@@ -337,16 +333,16 @@
 
 	gtk_widget_show(ctree);
 	gtk_container_add(GTK_CONTAINER(scrolledwin), ctree);
+	gtk_drag_source_set(ctree, GDK_BUTTON1_MASK|GDK_BUTTON3_MASK, 
+			    mimeview_mime_types, 1, GDK_ACTION_COPY);
 
 	g_signal_connect(G_OBJECT(selection), "changed",
 			 G_CALLBACK(mimeview_selected), mimeview);
-	g_signal_connect(G_OBJECT(ctree), "button-release-event",
+	g_signal_connect(G_OBJECT(ctree), "button_release_event",
 			 G_CALLBACK(mimeview_button_pressed), mimeview);
-	g_signal_connect(G_OBJECT(ctree), "key-press-event",
+	g_signal_connect(G_OBJECT(ctree), "key_press_event",
 			 G_CALLBACK(mimeview_key_pressed), mimeview);
-	g_signal_connect(G_OBJECT (ctree),"drag-begin",
-			 G_CALLBACK (mimeview_start_drag), mimeview);
-	g_signal_connect(G_OBJECT(ctree), "drag-data-get",
+	g_signal_connect(G_OBJECT(ctree), "drag_data_get",
 			 G_CALLBACK(mimeview_drag_data_get), mimeview);
 
 	mime_notebook = gtk_notebook_new();
@@ -1449,24 +1445,6 @@
 	}
 }
 
-static void mimeview_start_drag(GtkWidget *widget, gint button,
-				GdkEvent *event, MimeView *mimeview)
-{
-	GdkDragContext *context;
-	MimeInfo *partinfo;
-
-	cm_return_if_fail(mimeview != NULL);
-
-	partinfo = mimeview_get_selected_part(mimeview);
-	if (partinfo == NULL || 
-	    partinfo->disposition == DISPOSITIONTYPE_INLINE)
-		return;
-
-	context = gtk_drag_begin(widget, mimeview->target_list,
-				 GDK_ACTION_COPY, button, event);
-	gtk_drag_set_icon_default(context);
-}
-
 static gint mimeview_button_pressed(GtkWidget *widget, GdkEventButton *event,
 				    MimeView *mimeview)
 {



More information about the Commits mailing list