diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-04-29 07:19:47 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-04-29 07:19:47 +0800 |
commit | 0b04c6cfd743afcf5a4e6a195a120776074cb2a7 (patch) | |
tree | c9277ec82dcb31fd964c2d03cca28cc7cfad21f0 /mail/e-mail-shell-view-actions.c | |
parent | bde9c2bff430b74c3eea7832221e2a8de2fb8272 (diff) | |
download | gsoc2013-evolution-0b04c6cfd743afcf5a4e6a195a120776074cb2a7.tar.gz gsoc2013-evolution-0b04c6cfd743afcf5a4e6a195a120776074cb2a7.tar.zst gsoc2013-evolution-0b04c6cfd743afcf5a4e6a195a120776074cb2a7.zip |
Get the "Hide Deleted Messages" option working.
Diffstat (limited to 'mail/e-mail-shell-view-actions.c')
-rw-r--r-- | mail/e-mail-shell-view-actions.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mail/e-mail-shell-view-actions.c b/mail/e-mail-shell-view-actions.c index 0355a966f2..600d8e847c 100644 --- a/mail/e-mail-shell-view-actions.c +++ b/mail/e-mail-shell-view-actions.c @@ -396,8 +396,15 @@ static void action_mail_hide_deleted_cb (GtkToggleAction *action, EMailShellView *mail_shell_view) { - /* FIXME */ - g_print ("Action: %s\n", gtk_action_get_name (GTK_ACTION (action))); + MessageList *message_list; + EMailReader *reader; + gboolean active; + + reader = E_MAIL_READER (mail_shell_view->priv->mail_shell_content); + message_list = e_mail_reader_get_message_list (reader); + + active = gtk_toggle_action_get_active (action); + message_list_set_hidedeleted (message_list, active); } static void @@ -1447,6 +1454,12 @@ 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"); + /* XXX The boolean sense of the GConf key is the inverse of + * the menu item, so we have to maintain two properties. */ + e_mutual_binding_new_with_negation ( + G_OBJECT (shell_content), "show-deleted", + G_OBJECT (ACTION (MAIL_HIDE_DELETED)), "active"); + g_signal_connect ( ACTION (GAL_SAVE_CUSTOM_VIEW), "activate", G_CALLBACK (action_gal_save_custom_view_cb), mail_shell_view); |