From: Stu T. <nos...@us...> - 2005-12-03 18:07:50
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27834/src Modified Files: prpl.c Log Message: This ensures the "account-status-changed" signal is always emitted, which makes the per-account status selectors show the correct status more accurately. Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.160 retrieving revision 1.161 diff -u -d -p -r1.160 -r1.161 --- prpl.c 21 Nov 2005 01:56:13 -0000 1.160 +++ prpl.c 3 Dec 2005 18:07:39 -0000 1.161 @@ -275,17 +275,13 @@ gaim_prpl_got_user_status(GaimAccount *a 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 @@ gaim_prpl_change_account_status(GaimAcco 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) { |