diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 11 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 9 |
2 files changed, 16 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index bfaeff0456..703593302c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,14 @@ +2004-08-24 Jeffrey Stedfast <fejj@novell.com> + + Fix for bug #63177 + + * em-folder-tree.c (emft_drop_async_drop): Check full_name == NULL + rather than full_name[0] since store's have NULL full_names, not + empty string (like they used to). + (emft_drop_folder): Same. + (tree_drag_data_received): Don't abort the drop if the user + dropped on a store, this is allowed (depending on the store). + 2004-08-25 Not Zed <NotZed@Ximian.com> * mail-component.c (store_info_new): only open the trash or junk diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 361675a43e..bd5ea3a369 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -857,7 +857,7 @@ emft_drop_folder(struct _DragDataReceivedAsync *m) return; /* handles dropping to the root properly */ - if (m->full_name[0]) + if (m->full_name) new_name = g_strdup_printf("%s/%s", m->full_name, src->name); else new_name = g_strdup(src->name); @@ -923,7 +923,7 @@ emft_drop_async_drop (struct _mail_msg *mm) if (m->info == DND_DROP_TYPE_FOLDER) { /* copy or move (aka rename) a folder */ emft_drop_folder(m); - } else if (m->full_name[0] == 0) { + } else if (m->full_name == NULL) { camel_exception_set (&mm->ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot drop message(s) into toplevel store")); } else if ((folder = camel_store_get_folder (m->store, m->full_name, 0, &mm->ex))) { @@ -1030,6 +1030,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y GtkTreeViewDropPosition pos; GtkTreePath *dest_path; struct _DragDataReceivedAsync *m; + gboolean is_store; CamelStore *store; GtkTreeIter iter; char *full_name; @@ -1051,11 +1052,11 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y 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); /* 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) { + if (full_name == NULL && !is_store) { gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME); return; } |