[evolution] Bug #669295 - Choice made for 'setup Google contact/calendar' is not remembered



commit a5984501854e6625a92f6323cfef5aaea1225484
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 3 13:02:14 2012 +0200

    Bug #669295 - Choice made for 'setup Google contact/calendar' is not remembered

 mail/em-account-editor.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index a84691e..3713360 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]