# HG changeset patch # User Stu Tomlinson # Date 1133633259 0 # Node ID ae190d00b06d73cc018b0d6778d6cd1ec13ab69c # Parent 01f689cd7b49f30557800a24f038e6b12cb0877d [gaim-migrate @ 14608] This ensures the "account-status-changed" signal is always emitted, which makes the per-account status selectors show the correct status more accurately. committer: Tailor Script diff -r 01f689cd7b49 -r ae190d00b06d src/prpl.c --- a/src/prpl.c Sat Dec 03 18:00:01 2005 +0000 +++ b/src/prpl.c Sat Dec 03 18:07:39 2005 +0000 @@ -275,17 +275,13 @@ g_slist_free(list); } -void -gaim_prpl_change_account_status(GaimAccount *account, +static void +do_prpl_change_account_status(GaimAccount *account, GaimStatus *old_status, GaimStatus *new_status) { GaimPlugin *prpl; GaimPluginProtocolInfo *prpl_info; - g_return_if_fail(account != NULL); - g_return_if_fail(old_status != NULL); - g_return_if_fail(new_status != NULL); - if (gaim_status_is_online(new_status) && gaim_account_is_disconnected(account)) { @@ -318,11 +314,23 @@ if (prpl_info->set_status != NULL) { prpl_info->set_status(account, new_status); - gaim_signal_emit(gaim_accounts_get_handle(), "account-status-changed", - account, old_status, new_status); } } +void +gaim_prpl_change_account_status(GaimAccount *account, + GaimStatus *old_status, GaimStatus *new_status) +{ + g_return_if_fail(account != NULL); + g_return_if_fail(old_status != NULL); + g_return_if_fail(new_status != NULL); + + do_prpl_change_account_status(account, old_status, new_status); + + gaim_signal_emit(gaim_accounts_get_handle(), "account-status-changed", + account, old_status, new_status); +} + GList * gaim_prpl_get_statuses(GaimAccount *account, GaimPresence *presence) {