diff options
Diffstat (limited to 'mail/em-mailer-prefs.c')
-rw-r--r-- | mail/em-mailer-prefs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index 26a68d0fc2..40b6188659 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -825,6 +825,13 @@ photo_toggle_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs) } static void +junk_book_lookup_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs) +{ + toggle_button_toggled (toggle, prefs); + gtk_widget_set_sensitive (GTK_WIDGET (prefs->junk_lookup_local_only), gtk_toggle_button_get_active (toggle)); +} + +static void custom_junk_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs) { toggle_button_toggled (toggle, prefs); @@ -1493,10 +1500,17 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) prefs->junk_header_add = (GtkButton *)glade_xml_get_widget (gui, "junk_header_add"); prefs->junk_header_remove = (GtkButton *)glade_xml_get_widget (gui, "junk_header_remove"); prefs->junk_book_lookup = (GtkToggleButton *)glade_xml_get_widget (gui, "lookup_book"); + prefs->junk_lookup_local_only = (GtkToggleButton *)glade_xml_get_widget (gui, "junk_lookup_local_only"); toggle_button_init (prefs, prefs->junk_book_lookup, FALSE, "/apps/evolution/mail/junk/lookup_addressbook", + G_CALLBACK (junk_book_lookup_button_toggled)); + + toggle_button_init (prefs, prefs->junk_lookup_local_only, FALSE, + "/apps/evolution/mail/junk/lookup_addressbook_local_only", G_CALLBACK (toggle_button_toggled)); + junk_book_lookup_button_toggled (prefs->junk_book_lookup, prefs); + prefs->junk_header_list_store = init_junk_tree ((GtkWidget *)prefs->junk_header_tree, prefs); toggle_button_init (prefs, prefs->junk_header_check, FALSE, "/apps/evolution/mail/junk/check_custom_header", |