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

GroupChatInfo: Sort features consistently

parent 31e51e17
...@@ -33,30 +33,6 @@ ...@@ -33,30 +33,6 @@
MUC_FEATURES = { 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': ( 'muc_open': (
'feather-globe-symbolic', 'feather-globe-symbolic',
Q_('?Group chat feature:Open'), Q_('?Group chat feature:Open'),
...@@ -66,14 +42,6 @@ ...@@ -66,14 +42,6 @@
Q_('?Group chat feature:Members Only'), Q_('?Group chat feature:Members Only'),
_('This group chat is restricted ' _('This group chat is restricted '
'to members only')), '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': ( 'muc_nonanonymous': (
'feather-shield-off-symbolic', 'feather-shield-off-symbolic',
Q_('?Group chat feature:Not Anonymous'), Q_('?Group chat feature:Not Anonymous'),
...@@ -83,6 +51,24 @@ ...@@ -83,6 +51,24 @@
'feather-shield-symbolic', 'feather-shield-symbolic',
Q_('?Group chat feature:Semi-Anonymous'), Q_('?Group chat feature:Semi-Anonymous'),
_('Only moderators can see your XMPP address')), _('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': ( 'muc_passwordprotected': (
'feather-lock-symbolic', 'feather-lock-symbolic',
Q_('?Group chat feature:Password Required'), Q_('?Group chat feature:Password Required'),
...@@ -93,6 +79,20 @@ ...@@ -93,6 +79,20 @@
Q_('?Group chat feature:No Password Required'), Q_('?Group chat feature:No Password Required'),
_('This group chat does not require ' _('This group chat does not require '
'a password upon entry')), '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 @@ def _add_features(self, features): ...@@ -211,13 +211,16 @@ def _add_features(self, features):
features.append('mam') features.append('mam')
row = 10 row = 10
for feature in features:
icon, name, tooltip = MUC_FEATURES.get(feature, (None, None, None)) for feature in MUC_FEATURES:
if icon is None: if feature in features:
continue icon, name, tooltip = MUC_FEATURES.get(feature,
grid.attach(self._get_feature_icon(icon, tooltip), 0, row, 1, 1) (None, None, None))
grid.attach(self._get_feature_label(name), 1, row, 1, 1) if icon is None:
row += 1 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() grid.show_all()
@staticmethod @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