aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Yang <sam.yang@sun.com>2005-12-19 16:11:24 +0800
committerLi Yuan <liyuan@src.gnome.org>2005-12-19 16:11:24 +0800
commited0401a2b2ae37037f24d10a34c25c4ac35c5e12 (patch)
tree6950256ee457eae87953b2f75d3e33d2745389cc
parentec33c97f36d8332561a1df41cef1ad4fc8357aa2 (diff)
downloadgsoc2013-evolution-ed0401a2b2ae37037f24d10a34c25c4ac35c5e12.tar
gsoc2013-evolution-ed0401a2b2ae37037f24d10a34c25c4ac35c5e12.tar.gz
gsoc2013-evolution-ed0401a2b2ae37037f24d10a34c25c4ac35c5e12.tar.bz2
gsoc2013-evolution-ed0401a2b2ae37037f24d10a34c25c4ac35c5e12.tar.lz
gsoc2013-evolution-ed0401a2b2ae37037f24d10a34c25c4ac35c5e12.tar.xz
gsoc2013-evolution-ed0401a2b2ae37037f24d10a34c25c4ac35c5e12.tar.zst
gsoc2013-evolution-ed0401a2b2ae37037f24d10a34c25c4ac35c5e12.zip
** Fixes bug #323867.
2005-12-16 Sam Yang <sam.yang@sun.com> ** Fixes bug #323867. * em-folder-view.c: (emfv_setting_notify): Respond to the change of /apps/evolution/mail/display/show_deleted and thread_list in gconf. svn path=/trunk/; revision=30873
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-view.c32
2 files changed, 39 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 31d9dafe07..0a00cb29fe 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -82,6 +82,13 @@
* importers/pine-importer.c: Use GLib API when
applicable.
+2005-12-16 Sam Yang <sam.yang@sun.com>
+
+ ** Fixes bug #323867.
+
+ * em-folder-view.c: (emfv_setting_notify):
+ Respond to the change of /apps/evolution/mail/display/show_deleted and thread_list in gconf.
+
2005-12-12 Karsten Bräckelmann <guenther@rudersport.de>
* em-folder-view.c: Mail Context Menu re-ordered correctly,
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 2388f471c1..a1e4e45886 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -2560,6 +2560,8 @@ enum {
EMFV_LOAD_HTTP,
EMFV_HEADERS,
EMFV_SHOW_PREVIEW,
+ EMFV_SHOW_DELETED,
+ EMFV_THREAD_LIST,
EMFV_SETTINGS /* last, for loop count */
};
@@ -2576,6 +2578,8 @@ static const char * const emfv_display_keys[] = {
"load_http_images",
"headers",
"show_preview",
+ "show_deleted",
+ "thread_list",
};
static GHashTable *emfv_setting_key;
@@ -2687,6 +2691,34 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
em_folder_browser_show_preview ((EMFolderBrowser *)emfv, state_gconf);
bonobo_ui_component_set_prop (emfv->uic, "/commands/ViewPreview", "state", state_gconf ? "1" : "0", NULL);
break; }
+ case EMFV_SHOW_DELETED: {
+ gboolean state;
+
+ state = gconf_value_get_bool (value);
+ em_folder_view_set_hide_deleted (emfv, !state);
+ bonobo_ui_component_set_prop (emfv->uic, "/commands/HideDeleted", "state", state ? "0" : "1", NULL);
+ break; }
+ case EMFV_THREAD_LIST: {
+ gboolean state_gconf, state_camel;
+ char *ret;
+
+ /* If emfv->folder or emfv->list hasn't been initialized, do nothing */
+ if (!emfv->folder || !emfv->list)
+ return;
+
+ state_gconf = gconf_value_get_bool (value);
+ if ((ret = camel_object_meta_get (emfv->folder, "evolution:thread_list"))) {
+ state_camel = (ret[0] != '0');
+ g_free (ret);
+ if (state_gconf == state_camel)
+ return;
+ }
+
+ if (camel_object_meta_set (emfv->folder, "evolution:thread_list", state_gconf ? "1" : "0"))
+ camel_object_state_write (emfv->folder);
+ message_list_set_threaded (emfv->list, state_gconf);
+ bonobo_ui_component_set_prop (emfv->uic, "/commands/ViewThreaded", "state", state_gconf ? "1" : "0", NULL);
+ break; }
}
}