# HG changeset patch # User Sean Egan # Date 1127258903 0 # Node ID 5909ea4e7746c115529656b07d71c7fdb6f9a76c # Parent 19941a47405c0ea8af80662c8692eb3af21d6993 [gaim-migrate @ 13823] When a login error (wants_to_die) occurs, informs the user with gaim_notify_error and disables the account. This way, it won't try reconnecting over and over again with the wrong password while the user doesn't know what's happening. committer: Tailor Script diff -r 19941a47405c -r 5909ea4e7746 src/gtkconn.c --- a/src/gtkconn.c Tue Sep 20 22:08:40 2005 +0000 +++ b/src/gtkconn.c Tue Sep 20 23:28:23 2005 +0000 @@ -167,11 +167,33 @@ if (!listAccount) accountReconnecting = g_slist_prepend(accountReconnecting, account); - } else if (info != NULL) { - g_hash_table_remove(hash, account); - - if (listAccount) - accountReconnecting = g_slist_delete_link(accountReconnecting, listAccount); + } else { + char *p, *s, *n=NULL ; + if (info != NULL) + g_hash_table_remove(hash, account); + + if (listAccount) + accountReconnecting = g_slist_delete_link(accountReconnecting, listAccount); + + if (gaim_account_get_alias(account)) { + n = g_strdup_printf("%s (%s) (%s)", + gaim_account_get_username(account), + gaim_account_get_alias(account), + gaim_account_get_protocol_name(account)); + } else { + n = g_strdup_printf("%s (%s)", + gaim_account_get_username(account), + gaim_account_get_protocol_name(account)); + } + + p = g_strdup_printf(_("%s could not connect"), n); + s = g_strdup_printf(_("%s was unable to connect do to an error. %s The account has been disabled. " + "Correct the error and reenable to account to connect."), n, text); + gaim_notify_error(NULL, NULL, p, s); + g_free(p); + g_free(s); + g_free(n); + gaim_account_set_enabled(account, GAIM_GTK_UI, FALSE); } }