From 05b9776f7ecd3f7040c3c1a15dd6c82bc47740c7 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 14 Jun 2004 13:35:14 +0000 Subject: the check button label has now opposite meaning (after UI changes), call 2004-06-14 Radek Doulik * em-mailer-prefs.c (em_mailer_prefs_construct): the check button label has now opposite meaning (after UI changes), call toggle_button_init with 'not' parameter set to TRUE (toggle_button_toggled_not): new helper function, sets negative value to gconf bool key svn path=/trunk/; revision=26334 --- mail/ChangeLog | 8 ++++++++ mail/em-mailer-prefs.c | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index e453114742..ed8151e637 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2004-06-14 Radek Doulik + + * em-mailer-prefs.c (em_mailer_prefs_construct): the check button + label has now opposite meaning (after UI changes), call + toggle_button_init with 'not' parameter set to TRUE + (toggle_button_toggled_not): new helper function, sets negative + value to gconf bool key + 2004-06-14 Not Zed * mail-vfolder.c (rule_changed): don't check rule->source, its diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index ebb1742d05..0232ff6707 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -493,6 +493,15 @@ toggle_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs) gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL); } +static void +toggle_button_toggled_not (GtkToggleButton *toggle, EMMailerPrefs *prefs) +{ + const char *key; + + key = g_object_get_data ((GObject *) toggle, "key"); + gconf_client_set_bool (prefs->gconf, key, !gtk_toggle_button_get_active (toggle), NULL); +} + static void custom_font_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs) { @@ -952,9 +961,9 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) G_CALLBACK (toggle_button_toggled)); prefs->sa_local_tests_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSALocalTestsOnly")); - toggle_button_init (prefs, prefs->sa_local_tests_only, FALSE, + toggle_button_init (prefs, prefs->sa_local_tests_only, TRUE, "/apps/evolution/mail/junk/sa/local_only", - G_CALLBACK (toggle_button_toggled)); + G_CALLBACK (toggle_button_toggled_not)); } GtkWidget * -- cgit v1.2.3