diff options
author | Not Zed <NotZed@Ximian.com> | 2004-04-14 00:00:21 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-04-14 00:00:21 +0800 |
commit | dfb793f762502fcc73a91c1e6799ee29cbbf5169 (patch) | |
tree | 5eee47af4eb8f3fc2abcba1f92b3a73aa6adda20 /mail/em-folder-browser.c | |
parent | 8563120ccac076a0baf9cb904c23a87bbb59d960 (diff) | |
download | gsoc2013-evolution-dfb793f762502fcc73a91c1e6799ee29cbbf5169.tar.gz gsoc2013-evolution-dfb793f762502fcc73a91c1e6799ee29cbbf5169.tar.zst gsoc2013-evolution-dfb793f762502fcc73a91c1e6799ee29cbbf5169.zip |
track the messagelist hidedeleted value since it looks it up when we set
004-04-13 Not Zed <NotZed@Ximian.com>
* em-folder-view.c (emfv_set_folder): track the messagelist
hidedeleted value since it looks it up when we set the folder.
* em-folder-browser.c (emfb_hide_deleted): use new method below to
propagate change.
(emfb_activate): same.
* em-folder-view.c (em_folder_view_set_hide_deleted): accessor to
set the hide_deleted state, emits a view_changed event.
* mail-component.c (view_changed_cb): use VISIBLE rather than
TOTAL for the displayed total count. Also deleted if we're not in
hide deleted mode. And do spethal things with spethal folders,
etc.
svn path=/trunk/; revision=25438
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r-- | mail/em-folder-browser.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index fb9b2528e1..e09277a09a 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -738,10 +738,7 @@ emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_E gconf = mail_config_get_gconf_client (); gconf_client_set_bool(gconf, "/apps/evolution/mail/display/show_deleted", state[0] == '0', NULL); - if (!(emfv->folder && (emfv->folder->folder_flags & CAMEL_FOLDER_IS_TRASH))) { - message_list_set_hidedeleted(emfv->list, state[0] != '0'); - emfv->hide_deleted = state[0] != '0'; - } + em_folder_view_set_hide_deleted(emfv, state[0] != '0'); } static void @@ -1015,7 +1012,7 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) if (act) { GConfClient *gconf; - gboolean state; + gboolean state, newstate; char *sstate; gconf = mail_config_get_gconf_client (); @@ -1057,9 +1054,8 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) state = !gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_deleted", NULL); bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "state", state ? "1" : "0", NULL); bonobo_ui_component_add_listener(uic, "HideDeleted", emfb_hide_deleted, emfv); - if (!(emfv->folder && (emfv->folder->folder_flags & CAMEL_FOLDER_IS_TRASH))) - message_list_set_hidedeleted (emfv->list, state); - else + em_folder_view_set_hide_deleted(emfv, state); /* <- not sure if this optimal, but it'll do */ + if (emfv->folder == NULL) bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "sensitive", state?"1":"0", NULL); /* FIXME: If we have no folder, we can't do a few of the lookups we need, |