aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-02-16 20:04:47 +0800
committerMilan Crha <mcrha@redhat.com>2012-02-16 20:05:55 +0800
commit3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6 (patch)
treefcfb53b4b1107aed1d38a08611a5b7abf9a9e9c6 /modules/mail/e-mail-shell-view-actions.c
parent02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e (diff)
downloadgsoc2013-evolution-3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6.tar
gsoc2013-evolution-3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6.tar.gz
gsoc2013-evolution-3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6.tar.bz2
gsoc2013-evolution-3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6.tar.lz
gsoc2013-evolution-3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6.tar.xz
gsoc2013-evolution-3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6.tar.zst
gsoc2013-evolution-3ec164d12e61102c0e3ce5271d5cb6ad7be6e4a6.zip
Bug #668482 - Edit account properties from menu on folder store
Diffstat (limited to 'modules/mail/e-mail-shell-view-actions.c')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 407f17ef78..c5c51a715a 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -114,6 +114,37 @@ action_mail_account_disable_cb (GtkAction *action,
}
static void
+action_mail_account_properties_cb (GtkAction *action,
+ EMailShellView *mail_shell_view)
+{
+ EMailShellSidebar *mail_shell_sidebar;
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+ EShellBackend *shell_backend;
+ EMFolderTree *folder_tree;
+ CamelService *service;
+ CamelStore *store;
+ const gchar *uid;
+
+ mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar;
+
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
+ 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);
+
+ e_mail_shell_backend_edit_account (E_MAIL_SHELL_BACKEND (shell_backend),
+ GTK_WINDOW (shell_window),
+ e_get_account_by_uid (uid));
+}
+
+static void
action_mail_create_search_folder_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
@@ -1158,6 +1189,13 @@ static GtkActionEntry mail_entries[] = {
N_("Permanently remove all the deleted messages from all folders"),
G_CALLBACK (action_mail_folder_expunge_cb) },
+ { "mail-account-properties",
+ GTK_STOCK_PROPERTIES,
+ N_("_Properties"),
+ NULL,
+ N_("Edit properties of this account"),
+ G_CALLBACK (action_mail_account_properties_cb) },
+
{ "mail-download",
NULL,
N_("_Download Messages for Offline Usage"),
@@ -1421,6 +1459,10 @@ static EPopupActionEntry mail_popup_entries[] = {
NULL,
"mail-account-expunge" },
+ { "mail-popup-account-properties",
+ NULL,
+ "mail-account-properties" },
+
{ "mail-popup-flush-outbox",
NULL,
"mail-flush-outbox" },