diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-08-26 23:05:48 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-08-26 23:05:48 +0800 |
commit | 0e3e684383975ced61e89be166969e69b5ef6689 (patch) | |
tree | fa2e3f7553d05c83bf734324ebb36632aa3daf75 /mail | |
parent | d9aa9b68ad56f1509cc223a741382c1b2d89bab1 (diff) | |
download | gsoc2013-evolution-0e3e684383975ced61e89be166969e69b5ef6689.tar gsoc2013-evolution-0e3e684383975ced61e89be166969e69b5ef6689.tar.gz gsoc2013-evolution-0e3e684383975ced61e89be166969e69b5ef6689.tar.bz2 gsoc2013-evolution-0e3e684383975ced61e89be166969e69b5ef6689.tar.lz gsoc2013-evolution-0e3e684383975ced61e89be166969e69b5ef6689.tar.xz gsoc2013-evolution-0e3e684383975ced61e89be166969e69b5ef6689.tar.zst gsoc2013-evolution-0e3e684383975ced61e89be166969e69b5ef6689.zip |
Fix for bug #63177
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).
svn path=/trunk/; revision=27035
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; } |