comparison src/account.c @ 9019:db1dc2d02020

[gaim-migrate @ 9795] Fiddled with a few small things 1) Added a GAIM_CONNECTION_IS_CONNECTED(gc) #define to connection.h 2) In the functions that build the Account Actions and Plugin Actions menus, I didn't think the comment "plugin and gc will be set from the counting loop already" was accurate (but it might be, becase it seemed like the account actions menu worked with one account online). So I made sure plugin and gc are set to what they should be. 3) Changed gaim_account_is_connected() to use GAIM_CONNECTION_IS_CONNECTED Previously gaim_account_is_connected() would return true for gc's that were "GAIM_CONNECTING." Now it only returns true for gc's that are "GAIM_CONNECTED." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 22 May 2004 23:08:27 +0000
parents beb7be215db3
children 3d30ed8dc7b0
comparison
equal deleted inserted replaced
9018:bb168141eb5f 9019:db1dc2d02020
675 } 675 }
676 676
677 gboolean 677 gboolean
678 gaim_account_is_connected(const GaimAccount *account) 678 gaim_account_is_connected(const GaimAccount *account)
679 { 679 {
680 GaimConnection *gc;
681
680 g_return_val_if_fail(account != NULL, FALSE); 682 g_return_val_if_fail(account != NULL, FALSE);
681 683
682 return (account->gc != NULL && 684 gc = gaim_account_get_connection(account);
683 gaim_connection_get_state(account->gc) != GAIM_DISCONNECTED); 685
686 return ((gc != NULL) && GAIM_CONNECTION_IS_CONNECTED(gc));
684 } 687 }
685 688
686 const char * 689 const char *
687 gaim_account_get_username(const GaimAccount *account) 690 gaim_account_get_username(const GaimAccount *account)
688 { 691 {