gajim-remote get_status without account now return global status

This commit is contained in:
Yann Leboulanger 2005-12-14 17:55:03 +00:00
parent 51dbb1398e
commit da873080af
1 changed files with 7 additions and 7 deletions

View File

@ -34,6 +34,7 @@ import systray
from common import exceptions
from common import gajim
from common import helpers
from time import time
from common import i18n
from dialogs import AddNewContactWindow
@ -130,11 +131,10 @@ class SignalObject(DbusPrototype):
unless account is given'''
account = self._get_real_arguments(args, 1)[0]
accounts = gajim.contacts.keys()
if not account and len(accounts) == 1:
# if there is only one account in roster, take it as default
# if user did not ask for account
account = accounts[0] # FIXME: get global status, not the status from first (ask Yann)
if account: # return show for this account (either first or the specified)
if not account:
# If user did not ask for account, returns the global status
return helpers.get_global_show()
# return show for the given account
index = gajim.connections[account].connected
return STATUS_LIST[index]