diff options
author | Not Zed <NotZed@Ximian.com> | 2001-04-05 10:06:26 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-04-05 10:06:26 +0800 |
commit | 130017e15709e1f16cac8271214d0f7f41845a2f (patch) | |
tree | 85723c00f1d45c5352f2c4e97e445c85f4a1c761 /mail/folder-browser-factory.c | |
parent | f66390af642e3a02bbfb2974955eeae14770e406 (diff) | |
download | gsoc2013-evolution-130017e15709e1f16cac8271214d0f7f41845a2f.tar gsoc2013-evolution-130017e15709e1f16cac8271214d0f7f41845a2f.tar.gz gsoc2013-evolution-130017e15709e1f16cac8271214d0f7f41845a2f.tar.bz2 gsoc2013-evolution-130017e15709e1f16cac8271214d0f7f41845a2f.tar.lz gsoc2013-evolution-130017e15709e1f16cac8271214d0f7f41845a2f.tar.xz gsoc2013-evolution-130017e15709e1f16cac8271214d0f7f41845a2f.tar.zst gsoc2013-evolution-130017e15709e1f16cac8271214d0f7f41845a2f.zip |
Merge from evolution-0-10 to evolution-0-10-merge-0 into head.
2001-04-05 Not Zed <NotZed@Ximian.com>
* Merge from evolution-0-10 to evolution-0-10-merge-0 into head.
svn path=/trunk/; revision=9193
Diffstat (limited to 'mail/folder-browser-factory.c')
-rw-r--r-- | mail/folder-browser-factory.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index 6c80677352..4d7644d149 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -38,6 +38,7 @@ #include "mail-session.h" #include "e-util/e-gui-utils.h" +#include "camel/camel-vtrash-folder.h" /* The FolderBrowser BonoboControls we have. */ static EList *control_list = NULL; @@ -222,6 +223,7 @@ control_activate (BonoboControl *control, { GtkWidget *folder_browser; Bonobo_UIContainer container; + int state; container = bonobo_control_get_remote_ui_container (control); bonobo_ui_component_set_container (uic, container); @@ -241,27 +243,28 @@ control_activate (BonoboControl *control, uic, EVOLUTION_DATADIR, "evolution-mail.xml", "evolution-mail"); - if (mail_config_get_thread_list ()) - bonobo_ui_component_set_prop ( - uic, "/commands/ViewThreaded", "state", "1", NULL); - else - bonobo_ui_component_set_prop ( - uic, "/commands/ViewThreaded", "state", "0", NULL); - - bonobo_ui_component_add_listener ( - uic, "ViewThreaded", - folder_browser_toggle_threads, folder_browser); - - if (mail_config_get_view_source ()) - bonobo_ui_component_set_prop (uic, "/commands/ViewSource", - "state", "1", NULL); - else - bonobo_ui_component_set_prop (uic, "/commands/ViewSource", - "state", "0", NULL); - - bonobo_ui_component_add_listener (uic, "ViewSource", - folder_browser_toggle_view_source, - folder_browser); + state = mail_config_get_thread_list(); + bonobo_ui_component_set_prop(uic, "/commands/ViewThreaded", "state", state?"1":"0", NULL); + bonobo_ui_component_add_listener(uic, "ViewThreaded", folder_browser_toggle_threads, folder_browser); + /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */ + folder_browser_toggle_threads(uic, "", Bonobo_UIComponent_STATE_CHANGED, state?"1":"0", folder_browser); + + state = mail_config_get_view_source(); + bonobo_ui_component_set_prop(uic, "/commands/ViewSource", "state", state?"1":"0", NULL); + bonobo_ui_component_add_listener(uic, "ViewSource", folder_browser_toggle_view_source, folder_browser); + /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */ + folder_browser_toggle_view_source(uic, "", Bonobo_UIComponent_STATE_CHANGED, state?"1":"0", folder_browser); + + if (fb->folder && CAMEL_IS_VTRASH_FOLDER(fb->folder)) { + bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "sensitive", "0", NULL); + state = FALSE; + } else { + state = mail_config_get_hide_deleted(); + } + bonobo_ui_component_set_prop(uic, "/commands/HideDeleted", "state", state?"1":"0", NULL); + bonobo_ui_component_add_listener(uic, "HideDeleted", folder_browser_toggle_hide_deleted, folder_browser); + /* FIXME: this kind of bypasses bonobo but seems the only way when we change components */ + folder_browser_toggle_hide_deleted(uic, "", Bonobo_UIComponent_STATE_CHANGED, state?"1":"0", folder_browser); folder_browser_setup_view_menus (fb, uic); folder_browser_setup_property_menu (fb, uic); |