aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-02-01 02:02:22 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-02-01 02:02:22 +0800
commitcd5ff486fb02451645f8b4b39608edca2da5e4a2 (patch)
tree5aff2bff0e48bc3333ff1fc3fdb619c4c34fdbd2 /mail/e-mail-shell-view-actions.c
parent70fce0bbb0712dc70a15c481c0b65d68a98a4ff7 (diff)
downloadgsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.gz
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.bz2
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.lz
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.xz
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.zst
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.zip
Let the mailer handle composer printing.
Start roughing in the mailer search bar. svn path=/branches/kill-bonobo/; revision=37199
Diffstat (limited to 'mail/e-mail-shell-view-actions.c')
-rw-r--r--mail/e-mail-shell-view-actions.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/mail/e-mail-shell-view-actions.c b/mail/e-mail-shell-view-actions.c
index 3c3cae101c..a4c2dfab1c 100644
--- a/mail/e-mail-shell-view-actions.c
+++ b/mail/e-mail-shell-view-actions.c
@@ -522,6 +522,14 @@ action_mail_view_cb (GtkRadioAction *action,
mail_shell_content, vertical_view);
}
+static void
+action_search_filter_cb (GtkRadioAction *action,
+ GtkRadioAction *current,
+ EMailShellView *mail_shell_view)
+{
+ e_mail_shell_view_execute_search (mail_shell_view);
+}
+
static GtkActionEntry mail_entries[] = {
{ "mail-account-disable",
@@ -1078,3 +1086,41 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
dst_object = G_OBJECT (ACTION (MAIL_THREADS_EXPAND_ALL));
e_binding_new (src_object, "active", dst_object, "sensitive");
}
+
+void
+e_mail_shell_view_update_search_filter (EMailShellView *mail_shell_view)
+{
+ EShellContent *shell_content;
+ EShellWindow *shell_window;
+ EShellView *shell_view;
+ GtkActionGroup *action_group;
+ GtkRadioAction *radio_action;
+ GList *list, *iter;
+ GSList *group;
+
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_content = e_shell_view_get_shell_content (shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ action_group = ACTION_GROUP (MAIL_FILTER);
+ e_action_group_remove_all_actions (action_group);
+
+ /* Add the standard filter actions. */
+ gtk_action_group_add_radio_actions (
+ action_group, mail_filter_entries,
+ G_N_ELEMENTS (mail_filter_entries),
+ MAIL_FILTER_ALL_MESSAGES,
+ G_CALLBACK (action_search_filter_cb),
+ mail_shell_view);
+
+ /* Retrieve the radio group from an action we just added. */
+ list = gtk_action_group_list_actions (action_group);
+ radio_action = GTK_RADIO_ACTION (list->data);
+ group = gtk_radio_action_get_group (radio_action);
+ g_list_free (list);
+
+ /* FIXME Build the label actions. */
+
+ /* User any action in the group; doesn't matter which. */
+ e_shell_content_set_filter_action (shell_content, radio_action);
+}