diff --git a/gajim/common/app.py b/gajim/common/app.py index 531d6bda1d55e1b7e95ae6630341158cabf990f5..b8f1994534cab0795d738993f835291f69a1e328 100644 --- a/gajim/common/app.py +++ b/gajim/common/app.py @@ -131,9 +131,6 @@ cert_store = None -SHOW_LIST = ['offline', 'connecting', 'online', 'chat', 'away', 'xa', 'dnd', - 'error'] - # zeroconf account name ZEROCONF_ACC_NAME = 'Local' diff --git a/gajim/common/const.py b/gajim/common/const.py index 7981e2916f8f4e5052753f2cd075ca8478e2f52e..3a169d6732a669c54c1f01476750a177fd6932c9 100644 --- a/gajim/common/const.py +++ b/gajim/common/const.py @@ -954,3 +954,15 @@ def is_error(self): Namespace.JINGLE_IBB, Namespace.AVATAR_METADATA + '+notify', ] + + +SHOW_LIST = [ + 'offline', + 'connecting', + 'online', + 'chat', + 'away', + 'xa', + 'dnd', + 'error' +] diff --git a/gajim/common/helpers.py b/gajim/common/helpers.py index 7593da5c36270315c65004530453f99dcd6c9a27..449b6e6f8de88be8c1d32c6a48b159e0dddb375d 100644 --- a/gajim/common/helpers.py +++ b/gajim/common/helpers.py @@ -84,6 +84,7 @@ from gajim.common.const import URIType from gajim.common.const import URIAction from gajim.common.const import GIO_TLS_ERRORS +from gajim.common.const import SHOW_LIST from gajim.common.structs import URI if app.is_installed('PYCURL'): @@ -603,10 +604,10 @@ def get_global_show(): 'sync_with_global_status'): continue status = get_connection_status(account) - index = app.SHOW_LIST.index(status) + index = SHOW_LIST.index(status) if index > maxi: maxi = index - return app.SHOW_LIST[maxi] + return SHOW_LIST[maxi] def get_global_status_message(): maxi = 0 @@ -615,13 +616,12 @@ def get_global_status_message(): 'sync_with_global_status'): continue status = app.connections[account].status - index = app.SHOW_LIST.index(status) + index = SHOW_LIST.index(status) if index > maxi: maxi = index status_message = app.connections[account].status_message return status_message - def statuses_unified(): """ Test if all statuses are the same