diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-21 06:33:11 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:17 +0800 |
commit | b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4 (patch) | |
tree | 52ff8c870dd0025218d5b8803c6c4ef0560900d3 /modules/mail/e-mail-shell-view-actions.c | |
parent | 6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd (diff) | |
download | gsoc2013-evolution-b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4.tar gsoc2013-evolution-b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4.tar.gz gsoc2013-evolution-b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4.tar.bz2 gsoc2013-evolution-b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4.tar.lz gsoc2013-evolution-b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4.tar.xz gsoc2013-evolution-b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4.tar.zst gsoc2013-evolution-b1e34279d9a7f2e453fa3bbfd93856866aa4f5e4.zip |
Bug 650587 - Hide Search Folder actions when Search Folders are disabled
Add an action group for Search Folders to EMailReader. The action
group's visibility is bound to the "mail-enable-search-folders" setting,
so that menu items related to Search Folders are hidden when Search
Folders are disabled in GConf.
Affected menu items are:
Edit -> Search Folders
Message -> Create Rule -> Search Folder from Subject...
Message -> Create Rule -> Search Folder from Sender...
Message -> Create Rule -> Search Folder from Recipients...
Message -> Create Rule -> Search Folder from Mailing List...
Search -> Create Search Folder From Search...
Diffstat (limited to 'modules/mail/e-mail-shell-view-actions.c')
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 90096393e3..f5c5524648 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -1117,13 +1117,6 @@ static GtkActionEntry mail_entries[] = { N_("Permanently remove all the deleted messages from all folders"), G_CALLBACK (action_mail_folder_expunge_cb) }, - { "mail-create-search-folder", - NULL, - N_("C_reate Search Folder From Search..."), - NULL, - NULL, /* XXX Add a tooltip! */ - G_CALLBACK (action_mail_create_search_folder_cb) }, - { "mail-download", NULL, N_("_Download Messages for Offline Usage"), @@ -1329,13 +1322,6 @@ static GtkActionEntry mail_entries[] = { N_("Create or edit rules for filtering new mail"), G_CALLBACK (action_mail_tools_filters_cb) }, - { "mail-tools-search-folders", - NULL, - N_("Search F_olders"), - NULL, - N_("Create or edit search folder definitions"), - G_CALLBACK (action_mail_tools_search_folders_cb) }, - { "mail-tools-subscriptions", NULL, N_("_Subscriptions..."), @@ -1367,6 +1353,23 @@ static GtkActionEntry mail_entries[] = { NULL } }; +static GtkActionEntry search_folder_entries[] = { + + { "mail-create-search-folder", + NULL, + N_("C_reate Search Folder From Search..."), + NULL, + NULL, /* XXX Add a tooltip! */ + G_CALLBACK (action_mail_create_search_folder_cb) }, + + { "mail-tools-search-folders", + NULL, + N_("Search F_olders"), + NULL, + N_("Create or edit search folder definitions"), + G_CALLBACK (action_mail_tools_search_folders_cb) }, +}; + static EPopupActionEntry mail_popup_entries[] = { { "mail-popup-account-disable", @@ -1666,6 +1669,12 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view) G_N_ELEMENTS (mail_scope_entries), MAIL_SCOPE_CURRENT_FOLDER, NULL, NULL); + /* Search Folder Actions */ + action_group = ACTION_GROUP (SEARCH_FOLDERS); + gtk_action_group_add_actions ( + action_group, search_folder_entries, + G_N_ELEMENTS (search_folder_entries), mail_shell_view); + action = ACTION (MAIL_SCOPE_ALL_ACCOUNTS); combo_box = e_shell_searchbar_get_scope_combo_box (searchbar); e_action_combo_box_set_action (combo_box, GTK_RADIO_ACTION (action)); |