Commit b6a70eb6 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Move SHOW_LIST into the const module

parent f63225ae
......@@ -131,9 +131,6 @@
cert_store = None
SHOW_LIST = ['offline', 'connecting', 'online', 'chat', 'away', 'xa', 'dnd',
'error']
# zeroconf account name
ZEROCONF_ACC_NAME = 'Local'
......
......@@ -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'
]
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment