evolution r36756 - branches/gnome-2-24/plugins/google-account-setup
- From: abharath svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36756 - branches/gnome-2-24/plugins/google-account-setup
- Date: Fri, 7 Nov 2008 05:26:57 +0000 (UTC)
Author: abharath
Date: Fri Nov 7 05:26:57 2008
New Revision: 36756
URL: http://svn.gnome.org/viewvc/evolution?rev=36756&view=rev
Log:
Committing on behalf of Matthew Barnes <mbarnes redhat com>
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.
Modified:
branches/gnome-2-24/plugins/google-account-setup/ChangeLog
branches/gnome-2-24/plugins/google-account-setup/google-source.c
Modified: branches/gnome-2-24/plugins/google-account-setup/google-source.c
==============================================================================
--- branches/gnome-2-24/plugins/google-account-setup/google-source.c (original)
+++ branches/gnome-2-24/plugins/google-account-setup/google-source.c Fri Nov 7 05:26:57 2008
@@ -435,10 +435,7 @@
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 @@
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 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]