[evolution-patches] fix for #63177, dropping folders to a store




i think this got broke/unfinished when i revamped the drop code or when i removed the path stuff from camelfolderinfo.

anyway this trivial fix should do it i think.  I tested 1 drop on the folder's root store only :)

--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3438
diff -u -3 -r1.3438 ChangeLog
--- mail/ChangeLog	24 Aug 2004 02:54:03 -0000	1.3438
+++ mail/ChangeLog	25 Aug 2004 07:40:40 -0000
@@ -1,3 +1,10 @@
+2004-08-25  Not Zed  <NotZed Ximian com>
+
+	** See bug #63177.
+
+	* em-folder-tree.c (tree_drag_data_received): if its a store,
+	override full_name == NULL so we don't quit.
+
 2004-08-23  Not Zed  <NotZed Ximian com>
 
 	* em-folder-tree.c (em_folder_tree_set_selected): store the
Index: mail/em-folder-tree.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
retrieving revision 1.124
diff -u -3 -r1.124 em-folder-tree.c
--- mail/em-folder-tree.c	24 Aug 2004 02:54:03 -0000	1.124
+++ mail/em-folder-tree.c	25 Aug 2004 07:40:40 -0000
@@ -1030,6 +1030,7 @@
 	GtkTreeViewDropPosition pos;
 	GtkTreePath *dest_path;
 	struct _DragDataReceivedAsync *m;
+	gboolean is_store;
 	CamelStore *store;
 	GtkTreeIter iter;
 	char *full_name;
@@ -1051,10 +1052,15 @@
 	
 	gtk_tree_model_get((GtkTreeModel *)priv->model, &iter,
 			   COL_POINTER_CAMEL_STORE, &store,
+			   COL_BOOL_IS_STORE, &is_store,
 			   COL_STRING_FULL_NAME, &full_name, -1);
-	
+
+	/* stores are stored with no full name, we just fudge it to
+	 * the "" it expects so we dont abort processing */
+	if (is_store && full_name == NULL)
+		full_name = g_strdup("");
+
 	/* make sure user isn't try to drop on a placeholder row */
-	/* FIXME: must allow drop of folders onto a store */
 	if (full_name == NULL) {
 		gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME);
 		return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]