Daniel Brötzmann pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/gtk/contact_info.py
    ... ... @@ -243,6 +243,10 @@ def _query_device(self, contact):
    243 243
                 'status': contact.show,
    
    244 244
                 'message': contact.status
    
    245 245
             }
    
    246
    +        if not contact.is_pm_contact:
    
    247
    +            self._devices[contact.jid.resource]['priority'] = str(
    
    248
    +                contact.priority)
    
    249
    +
    
    246 250
             self._rebuild_devices_grid()
    
    247 251
     
    
    248 252
             jid = contact.jid
    
    ... ... @@ -293,8 +297,7 @@ def _rebuild_devices_grid(self):
    293 297
             self._ui.devices_stack.set_visible_child_name('devices')
    
    294 298
             self._devices_grid.clear()
    
    295 299
             for key, client in self._devices.items():
    
    296
    -            if not self.contact.is_pm_contact:
    
    297
    -                self._devices_grid.add_header(_('Device "%s"') % key)
    
    300
    +            self._devices_grid.add_header(_('Device "%s"') % key)
    
    298 301
     
    
    299 302
                 if client.get('status'):
    
    300 303
                     self._devices_grid.add_value(
    
    ... ... @@ -302,6 +305,9 @@ def _rebuild_devices_grid(self):
    302 305
                 if client.get('message'):
    
    303 306
                     self._devices_grid.add_value(
    
    304 307
                         _('Status Message'), client['message'])
    
    308
    +            if client.get('priority'):
    
    309
    +                self._devices_grid.add_value(
    
    310
    +                    _('Priority'), client['priority'])
    
    305 311
                 if client.get('client'):
    
    306 312
                     self._devices_grid.add_value(
    
    307 313
                         _('Software'), client['client'])
    

  • gajim/gtk/tooltips.py
    ... ... @@ -204,7 +204,7 @@ def _add_resources(self, contact):
    204 204
                 resource_label.set_xalign(0)
    
    205 205
                 resource_label.set_ellipsize(Pango.EllipsizeMode.END)
    
    206 206
                 resource_label.set_max_width_chars(30)
    
    207
    -            resource_label.set_text(f'{resource_string} ({resource.priority})')
    
    207
    +            resource_label.set_text(resource_string)
    
    208 208
     
    
    209 209
                 base_box = Gtk.Box(spacing=6)
    
    210 210
                 base_box.add(show_image)