From 253a05d03cb3d827a0da0002cb48231bd238caa3 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Thu, 25 May 2006 04:59:47 +0000 Subject: Added support for collapsible headers for To/Cc/Bcc svn path=/trunk/; revision=32020 --- mail/em-mailer-prefs.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'mail/em-mailer-prefs.c') diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index f15dcf3990..96110a4a6f 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -448,6 +448,16 @@ mark_seen_timeout_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/mark_seen_timeout", timeout, NULL); } +static void +address_compress_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) +{ + int count; + + count = (int) gtk_spin_button_get_value (prefs->address_count); + + gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/address_count", count, NULL); +} + static void spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, float div, GCallback value_changed) { @@ -540,7 +550,7 @@ toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, cons bool = gconf_client_get_bool (prefs->gconf, key, NULL); gtk_toggle_button_set_active (toggle, not ? !bool : bool); - + if (toggled) { g_object_set_data ((GObject *) toggle, "key", (void *) key); g_signal_connect (toggle, "toggled", toggled, prefs); @@ -755,6 +765,16 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) spin_button_init (prefs, prefs->timeout, "/apps/evolution/mail/display/mark_seen_timeout", 1000.0, G_CALLBACK (mark_seen_timeout_changed)); + + prefs->address_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "address_checkbox")); + toggle_button_init (prefs, prefs->address_toggle, FALSE, + "/apps/evolution/mail/display/address_compress", + G_CALLBACK (toggle_button_toggled)); + + prefs->address_count = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "address_spin")); + spin_button_init (prefs, prefs->address_count, + "/apps/evolution/mail/display/address_count", + 1, G_CALLBACK (address_compress_count_changed)); prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset")); charset_menu_init (prefs); -- cgit