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
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Bronko
gajim
Commits
cf182e23
Commit
cf182e23
authored
Dec 13, 2019
by
Daniel Brötzmann
Committed by
Philipp Hörist
Jan 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GroupChatInfo: Sort features consistently
parent
31e51e17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
39 deletions
+42
-39
gajim/gtk/groupchat_info.py
gajim/gtk/groupchat_info.py
+42
-39
No files found.
gajim/gtk/groupchat_info.py
View file @
cf182e23
...
...
@@ -33,30 +33,6 @@ from gajim.gtk.util import make_href_markup
MUC_FEATURES
=
{
'mam'
:
(
'feather-server-symbolic'
,
Q_
(
'?Group chat feature:Archiving'
),
_
(
'Messages are archived on the server'
)),
'muc_persistent'
:
(
'feather-hard-drive-symbolic'
,
Q_
(
'?Group chat feature:Persistent'
),
_
(
'This group chat persists '
'even if there are no participants'
)),
'muc_temporary'
:
(
'feather-clock-symbolic'
,
Q_
(
'?Group chat feature:Temporary'
),
_
(
'This group chat will be destroyed '
'once the last participant left'
)),
'muc_moderated'
:
(
'feather-mic-off-symbolic'
,
Q_
(
'?Group chat feature:Moderated'
),
_
(
'Participants entering this group chat need '
'to request permission to send messages'
)),
'muc_unmoderated'
:
(
'feather-mic-symbolic'
,
Q_
(
'?Group chat feature:Not Moderated'
),
_
(
'Participants entering this group chat are '
'allowed to send messages'
)),
'muc_open'
:
(
'feather-globe-symbolic'
,
Q_
(
'?Group chat feature:Open'
),
...
...
@@ -66,14 +42,6 @@ MUC_FEATURES = {
Q_
(
'?Group chat feature:Members Only'
),
_
(
'This group chat is restricted '
'to members only'
)),
'muc_public'
:
(
'feather-eye-symbolic'
,
Q_
(
'?Group chat feature:Public'
),
_
(
'Group chat can be found via search'
)),
'muc_hidden'
:
(
'feather-eye-off-symbolic'
,
Q_
(
'?Group chat feature:Hidden'
),
_
(
'This group chat can not be found via search'
)),
'muc_nonanonymous'
:
(
'feather-shield-off-symbolic'
,
Q_
(
'?Group chat feature:Not Anonymous'
),
...
...
@@ -83,6 +51,24 @@ MUC_FEATURES = {
'feather-shield-symbolic'
,
Q_
(
'?Group chat feature:Semi-Anonymous'
),
_
(
'Only moderators can see your XMPP address'
)),
'muc_moderated'
:
(
'feather-mic-off-symbolic'
,
Q_
(
'?Group chat feature:Moderated'
),
_
(
'Participants entering this group chat need '
'to request permission to send messages'
)),
'muc_unmoderated'
:
(
'feather-mic-symbolic'
,
Q_
(
'?Group chat feature:Not Moderated'
),
_
(
'Participants entering this group chat are '
'allowed to send messages'
)),
'muc_public'
:
(
'feather-eye-symbolic'
,
Q_
(
'?Group chat feature:Public'
),
_
(
'Group chat can be found via search'
)),
'muc_hidden'
:
(
'feather-eye-off-symbolic'
,
Q_
(
'?Group chat feature:Hidden'
),
_
(
'This group chat can not be found via search'
)),
'muc_passwordprotected'
:
(
'feather-lock-symbolic'
,
Q_
(
'?Group chat feature:Password Required'
),
...
...
@@ -93,6 +79,20 @@ MUC_FEATURES = {
Q_
(
'?Group chat feature:No Password Required'
),
_
(
'This group chat does not require '
'a password upon entry'
)),
'muc_persistent'
:
(
'feather-hard-drive-symbolic'
,
Q_
(
'?Group chat feature:Persistent'
),
_
(
'This group chat persists '
'even if there are no participants'
)),
'muc_temporary'
:
(
'feather-clock-symbolic'
,
Q_
(
'?Group chat feature:Temporary'
),
_
(
'This group chat will be destroyed '
'once the last participant left'
)),
'mam'
:
(
'feather-server-symbolic'
,
Q_
(
'?Group chat feature:Archiving'
),
_
(
'Messages are archived on the server'
)),
}
...
...
@@ -211,13 +211,16 @@ class GroupChatInfoScrolled(Gtk.ScrolledWindow):
features
.
append
(
'mam'
)
row
=
10
for
feature
in
features
:
icon
,
name
,
tooltip
=
MUC_FEATURES
.
get
(
feature
,
(
None
,
None
,
None
))
if
icon
is
None
:
continue
grid
.
attach
(
self
.
_get_feature_icon
(
icon
,
tooltip
),
0
,
row
,
1
,
1
)
grid
.
attach
(
self
.
_get_feature_label
(
name
),
1
,
row
,
1
,
1
)
row
+=
1
for
feature
in
MUC_FEATURES
:
if
feature
in
features
:
icon
,
name
,
tooltip
=
MUC_FEATURES
.
get
(
feature
,
(
None
,
None
,
None
))
if
icon
is
None
:
continue
grid
.
attach
(
self
.
_get_feature_icon
(
icon
,
tooltip
),
0
,
row
,
1
,
1
)
grid
.
attach
(
self
.
_get_feature_label
(
name
),
1
,
row
,
1
,
1
)
row
+=
1
grid
.
show_all
()
@
staticmethod
...
...
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