From dbecfb231409fd9170147739862e8517a3d3979a Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 30 Sep 2003 06:52:13 +0000 Subject: remove gconf stuff. (em_format_html_set_xmailer_mask): new method to set 2003-09-30 Not Zed * em-format-html.c (efh_init): remove gconf stuff. (em_format_html_set_xmailer_mask): new method to set the xmailer mask. * em-folder-view.c (emfv_display_keys[]): Added charset key to monitor/retrieve, and xmailer_mask. (emfv_setting_notify): Monitor charset setting, pass onto the formatter, as well as xmailer_mask. * mail-preferences.c (mail_preferences_construct): use the new charset key. (mail_preferences_apply): use the new charset key. * evolution-mail.schemas: Moved the mail/format/charset to mail/display/charset. 1. it makes more sense, and 2. it makes notification update easier in em-folder-view.c * em-format.c (emf_init): remove the gconf charset stuff, for bug #48791, and also actually fixes the fixme that jeff thought he fixed. (em_format_format_text): use default charset as fallback. (em_format_set_default_charset): New method to set the default charset. (gconf_charset_changed): removed. svn path=/trunk/; revision=22768 --- mail/em-folder-view.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mail/em-folder-view.c') diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index be3af1c284..cbe1fc913a 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -1844,6 +1844,7 @@ emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolde /* keep these two tables in sync */ enum { EMFV_ANIMATE_IMAGES = 1, + EMFV_CHARSET, EMFV_CITATION_COLOUR, EMFV_CITATION_MARK, EMFV_CARET_MODE, @@ -1851,19 +1852,22 @@ enum { EMFV_MARK_SEEN, EMFV_MARK_SEEN_TIMEOUT, EMFV_LOAD_HTTP, + EMFV_XMAILER_MASK, EMFV_SETTINGS /* last, for loop count */ }; /* IF these get too long, update key field */ static const char * const emfv_display_keys[] = { "animate_images", + "charset", "citation_colour", "mark_citations", "caret_mode", "message_style", "mark_seen", "mark_seen_timeout", - "load_http_images" + "load_http_images", + "xmailer_mask", }; static GHashTable *emfv_setting_key; @@ -1878,11 +1882,14 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold tkey = strrchr(entry->key, '/'); g_return_if_fail (tkey != NULL); - + switch(GPOINTER_TO_INT(g_hash_table_lookup(emfv_setting_key, tkey+1))) { case EMFV_ANIMATE_IMAGES: em_format_html_display_set_animate(emfv->preview, gconf_value_get_bool(gconf_entry_get_value(entry))); break; + case EMFV_CHARSET: + em_format_set_default_charset((EMFormat *)emfv->preview, gconf_value_get_string(gconf_entry_get_value(entry))); + break; case EMFV_CITATION_COLOUR: { const char *s; GdkColor colour; @@ -1921,6 +1928,9 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold /* FIXME: this doesn't handle the 'sometimes' case, only the always case */ em_format_html_set_load_http((EMFormatHTML *)emfv->preview, style == 2); break; } + case EMFV_XMAILER_MASK: + em_format_html_set_xmailer_mask((EMFormatHTML *)emfv->preview, gconf_value_get_int(gconf_entry_get_value(entry))); + break; } } -- cgit