diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-21 03:29:00 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:17 +0800 |
commit | 6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd (patch) | |
tree | b07dc7efbf5039c21b15a10fcd5d9d24fed060c3 /modules/mail | |
parent | f0a2397cff81f0f9e14e4087ec91febdc0da0e35 (diff) | |
download | gsoc2013-evolution-6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd.tar gsoc2013-evolution-6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd.tar.gz gsoc2013-evolution-6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd.tar.bz2 gsoc2013-evolution-6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd.tar.lz gsoc2013-evolution-6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd.tar.xz gsoc2013-evolution-6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd.tar.zst gsoc2013-evolution-6fb8b27d3d847ab42aa5247a0a924912e1d4a2dd.zip |
EMailReader: Support multiple action groups.
Use an enum type to request different action groups. For now we just
have E_MAIL_READER_ACTION_GROUP_STANDARD. EMailReader implementations
should map the enum value to an appropriate GtkActionGroup.
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-content.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 57d1663434..30c842243f 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -248,17 +248,27 @@ mail_shell_content_open_selected_mail (EMailReader *reader) } static GtkActionGroup * -mail_shell_content_get_action_group (EMailReader *reader) +mail_shell_content_get_action_group (EMailReader *reader, + EMailReaderActionGroup group) { - EShellContent *shell_content; - EShellWindow *shell_window; EShellView *shell_view; + EShellWindow *shell_window; + EShellContent *shell_content; + const gchar *group_name; shell_content = E_SHELL_CONTENT (reader); shell_view = e_shell_content_get_shell_view (shell_content); shell_window = e_shell_view_get_shell_window (shell_view); - return E_SHELL_WINDOW_ACTION_GROUP_MAIL (shell_window); + switch (group) { + case E_MAIL_READER_ACTION_GROUP_STANDARD: + group_name = "mail"; + break; + default: + g_return_val_if_reached (NULL); + } + + return e_shell_window_get_action_group (shell_window, group_name); } static EAlertSink * |