Mercurial > pidgin.yaz
comparison pidgin/gtkconn.c @ 21369:318b3f5d1516
Call pidgin_blist_update_account_error_state in response to
account-error-changed rather than in various places in gtkconn.c.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sat, 27 Oct 2007 17:45:05 +0000 |
parents | ba41f2a60253 |
children | 2b5f1b47b1ba |
comparison
equal
deleted
inserted
replaced
21368:089fc89b6996 | 21369:318b3f5d1516 |
---|---|
80 if (gtkblist != NULL) | 80 if (gtkblist != NULL) |
81 pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox), | 81 pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox), |
82 (purple_connections_get_connecting() != NULL)); | 82 (purple_connections_get_connecting() != NULL)); |
83 | 83 |
84 g_hash_table_remove(auto_reconns, account); | 84 g_hash_table_remove(auto_reconns, account); |
85 | |
86 pidgin_blist_update_account_error_state(account, NULL); | |
87 } | 85 } |
88 | 86 |
89 static void | 87 static void |
90 pidgin_connection_disconnected(PurpleConnection *gc) | 88 pidgin_connection_disconnected(PurpleConnection *gc) |
91 { | 89 { |
147 GList *list; | 145 GList *list; |
148 | 146 |
149 account = purple_connection_get_account(gc); | 147 account = purple_connection_get_account(gc); |
150 info = g_hash_table_lookup(auto_reconns, account); | 148 info = g_hash_table_lookup(auto_reconns, account); |
151 | 149 |
152 pidgin_blist_update_account_error_state(account, text); | |
153 if (!purple_connection_error_is_fatal (reason)) { | 150 if (!purple_connection_error_is_fatal (reason)) { |
154 if (info == NULL) { | 151 if (info == NULL) { |
155 info = g_new0(PidginAutoRecon, 1); | 152 info = g_new0(PidginAutoRecon, 1); |
156 g_hash_table_insert(auto_reconns, account, info); | 153 g_hash_table_insert(auto_reconns, account, info); |
157 info->delay = g_random_int_range(INITIAL_RECON_DELAY_MIN, INITIAL_RECON_DELAY_MAX); | 154 info->delay = g_random_int_range(INITIAL_RECON_DELAY_MIN, INITIAL_RECON_DELAY_MAX); |
299 | 296 |
300 static void | 297 static void |
301 account_removed_cb(PurpleAccount *account, gpointer user_data) | 298 account_removed_cb(PurpleAccount *account, gpointer user_data) |
302 { | 299 { |
303 g_hash_table_remove(auto_reconns, account); | 300 g_hash_table_remove(auto_reconns, account); |
304 | |
305 pidgin_blist_update_account_error_state(account, NULL); | |
306 } | 301 } |
307 | 302 |
308 | 303 |
309 /************************************************************************** | 304 /************************************************************************** |
310 * GTK+ connection glue | 305 * GTK+ connection glue |