aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-01-20 08:05:40 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-20 08:05:40 +0800
commit22d41a51fae2d18315887b05000cf7facc36e887 (patch)
tree044eaaa852ca31a11ea70ec8bfa33c6df8c01891 /mail/e-mail-shell-view-actions.c
parent8e546420df08f5fe243aa4227be44915fd79b86b (diff)
downloadgsoc2013-evolution-22d41a51fae2d18315887b05000cf7facc36e887.tar.gz
gsoc2013-evolution-22d41a51fae2d18315887b05000cf7facc36e887.tar.zst
gsoc2013-evolution-22d41a51fae2d18315887b05000cf7facc36e887.zip
Formalize the "no disabled items in popup menus" policy in the form of a
GtkAction subclass called EPopupAction. Migrate all the modules over to using EPopupActions in their popup menus. Add sensitivity management of GtkActions to EMailReader. Not finished. svn path=/branches/kill-bonobo/; revision=37106
Diffstat (limited to 'mail/e-mail-shell-view-actions.c')
-rw-r--r--mail/e-mail-shell-view-actions.c113
1 files changed, 39 insertions, 74 deletions
diff --git a/mail/e-mail-shell-view-actions.c b/mail/e-mail-shell-view-actions.c
index 8037470ffe..a3d7397372 100644
--- a/mail/e-mail-shell-view-actions.c
+++ b/mail/e-mail-shell-view-actions.c
@@ -725,72 +725,64 @@ static GtkActionEntry mail_entries[] = {
N_("Subscribe or unsubscribe to folders on remote servers"),
G_CALLBACK (action_mail_tools_subscriptions_cb) },
- /*** Popup Menu Variations ***/
+ /*** Menus ***/
- { "mail-popup-folder-copy",
- "folder-copy",
- N_("_Copy Folder To..."),
+ { "mail-folder-menu",
NULL,
- N_("Copy the selected folder into another folder"),
- G_CALLBACK (action_mail_folder_copy_cb) },
-
- { "mail-popup-folder-delete",
- GTK_STOCK_DELETE,
+ N_("F_older"),
NULL,
NULL,
- N_("Permanently remove this folder"),
- G_CALLBACK (action_mail_folder_delete_cb) },
+ NULL },
- { "mail-popup-folder-move",
- "folder-move",
- N_("_Move Folder To..."),
+ { "mail-preview-menu",
NULL,
- N_("Move the selected folder into another folder"),
- G_CALLBACK (action_mail_folder_move_cb) },
-
- { "mail-popup-folder-new",
- "folder-new",
- N_("_New Folder..."),
+ N_("_Preview"),
NULL,
- N_("Create a new folder for storing mail"),
- G_CALLBACK (action_mail_folder_new_cb) },
+ NULL,
+ NULL }
+};
- { "mail-popup-folder-properties",
- GTK_STOCK_PROPERTIES,
+static EPopupActionEntry mail_popup_entries[] = {
+
+ { "mail-popup-account-disable",
NULL,
+ "mail-account-disable" },
+
+ { "mail-popup-empty-trash",
NULL,
- N_("Change the properties of this folder"),
- G_CALLBACK (action_mail_folder_properties_cb) },
+ "mail-empty-trash" },
- { "mail-popup-folder-refresh",
- GTK_STOCK_REFRESH,
+ { "mail-popup-flush-outbox",
NULL,
+ "mail-flush-outbox" },
+
+ { "mail-popup-folder-copy",
NULL,
- N_("Refresh the folder"),
- G_CALLBACK (action_mail_folder_refresh_cb) },
+ "mail-folder-copy" },
- { "mail-popup-folder-rename",
+ { "mail-popup-folder-delete",
NULL,
- N_("_Rename..."),
+ "mail-folder-delete" },
+
+ { "mail-popup-folder-move",
NULL,
- N_("Change the name of this folder"),
- G_CALLBACK (action_mail_folder_rename_cb) },
+ "mail-folder-move" },
- /*** Menus ***/
+ { "mail-popup-folder-new",
+ N_("_New Folder..."),
+ "mail-folder-new" },
- { "mail-folder-menu",
- NULL,
- N_("F_older"),
- NULL,
+ { "mail-popup-folder-properties",
NULL,
- NULL },
+ "mail-folder-properties" },
- { "mail-preview-menu",
- NULL,
- N_("_Preview"),
+ { "mail-popup-folder-refresh",
NULL,
+ "mail-folder-refresh" },
+
+ { "mail-popup-folder-rename",
NULL,
- NULL }
+ "mail-folder-rename" }
};
static GtkToggleActionEntry mail_toggle_entries[] = {
@@ -1054,6 +1046,9 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
gtk_action_group_add_actions (
action_group, mail_entries,
G_N_ELEMENTS (mail_entries), mail_shell_view);
+ e_action_group_add_popup_actions (
+ action_group, mail_popup_entries,
+ G_N_ELEMENTS (mail_popup_entries));
gtk_action_group_add_toggle_actions (
action_group, mail_toggle_entries,
G_N_ELEMENTS (mail_toggle_entries), mail_shell_view);
@@ -1088,34 +1083,4 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
object = G_OBJECT (ACTION (MAIL_VIEW_VERTICAL));
key = "/apps/evolution/mail/display/layout";
gconf_bridge_bind_property (bridge, key, object, "current-value");
-
- /* Fine tuning. */
-
- e_binding_new (
- G_OBJECT (ACTION (MAIL_FOLDER_COPY)), "sensitive",
- G_OBJECT (ACTION (MAIL_POPUP_FOLDER_COPY)), "visible");
-
- e_binding_new (
- G_OBJECT (ACTION (MAIL_FOLDER_DELETE)), "sensitive",
- G_OBJECT (ACTION (MAIL_POPUP_FOLDER_DELETE)), "visible");
-
- e_binding_new (
- G_OBJECT (ACTION (MAIL_FOLDER_MOVE)), "sensitive",
- G_OBJECT (ACTION (MAIL_POPUP_FOLDER_MOVE)), "visible");
-
- e_binding_new (
- G_OBJECT (ACTION (MAIL_FOLDER_NEW)), "sensitive",
- G_OBJECT (ACTION (MAIL_POPUP_FOLDER_NEW)), "visible");
-
- e_binding_new (
- G_OBJECT (ACTION (MAIL_FOLDER_PROPERTIES)), "sensitive",
- G_OBJECT (ACTION (MAIL_POPUP_FOLDER_PROPERTIES)), "visible");
-
- e_binding_new (
- G_OBJECT (ACTION (MAIL_FOLDER_REFRESH)), "sensitive",
- G_OBJECT (ACTION (MAIL_POPUP_FOLDER_REFRESH)), "visible");
-
- e_binding_new (
- G_OBJECT (ACTION (MAIL_FOLDER_RENAME)), "sensitive",
- G_OBJECT (ACTION (MAIL_POPUP_FOLDER_RENAME)), "visible");
}