From a5984501854e6625a92f6323cfef5aaea1225484 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 3 May 2012 13:02:14 +0200 Subject: Bug #669295 - Choice made for 'setup Google contact/calendar' is not remembered --- mail/em-account-editor.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index a84691e48b..37133605f4 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -4915,6 +4915,12 @@ emae_update_review_page_for_google (EMAccountEditor *emae) GtkWidget *container; GtkWidget *widget; gchar *markup; + gboolean can_contacts, can_calendar; + + can_contacts = !emae->priv->gcontacts || + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (emae->priv->gcontacts)); + can_calendar = !emae->priv->calendar || + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (emae->priv->calendar)); emae_destroy_widget (emae->priv->gcontacts); emae_destroy_widget (emae->priv->calendar); @@ -4935,14 +4941,14 @@ emae_update_review_page_for_google (EMAccountEditor *emae) widget = gtk_check_button_new_with_mnemonic ( _("Setup Google con_tacts with Evolution")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), can_contacts); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); emae->priv->gcontacts = widget; gtk_widget_show (widget); widget = gtk_check_button_new_with_mnemonic ( _("Setup Google ca_lendar with Evolution")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), can_calendar); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); emae->priv->calendar = widget; gtk_widget_show (widget); -- cgit v1.2.3