aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2006-06-07 15:04:44 +0800
committerSushma Rai <rsushma@src.gnome.org>2006-06-07 15:04:44 +0800
commita47f11a04b6acab3bcf40edd6f531d5d68c7f02a (patch)
tree99caa4eccc9cbd889b4dd67af0983d831f42b099 /plugins
parentf84ab028e9886048949b584ddf9dd704783c5178 (diff)
downloadgsoc2013-evolution-a47f11a04b6acab3bcf40edd6f531d5d68c7f02a.tar.gz
gsoc2013-evolution-a47f11a04b6acab3bcf40edd6f531d5d68c7f02a.tar.zst
gsoc2013-evolution-a47f11a04b6acab3bcf40edd6f531d5d68c7f02a.zip
Enabling the OK button only when the username is entered, fixes #317025.
svn path=/trunk/; revision=32086
Diffstat (limited to 'plugins')
-rw-r--r--plugins/exchange-operations/ChangeLog7
-rw-r--r--plugins/exchange-operations/exchange-folder-subscription.c20
2 files changed, 26 insertions, 1 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 67c016c76c..013f49c359 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-07 Sushma Rai <rsushma@novell.com>
+
+ * exchange-folder-subscription.c (create_folder_subscription_dialog):
+ Disabling the OK button and added a callback to change the sensitivity.
+ (user_name_entry_changed_callback): Call-back to enable OK button, on
+ entering username. Fixes #317025.
+
2006-05-11 Sankar P <psankar@novell.com>
* exchange-account-setup.c: (btn_chpass_clicked):
diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c
index babaa2bc95..122366d9fb 100644
--- a/plugins/exchange-operations/exchange-folder-subscription.c
+++ b/plugins/exchange-operations/exchange-folder-subscription.c
@@ -132,6 +132,18 @@ folder_name_entry_changed_callback (GtkEditable *editable,
}
static void
+user_name_entry_changed_callback (GtkEditable *editable, void *data)
+{
+ GtkDialog *dialog = GTK_DIALOG (data);
+ const char *user_name_text = gtk_entry_get_text (GTK_ENTRY (editable));
+
+ if (*user_name_text == '\0')
+ gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE);
+ else
+ gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);
+}
+
+static void
setup_server_option_menu (GladeXML *glade_xml, gchar *mail_account)
{
GtkWidget *widget;
@@ -263,7 +275,7 @@ create_folder_subscription_dialog (ExchangeAccount *account, gchar *fname)
{
ENameSelector *name_selector;
GladeXML *glade_xml;
- GtkWidget *dialog;
+ GtkWidget *dialog, *ok_button;
SubscriptionInfo *subscription_info;
subscription_info = g_new0 (SubscriptionInfo, 1);
@@ -281,6 +293,12 @@ create_folder_subscription_dialog (ExchangeAccount *account, gchar *fname)
subscription_info->name_selector_widget = setup_name_selector (glade_xml, &name_selector);
subscription_info->name_selector = name_selector;
gtk_widget_grab_focus (subscription_info->name_selector_widget);
+
+ ok_button = glade_xml_get_widget (glade_xml, "button1");
+ gtk_widget_set_sensitive (ok_button, FALSE);
+ g_signal_connect (subscription_info->name_selector_widget, "changed",
+ G_CALLBACK (user_name_entry_changed_callback), dialog);
+
setup_server_option_menu (glade_xml, account->account_name);
setup_folder_name_combo (glade_xml, fname);
subscription_info->folder_name_entry = glade_xml_get_widget (glade_xml, "folder-name-entry");