# HG changeset patch # User Mark Doliner # Date 1058121810 0 # Node ID d1d8e70cf33d1afeaf994aebb29ff74ecb89ae10 # Parent 0922bb7a7bbcfe04d12c37607a8580e4941a5404 [gaim-migrate @ 6572] Now when the password field is blank and gaim prompts you for the pass, the gc is now destroyed at that time and then recreated later. This feels more correct to me, I dunno. This means that you can have multiple "enter your password" dialog windows for the same account, though. I don't think this is too big of a deal, so I figured it would be ok. committer: Tailor Script diff -r 0922bb7a7bbc -r d1d8e70cf33d src/account.c --- a/src/account.c Sun Jul 13 18:33:25 2003 +0000 +++ b/src/account.c Sun Jul 13 18:43:30 2003 +0000 @@ -175,7 +175,6 @@ GaimConnection *gc; g_return_val_if_fail(account != NULL, NULL); - g_return_val_if_fail(!gaim_account_is_connected(account), NULL); if (gaim_account_get_connection(account) != NULL) return NULL; diff -r 0922bb7a7bbc -r d1d8e70cf33d src/connection.c --- a/src/connection.c Sun Jul 13 18:33:25 2003 +0000 +++ b/src/connection.c Sun Jul 13 18:43:30 2003 +0000 @@ -85,18 +85,11 @@ g_free(gc); } -static void request_pass_ok_cb(GaimConnection *gc, const char *entry) +static void request_pass_ok_cb(GaimAccount *account, const char *entry) { - GaimAccount *account = gaim_connection_get_account(gc); - gaim_account_set_password(account, (*entry != '\0') ? entry : NULL); - gaim_connection_connect(gc); -} - -static void request_pass_cancel_cb(GaimConnection *gc, const char *entry) -{ - gaim_connection_destroy(gc); + gaim_account_connect(account); } @@ -130,7 +123,8 @@ gaim_request_input(gc, NULL, _("Please enter your password"), NULL, NULL, FALSE, TRUE, _("OK"), G_CALLBACK(request_pass_ok_cb), - _("Cancel"), G_CALLBACK(request_pass_cancel_cb), gc); + _("Cancel"), NULL, account); + gaim_connection_destroy(gc); return; } diff -r 0922bb7a7bbc -r d1d8e70cf33d src/gtkrequest.c --- a/src/gtkrequest.c Sun Jul 13 18:33:25 2003 +0000 +++ b/src/gtkrequest.c Sun Jul 13 18:43:30 2003 +0000 @@ -79,7 +79,7 @@ if (id < data->cb_count && data->cbs[id] != NULL) ((GaimRequestInputCb)data->cbs[id])(data->user_data, value); - else + else if (data->cbs[1] != NULL) ((GaimRequestInputCb)data->cbs[1])(data->user_data, value); gaim_request_close(GAIM_REQUEST_INPUT, data);