diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mail/e-mail-shell-backend.h | 3 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-settings.c | 3 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 39 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view.c | 13 | ||||
-rw-r--r-- | modules/mail/em-composer-prefs.c | 9 |
5 files changed, 34 insertions, 33 deletions
diff --git a/modules/mail/e-mail-shell-backend.h b/modules/mail/e-mail-shell-backend.h index e545fa2566..edec7c67a3 100644 --- a/modules/mail/e-mail-shell-backend.h +++ b/modules/mail/e-mail-shell-backend.h @@ -24,9 +24,6 @@ #include <mail/e-mail-backend.h> -#include <e-util/e-signature-list.h> -#include <libedataserver/e-account-list.h> - /* Standard GObject macros */ #define E_TYPE_MAIL_SHELL_BACKEND \ (e_mail_shell_backend_get_type ()) diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c index d795749c82..99402d5f29 100644 --- a/modules/mail/e-mail-shell-settings.c +++ b/modules/mail/e-mail-shell-settings.c @@ -26,9 +26,6 @@ #include "e-mail-shell-settings.h" #include <gconf/gconf-client.h> -#include <libedataserver/e-account-list.h> - -#include <e-util/e-signature-list.h> #include <mail/e-mail-backend.h> #include <mail/e-mail-label-list-store.h> diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 5db80011aa..f4f5ea26f6 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -87,8 +87,11 @@ action_mail_account_disable_cb (GtkAction *action, EMailBackend *backend; EMailSession *session; EMFolderTree *folder_tree; + CamelService *service; + CamelStore *store; EAccountList *account_list; EAccount *account; + const gchar *uid; mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar; @@ -99,7 +102,12 @@ action_mail_account_disable_cb (GtkAction *action, session = e_mail_backend_get_session (backend); folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar); - account = em_folder_tree_get_selected_account (folder_tree); + store = em_folder_tree_get_selected_store (folder_tree); + g_return_if_fail (store != NULL); + + service = CAMEL_SERVICE (store); + uid = camel_service_get_uid (service); + account = e_get_account_by_uid (uid); g_return_if_fail (account != NULL); account_list = e_get_account_list (); @@ -308,7 +316,6 @@ action_mail_folder_expunge_cb (GtkAction *action, EShellBackend *shell_backend; EShellWindow *shell_window; EShellView *shell_view; - EMailSession *session; CamelFolder *folder; /* This handles both the "folder-expunge" and "account-expunge" @@ -329,9 +336,10 @@ action_mail_folder_expunge_cb (GtkAction *action, g_return_if_fail (folder != NULL); shell_backend = e_shell_view_get_shell_backend (shell_view); - session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend)); - em_utils_expunge_folder (GTK_WIDGET (shell_window), session, folder); + em_utils_expunge_folder ( + GTK_WIDGET (shell_window), + E_MAIL_BACKEND (shell_backend), folder); } static void @@ -594,17 +602,14 @@ action_mail_global_expunge_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_empty_trash (GTK_WIDGET (shell_window), session); + em_utils_empty_trash ( + GTK_WIDGET (shell_window), + E_MAIL_BACKEND (shell_backend)); } static void @@ -1056,9 +1061,8 @@ action_mail_tools_subscriptions_cb (GtkAction *action, EMailBackend *backend; EMailSession *session; EMFolderTree *folder_tree; - EAccount *account; GtkWidget *dialog; - CamelStore *store = NULL; + CamelStore *store; shell_view = E_SHELL_VIEW (mail_shell_view); shell_window = e_shell_view_get_shell_window (shell_view); @@ -1066,20 +1070,11 @@ action_mail_tools_subscriptions_cb (GtkAction *action, mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar; folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar); - account = em_folder_tree_get_selected_account (folder_tree); + store = em_folder_tree_get_selected_store (folder_tree); backend = E_MAIL_BACKEND (shell_backend); session = e_mail_backend_get_session (backend); - if (account != NULL) { - CamelService *service; - - service = camel_session_get_service ( - CAMEL_SESSION (session), account->uid); - if (service != NULL) - store = CAMEL_STORE (service); - } - dialog = em_subscription_editor_new ( GTK_WINDOW (shell_window), CAMEL_SESSION (session), store); diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index 73041d7971..5759b5830f 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -828,6 +828,7 @@ mail_shell_view_update_actions (EShellView *shell_view) EMFolderTreeModel *model; EMailReader *reader; EMailView *mail_view; + CamelStore *store; EAccount *account; GtkAction *action; GList *list, *link; @@ -883,7 +884,17 @@ mail_shell_view_update_actions (EShellView *shell_view) (state & E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE); uri = em_folder_tree_get_selected_uri (folder_tree); - account = em_folder_tree_get_selected_account (folder_tree); + store = em_folder_tree_get_selected_store (folder_tree); + + if (store != NULL) { + CamelService *service; + const gchar *uid; + + service = CAMEL_SERVICE (store); + uid = camel_service_get_uid (service); + account = e_get_account_by_uid (uid); + } else + account = NULL; if (uri != NULL) { GtkTreeRowReference *reference; diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index f8825f701c..d5b1c6697d 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -569,10 +569,11 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, G_BINDING_SYNC_CREATE); /* Sanitize the dialog for Express mode */ - e_shell_hide_widgets_for_express_mode (shell, prefs->builder, - "chkOutlookFilenames", - "chkTopSignature", - NULL); + e_shell_hide_widgets_for_express_mode ( + shell, prefs->builder, + "chkOutlookFilenames", + "chkTopSignature", + NULL); /* get our toplevel widget */ client = gconf_client_get_default (); |