aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-09 19:43:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-07-09 20:44:22 +0800
commita0bc647f07e097edf87b89341225710b5be40208 (patch)
tree4fd48c8216ff7c81d822ad1b968903d79775a9b2 /modules
parentb3d0f3d8ea8691c48e4edfc0436ed43ca12f6ea5 (diff)
downloadgsoc2013-evolution-a0bc647f07e097edf87b89341225710b5be40208.tar
gsoc2013-evolution-a0bc647f07e097edf87b89341225710b5be40208.tar.gz
gsoc2013-evolution-a0bc647f07e097edf87b89341225710b5be40208.tar.bz2
gsoc2013-evolution-a0bc647f07e097edf87b89341225710b5be40208.tar.lz
gsoc2013-evolution-a0bc647f07e097edf87b89341225710b5be40208.tar.xz
gsoc2013-evolution-a0bc647f07e097edf87b89341225710b5be40208.tar.zst
gsoc2013-evolution-a0bc647f07e097edf87b89341225710b5be40208.zip
Remove mail_expunge_folder().
Use e_mail_folder_expunge() instead.
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 3d39c4f3dc..e6cd01dc12 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -330,41 +330,38 @@ static void
action_mail_folder_expunge_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
+ EMailShellContent *mail_shell_content;
EMailShellSidebar *mail_shell_sidebar;
+ EMailView *mail_view;
EMFolderTree *folder_tree;
- EShellWindow *shell_window;
- EShellView *shell_view;
- CamelFolder *folder;
- const gchar *description;
- gboolean proceed;
+ CamelStore *selected_store = NULL;
+ gchar *selected_folder_name = NULL;
/* This handles both the "folder-expunge" and "account-expunge"
* actions. */
- shell_view = E_SHELL_VIEW (mail_shell_view);
- shell_window = e_shell_view_get_shell_window (shell_view);
+ 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);
/* Get the folder from the folder tree, not the message list.
* This correctly handles the use case of right-clicking on
* the "Trash" folder and selecting "Empty Trash" without
* actually selecting the folder. In that case the message
* list would not contain the correct folder to expunge. */
+ 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);
- 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);
-
- description = camel_folder_get_description (folder);
-
- proceed = em_utils_prompt_user (
- GTK_WINDOW (shell_window),
- "prompt-on-expunge",
- "mail:ask-expunge",
- description, NULL);
+ e_mail_reader_expunge_folder_name (
+ E_MAIL_READER (mail_view),
+ selected_store, selected_folder_name);
- if (proceed)
- mail_expunge_folder (folder);
+ g_object_unref (selected_store);
+ g_free (selected_folder_name);
}
static void