From a7120007fd48336faeb2011d5f74dc7206d637eb Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Mon, 18 Jul 2005 11:30:19 +0000 Subject: Handle the case of user clicking "Cancel" button in "Change Password" 2005-07-18 Praveen Kumar * exchange-account-setup.c (btn_chpass_clicked) : Handle the case of user clicking "Cancel" button in "Change Password" dialog. Fixes bug 310356. (org_gnome_exchange_setting) : Removed the duplicate signal handler registered for "Change Password" button. svn path=/trunk/; revision=29790 --- plugins/exchange-operations/ChangeLog | 8 ++++++++ plugins/exchange-operations/exchange-account-setup.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index d9231af4df..83a3a65cb4 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,11 @@ +2005-07-18 Praveen Kumar + + * exchange-account-setup.c (btn_chpass_clicked) : Handle the case + of user clicking "Cancel" button in "Change Password" dialog. Fixes + bug 310356. + (org_gnome_exchange_setting) : Removed the duplicate signal handler + registered for "Change Password" button. + 2005-07-16 Sarfraaz Ahmed * exchange-ask-password.c : Removed. Is no longer being used diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c index 8985669589..8e7dd2e2e0 100644 --- a/plugins/exchange-operations/exchange-account-setup.c +++ b/plugins/exchange-operations/exchange-account-setup.c @@ -128,6 +128,10 @@ btn_chpass_clicked (GtkButton *button, gpointer data) return; } new_password = exchange_get_new_password (old_password, TRUE); + if (!new_password) { + /* "Cacel" button was hit */ + return; + } g_print ("Current password is \"%s\"\n", old_password); result = exchange_account_set_password (account, old_password, new_password); if (result != EXCHANGE_ACCOUNT_CONNECT_SUCCESS) @@ -329,7 +333,6 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) lbl_dass = (GtkLabel*) gtk_object_new (GTK_TYPE_LABEL, "label", _("Manage the delegate settings for Exchange account"), NULL); gtk_misc_set_alignment (GTK_MISC (lbl_dass), 0, 0.5); btn_dass = (GtkButton*) gtk_object_new (GTK_TYPE_BUTTON, "label", _("Delegation Assitant")); - gtk_signal_connect (GTK_OBJECT (btn_chpass), "clicked", G_CALLBACK (btn_chpass_clicked), NULL); gtk_signal_connect (GTK_OBJECT (btn_dass), "clicked", G_CALLBACK (btn_dass_clicked), NULL); /* Add items to the table */ gtk_table_attach_defaults (tbl_auth, GTK_WIDGET (lbl_chpass), 0, 1, 0, 1); -- cgit v1.2.3