diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-26 01:27:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-26 01:27:20 +0800 |
commit | f0cf88bc99a458193f2c16a3ed346c20f6a5fd1a (patch) | |
tree | 46f65e318310ad0eb481ba11d761b9a189cb4bb5 /modules | |
parent | e26654bf19d9d2b5df889631e6c211af0e7de655 (diff) | |
download | gsoc2013-evolution-f0cf88bc99a458193f2c16a3ed346c20f6a5fd1a.tar.gz gsoc2013-evolution-f0cf88bc99a458193f2c16a3ed346c20f6a5fd1a.tar.zst gsoc2013-evolution-f0cf88bc99a458193f2c16a3ed346c20f6a5fd1a.zip |
Kill the "folder-unsubscribe" plugin.
Feature is now integrated in core mailer, and has a main menu item.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 29 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.h | 2 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view.c | 4 |
3 files changed, 34 insertions, 1 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 25e7d80da3..22bd86320b 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -385,6 +385,22 @@ action_mail_folder_select_subthread_cb (GtkAction *action, } static void +action_mail_folder_unsubscribe_cb (GtkAction *action, + EMailShellView *mail_shell_view) +{ + EMailShellSidebar *mail_shell_sidebar; + EMFolderTree *folder_tree; + gchar *folder_uri; + + mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar; + folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar); + + folder_uri = em_folder_tree_get_selected_uri (folder_tree); + em_folder_utils_unsubscribe_folder (folder_uri); + g_free (folder_uri); +} + +static void action_mail_hide_deleted_cb (GtkToggleAction *action, EMailShellView *mail_shell_view) { @@ -1104,6 +1120,13 @@ static GtkActionEntry mail_entries[] = { N_("Select all replies to the currently selected message"), G_CALLBACK (action_mail_folder_select_subthread_cb) }, + { "mail-folder-unsubscribe", + NULL, + N_("_Unsubscribe"), + NULL, + N_("Unsubscribe from the selected folder"), + G_CALLBACK (action_mail_folder_unsubscribe_cb) }, + { "mail-label-new", NULL, N_("_New Label"), @@ -1259,7 +1282,11 @@ static EPopupActionEntry mail_popup_entries[] = { { "mail-popup-folder-rename", NULL, - "mail-folder-rename" } + "mail-folder-rename" }, + + { "mail-popup-folder-unsubscribe", + NULL, + "mail-folder-unsubscribe" } }; static GtkToggleActionEntry mail_toggle_entries[] = { diff --git a/modules/mail/e-mail-shell-view-actions.h b/modules/mail/e-mail-shell-view-actions.h index 2a05582df8..3fb7142fff 100644 --- a/modules/mail/e-mail-shell-view-actions.h +++ b/modules/mail/e-mail-shell-view-actions.h @@ -89,6 +89,8 @@ E_SHELL_WINDOW_ACTION ((window), "mail-folder-select-thread") #define E_SHELL_WINDOW_ACTION_MAIL_FOLDER_SELECT_SUBTHREAD(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-folder-select-subthread") +#define E_SHELL_WINDOW_ACTION_MAIL_FOLDER_UNSUBSCRIBE(window) \ + E_SHELL_WINDOW_ACTION ((window), "mail-folder-unsubscribe") #define E_SHELL_WINDOW_ACTION_MAIL_FORWARD(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-forward") #define E_SHELL_WINDOW_ACTION_MAIL_FORWARD_ATTACHED(window) \ diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index 8d8b4aa2b3..ce18936eb8 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -191,6 +191,10 @@ mail_shell_view_update_actions (EShellView *shell_view) sensitive = !folder_is_store && folder_can_be_deleted; gtk_action_set_sensitive (action, sensitive); + action = ACTION (MAIL_FOLDER_UNSUBSCRIBE); + sensitive = !folder_is_store && folder_can_be_deleted; + gtk_action_set_sensitive (action, sensitive); + e_mail_shell_view_update_popup_labels (mail_shell_view); } |