** See bug #322414 Respond to the change of
2005-11-28 Sam Yang <sam.yang@sun.com> ** See bug #322414 * em-folder-view.c: (emfv_setting_notify): Respond to the change of /apps/evolution/mail/display/show_preview in gconf. svn path=/trunk/; revision=30691
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2005-11-28 Sam Yang <sam.yang@sun.com>
|
||||
|
||||
** See bug #322414
|
||||
* em-folder-view.c: (emfv_setting_notify):
|
||||
Respond to the change of /apps/evolution/mail/display/show_preview
|
||||
in gconf.
|
||||
|
||||
2005-11-25 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* em-composer-prefs.c (sig_add_script_response): Use gstdio
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
#include "em-format-html-print.h"
|
||||
#include "em-folder-selection.h"
|
||||
#include "em-folder-view.h"
|
||||
#include "em-folder-browser.h" /* EMFolderBrowser stuff */
|
||||
#include "em-mailer-prefs.h"
|
||||
#include "em-message-browser.h"
|
||||
#include "message-list.h"
|
||||
@@ -2523,6 +2524,7 @@ enum {
|
||||
EMFV_MARK_SEEN_TIMEOUT,
|
||||
EMFV_LOAD_HTTP,
|
||||
EMFV_HEADERS,
|
||||
EMFV_SHOW_PREVIEW,
|
||||
EMFV_SETTINGS /* last, for loop count */
|
||||
};
|
||||
|
||||
@@ -2538,6 +2540,7 @@ static const char * const emfv_display_keys[] = {
|
||||
"mark_seen_timeout",
|
||||
"load_http_images",
|
||||
"headers",
|
||||
"show_preview",
|
||||
};
|
||||
|
||||
static GHashTable *emfv_setting_key;
|
||||
@@ -2628,6 +2631,27 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
|
||||
if (emf->message)
|
||||
em_format_redraw(emf);
|
||||
break; }
|
||||
case EMFV_SHOW_PREVIEW: {
|
||||
gboolean state_gconf, state_camel;
|
||||
char *ret;
|
||||
|
||||
/* If emfv->folder hasn't been initialized, do nothing */
|
||||
if (!emfv->folder)
|
||||
return;
|
||||
state_gconf = gconf_value_get_bool (value);
|
||||
ret = camel_object_meta_get (emfv->folder, "evolution:show_preview");
|
||||
if (ret){
|
||||
state_camel = (ret[0] != '0');
|
||||
g_free (ret);
|
||||
if (state_gconf == state_camel)
|
||||
return;
|
||||
}
|
||||
|
||||
if (camel_object_meta_set (emfv->folder, "evolution:show_preview", state_gconf ? "1\0" : "0\0"))
|
||||
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;}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user