Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
55ee06d0 by wurstsalat at 2021-12-07T22:52:33+01:00
ContactInfo: Show priority in Devices page
- - - - -
ea8ce6b1 by wurstsalat at 2021-12-07T22:54:34+01:00
RosterTooltip: Remove priority
- - - - -
2 changed files:
- gajim/gtk/contact_info.py
- gajim/gtk/tooltips.py
Changes:
=====================================
gajim/gtk/contact_info.py
=====================================
@@ -243,6 +243,10 @@ def _query_device(self, contact):
'status': contact.show,
'message': contact.status
}
+ if not contact.is_pm_contact:
+ self._devices[contact.jid.resource]['priority'] = str(
+ contact.priority)
+
self._rebuild_devices_grid()
jid = contact.jid
@@ -293,8 +297,7 @@ def _rebuild_devices_grid(self):
self._ui.devices_stack.set_visible_child_name('devices')
self._devices_grid.clear()
for key, client in self._devices.items():
- if not self.contact.is_pm_contact:
- self._devices_grid.add_header(_('Device "%s"') % key)
+ self._devices_grid.add_header(_('Device "%s"') % key)
if client.get('status'):
self._devices_grid.add_value(
@@ -302,6 +305,9 @@ def _rebuild_devices_grid(self):
if client.get('message'):
self._devices_grid.add_value(
_('Status Message'), client['message'])
+ if client.get('priority'):
+ self._devices_grid.add_value(
+ _('Priority'), client['priority'])
if client.get('client'):
self._devices_grid.add_value(
_('Software'), client['client'])
=====================================
gajim/gtk/tooltips.py
=====================================
@@ -204,7 +204,7 @@ def _add_resources(self, contact):
resource_label.set_xalign(0)
resource_label.set_ellipsize(Pango.EllipsizeMode.END)
resource_label.set_max_width_chars(30)
- resource_label.set_text(f'{resource_string} ({resource.priority})')
+ resource_label.set_text(resource_string)
base_box = Gtk.Box(spacing=6)
base_box.add(show_image)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/d725173e581c1761a00352ee5e8b0dbc684f2d4c...ea8ce6b181a1232469ec82d6d0955e6e88f2c9a0
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/d725173e581c1761a00352ee5e8b0dbc684f2d4c...ea8ce6b181a1232469ec82d6d0955e6e88f2c9a0
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits