Commit cf182e23 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

GroupChatInfo: Sort features consistently

parent 31e51e17
Pipeline #4817 passed with stages
in 2 minutes and 58 seconds
......@@ -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
......
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