aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-preferences.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-11-21 02:35:30 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-21 02:35:30 +0800
commitbdefd8ec42c5ecbf9f5904f44c5205d677753c99 (patch)
tree5662ecc5994490cad22342b8e602e75569a2e10f /mail/mail-preferences.c
parentbd4153c91aee4e7dfded61ba439c746ca04fefc4 (diff)
downloadgsoc2013-evolution-bdefd8ec42c5ecbf9f5904f44c5205d677753c99.tar
gsoc2013-evolution-bdefd8ec42c5ecbf9f5904f44c5205d677753c99.tar.gz
gsoc2013-evolution-bdefd8ec42c5ecbf9f5904f44c5205d677753c99.tar.bz2
gsoc2013-evolution-bdefd8ec42c5ecbf9f5904f44c5205d677753c99.tar.lz
gsoc2013-evolution-bdefd8ec42c5ecbf9f5904f44c5205d677753c99.tar.xz
gsoc2013-evolution-bdefd8ec42c5ecbf9f5904f44c5205d677753c99.tar.zst
gsoc2013-evolution-bdefd8ec42c5ecbf9f5904f44c5205d677753c99.zip
gconfify. (mail_composer_prefs_apply): gconfify this also.
2002-11-20 Jeffrey Stedfast <fejj@ximian.com> * mail-composer-prefs.c (mail_composer_prefs_construct): gconfify. (mail_composer_prefs_apply): gconfify this also. * mail-preferences.c (mail_preferences_construct): gconf_client_get_string() probably returns an allocated buffer. svn path=/trunk/; revision=18859
Diffstat (limited to 'mail/mail-preferences.c')
-rw-r--r--mail/mail-preferences.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/mail/mail-preferences.c b/mail/mail-preferences.c
index cb05806185..1077fc73ed 100644
--- a/mail/mail-preferences.c
+++ b/mail/mail-preferences.c
@@ -197,6 +197,7 @@ mail_preferences_construct (MailPreferences *prefs)
gboolean bool;
guint32 rgb;
int i, val;
+ char *buf;
char *names[][2] = {
{ "anim_check", "chkShowAnimatedImages" },
{ "magic_check", "chkAutoDetectLinks" },
@@ -229,10 +230,11 @@ mail_preferences_construct (MailPreferences *prefs)
g_signal_connect (prefs->timeout, "changed", G_CALLBACK (entry_changed), prefs);
prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
- text = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/format/charset", NULL);
- menu = e_charset_picker_new (text ? text : e_iconv_locale_charset ());
+ buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/format/charset", NULL);
+ menu = e_charset_picker_new (buf ? buf : e_iconv_locale_charset ());
gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu));
option_menu_connect (prefs->charset, prefs);
+ g_free (buf);
prefs->citation_highlight = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkHighlightCitations"));
bool = gconf_client_get_bool (prefs->gconf, "/apps/evolution/mail/display/highlight_citations", NULL);
@@ -240,11 +242,12 @@ mail_preferences_construct (MailPreferences *prefs)
g_signal_connect (prefs->citation_highlight, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
prefs->citation_color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerHighlightCitations"));
- text = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/citation_colour", NULL);
- gdk_color_parse (text ? text : "#737373", &colour);
+ buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/citation_colour", NULL);
+ gdk_color_parse (buf ? buf : "#737373", &colour);
rgb = ((colour.red & 0xff00) << 8) | (colour.green & 0xff00) | ((colour.blue & 0xff) >> 8);
colorpicker_set_color (prefs->citation_color, rgb);
g_signal_connect (prefs->citation_color, "color-set", G_CALLBACK (color_set), prefs);
+ g_free (buf);
/* Deleting Mail */
prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
@@ -272,10 +275,11 @@ mail_preferences_construct (MailPreferences *prefs)
g_signal_connect (prefs->notify_play_sound, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound"));
- text = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), text ? text : "");
+ buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), buf ? buf : "");
g_signal_connect (gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
G_CALLBACK (entry_changed), prefs);
+ g_free (buf);
/* HTML Mail tab */