Mercurial > pidgin.yaz
comparison src/gtkconn.c @ 11559:5909ea4e7746
[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 <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 20 Sep 2005 23:28:23 +0000 |
parents | 16796e09b9c1 |
children | c3bbfca00e85 |
comparison
equal
deleted
inserted
replaced
11558:19941a47405c | 11559:5909ea4e7746 |
---|---|
165 } | 165 } |
166 info->timeout = g_timeout_add(info->delay, do_signon, account); | 166 info->timeout = g_timeout_add(info->delay, do_signon, account); |
167 | 167 |
168 if (!listAccount) | 168 if (!listAccount) |
169 accountReconnecting = g_slist_prepend(accountReconnecting, account); | 169 accountReconnecting = g_slist_prepend(accountReconnecting, account); |
170 } else if (info != NULL) { | 170 } else { |
171 g_hash_table_remove(hash, account); | 171 char *p, *s, *n=NULL ; |
172 | 172 if (info != NULL) |
173 if (listAccount) | 173 g_hash_table_remove(hash, account); |
174 accountReconnecting = g_slist_delete_link(accountReconnecting, listAccount); | 174 |
175 if (listAccount) | |
176 accountReconnecting = g_slist_delete_link(accountReconnecting, listAccount); | |
177 | |
178 if (gaim_account_get_alias(account)) { | |
179 n = g_strdup_printf("%s (%s) (%s)", | |
180 gaim_account_get_username(account), | |
181 gaim_account_get_alias(account), | |
182 gaim_account_get_protocol_name(account)); | |
183 } else { | |
184 n = g_strdup_printf("%s (%s)", | |
185 gaim_account_get_username(account), | |
186 gaim_account_get_protocol_name(account)); | |
187 } | |
188 | |
189 p = g_strdup_printf(_("%s could not connect"), n); | |
190 s = g_strdup_printf(_("%s was unable to connect do to an error. %s The account has been disabled. " | |
191 "Correct the error and reenable to account to connect."), n, text); | |
192 gaim_notify_error(NULL, NULL, p, s); | |
193 g_free(p); | |
194 g_free(s); | |
195 g_free(n); | |
196 gaim_account_set_enabled(account, GAIM_GTK_UI, FALSE); | |
175 } | 197 } |
176 } | 198 } |
177 | 199 |
178 static GaimConnectionUiOps conn_ui_ops = | 200 static GaimConnectionUiOps conn_ui_ops = |
179 { | 201 { |