aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/google-account-setup
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-11-24 13:14:44 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-24 13:14:44 +0800
commit4f4615a46d5ba518c1e6a0c2412b1edf1e268d99 (patch)
tree828acaa7b76aa12a490a3238b0ec4a7086b8be16 /plugins/google-account-setup
parent076b7c45131482b87d18963d34d035435491ee8d (diff)
downloadgsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar.gz
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar.bz2
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar.lz
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar.xz
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar.zst
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.zip
Merge revisions 36737:36810 from trunk.
svn path=/branches/kill-bonobo/; revision=36811
Diffstat (limited to 'plugins/google-account-setup')
-rw-r--r--plugins/google-account-setup/ChangeLog15
-rw-r--r--plugins/google-account-setup/google-contacts-source.c12
-rw-r--r--plugins/google-account-setup/google-source.c19
3 files changed, 42 insertions, 4 deletions
diff --git a/plugins/google-account-setup/ChangeLog b/plugins/google-account-setup/ChangeLog
index 84badcf745..a59a5aad19 100644
--- a/plugins/google-account-setup/ChangeLog
+++ b/plugins/google-account-setup/ChangeLog
@@ -1,3 +1,18 @@
+2008-11-07 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fix for bug #559518
+
+ * google-source.c: (retrieve_list_clicked),
+ (retrieve_list_sensitize), (plugin_google): Desensitizes the button
+ when the username field is blank.
+
+2008-11-06 Bharath Acharya <abharath@novell.com>
+
+ ** Fix for bug #557726
+
+ * google-contacts-source.c: (destroy_ui_data),
+ (plugin_google_contacts): Destroy the widgets created by this group.
+
2008-09-24 Philip Withnall <philip@tecnocode.co.uk>
** Fixes bug #553479
diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c
index 3220933098..b33ac86856 100644
--- a/plugins/google-account-setup/google-contacts-source.c
+++ b/plugins/google-account-setup/google-contacts-source.c
@@ -218,6 +218,12 @@ on_interval_combo_changed (GtkComboBox *combo, gpointer user_data)
g_free (value_string);
}
+static void
+destroy_ui_data(gpointer data)
+{
+ gtk_widget_destroy((GtkWidget *)data);
+}
+
GtkWidget *
plugin_google_contacts (EPlugin *epl,
EConfigHookItemFactoryData *data)
@@ -254,6 +260,9 @@ plugin_google_contacts (EPlugin *epl,
base_uri = e_source_group_peek_base_uri (group);
+ g_object_set_data_full (G_OBJECT (epl), "widget", NULL,
+ (GDestroyNotify)gtk_widget_destroy);
+
if (strcmp (base_uri, "google://")) {
return NULL;
}
@@ -337,6 +346,9 @@ plugin_google_contacts (EPlugin *epl,
g_object_set_data (G_OBJECT (interval_sb), "interval-combo", interval_combo);
g_object_set_data (G_OBJECT (interval_combo), "interval-sb", interval_sb);
+
+ g_object_set_data_full(G_OBJECT(epl), "widget", vbox2,
+ destroy_ui_data);
g_signal_connect (G_OBJECT (username_entry), "changed",
G_CALLBACK (on_username_entry_changed),
source);
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
index 772d8a771a..dd86d1723b 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -435,10 +435,7 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
g_return_if_fail (source != NULL);
username = e_source_get_property (source, "username");
- if (!username || !*username) {
- claim_error (parent, _("Please enter user name first."));
- return;
- }
+ g_return_if_fail (username != NULL && *username != '\0');
tmp = g_strdup_printf (_("Enter password for user %s to access list of subscribed calendars."), username);
password = e_passwords_ask_password (_("Enter password"), "Calendar", "", tmp,
@@ -553,6 +550,18 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
g_object_unref (service);
}
+static void
+retrieve_list_sensitize (GtkEntry *username_entry,
+ GtkWidget *button)
+{
+ const gchar *text;
+ gboolean sensitive;
+
+ text = gtk_entry_get_text (username_entry);
+ sensitive = (text != NULL && *text != '\0');
+ gtk_widget_set_sensitive (button, sensitive);
+}
+
GtkWidget *
plugin_google (EPlugin *epl,
EConfigHookItemFactoryData *data)
@@ -727,8 +736,10 @@ plugin_google (EPlugin *epl,
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
label = gtk_button_new_with_mnemonic (_("Retrieve _list"));
g_signal_connect (label, "clicked", G_CALLBACK (retrieve_list_clicked), combo);
+ g_signal_connect (user, "changed", G_CALLBACK (retrieve_list_sensitize), label);
g_object_set_data (G_OBJECT (label), "ESource", source);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+ gtk_widget_set_sensitive (label, FALSE);
gtk_widget_show_all (hbox);
gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row + 4, row + 5, GTK_FILL | GTK_EXPAND, 0, 0, 0);