diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-21 03:29:00 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-21 07:05:55 +0800 |
commit | 7333f12087eb0b0271ff272c6643909a7803510b (patch) | |
tree | 17f41d1b9500c783eee63763e4a4e779b265912d /modules | |
parent | f15ef02a7f3dda6b2f8058efab8407946d1d6a60 (diff) | |
download | gsoc2013-evolution-7333f12087eb0b0271ff272c6643909a7803510b.tar gsoc2013-evolution-7333f12087eb0b0271ff272c6643909a7803510b.tar.gz gsoc2013-evolution-7333f12087eb0b0271ff272c6643909a7803510b.tar.bz2 gsoc2013-evolution-7333f12087eb0b0271ff272c6643909a7803510b.tar.lz gsoc2013-evolution-7333f12087eb0b0271ff272c6643909a7803510b.tar.xz gsoc2013-evolution-7333f12087eb0b0271ff272c6643909a7803510b.tar.zst gsoc2013-evolution-7333f12087eb0b0271ff272c6643909a7803510b.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')
-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 * |