aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations/exchange-account-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/exchange-operations/exchange-account-setup.c')
-rw-r--r--plugins/exchange-operations/exchange-account-setup.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c
index daae054a2f..84e08e5d4e 100644
--- a/plugins/exchange-operations/exchange-account-setup.c
+++ b/plugins/exchange-operations/exchange-account-setup.c
@@ -113,38 +113,21 @@ static void
btn_chpass_clicked (GtkButton *button, gpointer data)
{
ExchangeAccount *account;
- GSList *acclist;
char *old_password, *new_password;
-#if 0
- if (!exchange_global_config_listener) {
- g_print ("FATAL: Exchange global config listener is not initialized.\n");
- return;
- }
- else {
- g_print ("Exchange global config listener is initialized sucessfully.\n");
- }
-#endif
- acclist = exchange_config_listener_get_accounts (exchange_global_config_listener);
- /* FIXME: For now, we have only one account in the list.
- Find a way to handle multiple accounts.
- */
- if (!acclist)
- return;
- account = acclist->data;
+ account = exchange_operations_get_exchange_account ();
old_password = exchange_account_get_password (account);
if (!old_password) {
- printf ("could not fetch old password\n");
+ g_print ("Could not fetch old password\n");
return;
}
-
+ new_password = exchange_get_new_password (old_password, TRUE);
g_print ("Current password is \"%s\"\n", old_password);
- //new_password = exchange_get_new_password (old_password, TRUE);
exchange_account_set_password (account, old_password, new_password);
-// g_free (old_password);
-// g_free (new_password);
+ g_free (old_password);
+ g_free (new_password);
}
static void