[evolution-patches] [Mail] Patch for #323867. Make evolution respond to change in gconf
- From: sam yang <Sam Yang Sun COM>
- To: evolution-patches <evolution-patches gnome org>
- Subject: [evolution-patches] [Mail] Patch for #323867. Make evolution respond to change in gconf
- Date: Mon, 12 Dec 2005 20:00:14 +0800
Hi,
The attached patch tries to make evolution respect and respond to the
change of /apps/evolution/mail/display/show_deleted and thread_list in
gconf. Thus helping to implement central management. Fixes bug #323867.
Please review it.
Thanks,
Sam
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3731
diff -u -r1.3731 ChangeLog
--- ChangeLog 12 Dec 2005 11:27:10 -0000 1.3731
+++ ChangeLog 12 Dec 2005 11:41:13 -0000
@@ -1,3 +1,9 @@
+2005-12-12 Sam Yang <sam yang sun com>
+
+ ** See 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 Shreyas Srinivasan <sshreyas novell com>
* mail.error.xml: Fix #47857
Index: em-folder-view.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-view.c,v
retrieving revision 1.135
diff -u -r1.135 em-folder-view.c
--- em-folder-view.c 28 Nov 2005 16:37:58 -0000 1.135
+++ em-folder-view.c 12 Dec 2005 10:42:22 -0000
@@ -2525,6 +2525,8 @@
EMFV_LOAD_HTTP,
EMFV_HEADERS,
EMFV_SHOW_PREVIEW,
+ EMFV_SHOW_DELETED,
+ EMFV_THREAD_LIST,
EMFV_SETTINGS /* last, for loop count */
};
@@ -2541,6 +2543,8 @@
"load_http_images",
"headers",
"show_preview",
+ "show_deleted",
+ "thread_list",
};
static GHashTable *emfv_setting_key;
@@ -2651,6 +2655,34 @@
camel_object_state_write (emfv->folder);
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; }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]