aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-17 21:40:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-19 00:32:37 +0800
commit35e55a8d6e3455efa92abd669680d191e3e4cbac (patch)
tree303d479aaaf12538d73f611f52db1157da64549b /modules/mail/e-mail-shell-view-actions.c
parentb674a37a381d0328a7273bafa62d80203c8cdf70 (diff)
downloadgsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.gz
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.zst
gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.zip
Send errors to an EAlertSink instead of the task bar.
This marks the end of unintrusive error dialogs, which were too unintrusive. We now show errors directly in the main window using the EAlert / EAlertSink framework.
Diffstat (limited to 'modules/mail/e-mail-shell-view-actions.c')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index fa083bf6f2..7548b5e54a 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -118,8 +118,6 @@ action_mail_create_search_folder_cb (GtkAction *action,
mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
searchbar = e_mail_shell_content_get_searchbar (mail_shell_content);
- vfolder_load_storage (session);
-
search_rule = e_shell_view_get_search_rule (shell_view);
g_return_if_fail (search_rule != NULL);
@@ -181,8 +179,6 @@ action_mail_folder_copy_cb (GtkAction *action,
EShellBackend *shell_backend;
EShellWindow *shell_window;
EShellView *shell_view;
- EMailBackend *backend;
- EMailSession *session;
CamelFolderInfo *folder_info;
EMFolderTree *folder_tree;
@@ -190,9 +186,6 @@ action_mail_folder_copy_cb (GtkAction *action,
shell_window = e_shell_view_get_shell_window (shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
- backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
-
mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar;
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
folder_info = em_folder_tree_get_selected_folder_info (folder_tree);
@@ -200,7 +193,9 @@ action_mail_folder_copy_cb (GtkAction *action,
/* XXX Leaking folder_info? */
em_folder_utils_copy_folder (
- GTK_WINDOW (shell_window), session, folder_info, FALSE);
+ GTK_WINDOW (shell_window),
+ E_MAIL_BACKEND (shell_backend),
+ folder_info, FALSE);
}
static void
@@ -208,15 +203,21 @@ action_mail_folder_delete_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
EMailShellSidebar *mail_shell_sidebar;
+ EShellBackend *shell_backend;
+ EShellView *shell_view;
EMFolderTree *folder_tree;
CamelFolder *folder;
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
+
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);
- em_folder_utils_delete_folder (folder);
+ em_folder_utils_delete_folder (
+ E_MAIL_BACKEND (shell_backend), folder);
}
static void
@@ -255,11 +256,14 @@ action_mail_folder_mark_all_as_read_cb (GtkAction *action,
{
EShellView *shell_view;
EShellWindow *shell_window;
+ EShellBackend *shell_backend;
EMailShellContent *mail_shell_content;
EMailReader *reader;
EMailView *mail_view;
CamelFolder *folder;
GtkWindow *parent;
+ EMailBackend *backend;
+ EMailSession *session;
MailFolderCache *cache;
GtkWidget *message_list;
GPtrArray *uids;
@@ -269,6 +273,7 @@ action_mail_folder_mark_all_as_read_cb (GtkAction *action,
shell_view = E_SHELL_VIEW (mail_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
parent = GTK_WINDOW (shell_window);
mail_shell_content = mail_shell_view->priv->mail_shell_content;
@@ -279,8 +284,11 @@ action_mail_folder_mark_all_as_read_cb (GtkAction *action,
folder = e_mail_reader_get_folder (reader);
g_return_if_fail (folder != NULL);
- cache = mail_folder_cache_get_default ();
+ backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
+ cache = e_mail_session_get_folder_cache (session);
key = "/apps/evolution/mail/prompts/mark_all_read";
+
if (mail_folder_cache_get_folder_has_children (cache, folder, NULL))
prompt = "mail:ask-mark-all-read-sub";
else
@@ -312,8 +320,6 @@ action_mail_folder_move_cb (GtkAction *action,
EShellBackend *shell_backend;
EShellWindow *shell_window;
EShellView *shell_view;
- EMailBackend *backend;
- EMailSession *session;
CamelFolderInfo *folder_info;
EMFolderTree *folder_tree;
@@ -321,9 +327,6 @@ action_mail_folder_move_cb (GtkAction *action,
shell_window = e_shell_view_get_shell_window (shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
- backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
-
mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar;
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
folder_info = em_folder_tree_get_selected_folder_info (folder_tree);
@@ -331,7 +334,9 @@ action_mail_folder_move_cb (GtkAction *action,
/* XXX Leaking folder_info? */
em_folder_utils_copy_folder (
- GTK_WINDOW (shell_window), session, folder_info, TRUE);
+ GTK_WINDOW (shell_window),
+ E_MAIL_BACKEND (shell_backend),
+ folder_info, TRUE);
}
static void
@@ -1017,17 +1022,14 @@ action_mail_tools_filters_cb (GtkAction *action,
EShellBackend *shell_backend;
EShellWindow *shell_window;
EShellView *shell_view;
- EMailBackend *backend;
- EMailSession *session;
shell_view = E_SHELL_VIEW (mail_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
- backend = E_MAIL_BACKEND (shell_backend);
- session = e_mail_backend_get_session (backend);
-
- em_utils_edit_filters (GTK_WIDGET (shell_window), session);
+ em_utils_edit_filters (
+ GTK_WIDGET (shell_window),
+ E_MAIL_BACKEND (shell_backend));
}
static void