Commit ca2a4806 authored by Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot

Stop displaying priority in the roster and vcard views

Priority is a remnant of the pre-carbons world, where it would be used
by the server of the recipient to choose which resource to route an
incoming message to, when addressed to the bare JID.

Nowadays carbons is widespread enough that it makes sense to stop
displaying this old bit of information.
parent e28a70ac
Pipeline #5611 passed with stages
in 2 minutes and 49 seconds
......@@ -163,29 +163,6 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="resource_prio_label_eventbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="visible_window">False</property>
<child>
<object class="GtkLabel" id="resource_prio_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="margin_left">5</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="client_name_version_label">
<property name="visible">True</property>
......
......@@ -117,29 +117,6 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="resource_prio_label_eventbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_window">False</property>
<child>
<object class="GtkLabel" id="resource_prio_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="xpad">5</property>
<property name="ypad">5</property>
<property name="selectable">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="status_label_eventbox">
<property name="visible">True</property>
......
......@@ -41,8 +41,7 @@ def build_resources_submenu(contacts, account, action, room_jid=None,
sub_menu = Gtk.Menu()
for c in contacts:
item = Gtk.MenuItem.new_with_label(
'%s (%s)' % (c.resource, str(c.priority)))
item = Gtk.MenuItem.new_with_label(c.resource)
sub_menu.append(item)
if action == roster.on_invite_to_room: # pylint: disable=comparison-with-callable
item.connect('activate', action, [(c, account)], room_jid,
......
......@@ -377,10 +377,7 @@ class VcardWindow(EventHelper):
tt_text = _("There is no pending subscription request.")
ask_label.set_tooltip_text(tt_text)
resources = '%s (%s)' % (self.contact.resource, str(
self.contact.priority))
uf_resources = self.contact.resource + _(' resource with priority ')\
+ str(self.contact.priority)
resources = [self.contact.resource]
if not self.contact.status:
self.contact.status = ''
......@@ -426,10 +423,7 @@ class VcardWindow(EventHelper):
if contact_list:
for c in contact_list:
if c.resource != self.contact.resource:
resources += '\n%s (%s)' % (c.resource,
str(c.priority))
uf_resources += '\n' + c.resource + \
_(' resource with priority ') + str(c.priority)
resources.append(c.resource)
if c.show not in ('offline', 'error'):
jid = c.get_full_jid()
con.get_module('SoftwareVersion').request_software_version(
......@@ -441,11 +435,7 @@ class VcardWindow(EventHelper):
self.time_info[i] = {'resource': c.resource, 'time': ''}
i += 1
self.xml.get_object('resource_prio_label').set_text(resources)
resource_prio_label_eventbox = self.xml.get_object(
'resource_prio_label_eventbox')
resource_prio_label_eventbox.set_tooltip_text(uf_resources)
self.xml.get_object('resource_prio_label').set_text('\n'.join(resources))
self.fill_status_label()
if self.gc_contact:
......@@ -526,18 +516,11 @@ class ZeroconfVcardWindow:
'</span></b>')
self.xml.get_object('local_jid_label').set_text(self.contact.jid)
resources = '%s (%s)' % (self.contact.resource, str(
self.contact.priority))
uf_resources = self.contact.resource + _(' resource with priority ')\
+ str(self.contact.priority)
resources = self.contact.resource
if not self.contact.status:
self.contact.status = ''
self.xml.get_object('resource_prio_label').set_text(resources)
resource_prio_label_eventbox = self.xml.get_object(
'resource_prio_label_eventbox')
resource_prio_label_eventbox.set_tooltip_text(uf_resources)
self.fill_status_label()
def fill_personal_page(self):
......
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