Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Philipp Hörist
gajim
Commits
b6a70eb6
Commit
b6a70eb6
authored
Apr 28, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move SHOW_LIST into the const module
parent
f63225ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
gajim/common/app.py
gajim/common/app.py
+0
-3
gajim/common/const.py
gajim/common/const.py
+12
-0
gajim/common/helpers.py
gajim/common/helpers.py
+4
-4
No files found.
gajim/common/app.py
View file @
b6a70eb6
...
...
@@ -131,9 +131,6 @@
cert_store
=
None
SHOW_LIST
=
[
'offline'
,
'connecting'
,
'online'
,
'chat'
,
'away'
,
'xa'
,
'dnd'
,
'error'
]
# zeroconf account name
ZEROCONF_ACC_NAME
=
'Local'
...
...
gajim/common/const.py
View file @
b6a70eb6
...
...
@@ -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'
]
gajim/common/helpers.py
View file @
b6a70eb6
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment