aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-08 23:45:03 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-07-09 20:44:22 +0800
commit451afa8429b6ff074d8d0aa93d18e1f5043627ea (patch)
tree5f3106a877826d5a11722fa967182630e37a8b1c /modules
parentacac6795d927185fec36dae65ee4c74e8165152c (diff)
downloadgsoc2013-evolution-451afa8429b6ff074d8d0aa93d18e1f5043627ea.tar
gsoc2013-evolution-451afa8429b6ff074d8d0aa93d18e1f5043627ea.tar.gz
gsoc2013-evolution-451afa8429b6ff074d8d0aa93d18e1f5043627ea.tar.bz2
gsoc2013-evolution-451afa8429b6ff074d8d0aa93d18e1f5043627ea.tar.lz
gsoc2013-evolution-451afa8429b6ff074d8d0aa93d18e1f5043627ea.tar.xz
gsoc2013-evolution-451afa8429b6ff074d8d0aa93d18e1f5043627ea.tar.zst
gsoc2013-evolution-451afa8429b6ff074d8d0aa93d18e1f5043627ea.zip
Add e_mail_reader_delete_folder_name().
Fetches the CamelFolder asynchronously, then deletes it asynchronously.
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 3468339200..9306704ed7 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -333,17 +333,26 @@ action_mail_folder_delete_cb (GtkAction *action,
EMailShellSidebar *mail_shell_sidebar;
EMailView *mail_view;
EMFolderTree *folder_tree;
- CamelFolder *folder;
+ CamelStore *selected_store = NULL;
+ gchar *selected_folder_name = NULL;
mail_shell_content = mail_shell_view->priv->mail_shell_content;
mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar;
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
- folder = em_folder_tree_get_selected_folder (folder_tree);
- g_return_if_fail (folder != NULL);
- e_mail_reader_delete_folder (E_MAIL_READER (mail_view), folder);
+ em_folder_tree_get_selected (
+ folder_tree, &selected_store, &selected_folder_name);
+ g_return_if_fail (CAMEL_IS_STORE (selected_store));
+ g_return_if_fail (selected_folder_name != NULL);
+
+ e_mail_reader_delete_folder_name (
+ E_MAIL_READER (mail_view),
+ selected_store, selected_folder_name);
+
+ g_object_unref (selected_store);
+ g_free (selected_folder_name);
}
static void