Skip to content
Snippets Groups Projects
Commit ac1b317f authored by jimpp's avatar jimpp
Browse files

roster-tooltip : Change lines order, resource after jid, gpg on the end (we don't care)

deleted hack to remove seconds, do not work with all locales (greek at least)
parent fd0a9e86
No related branches found
No related tags found
No related merge requests found
......@@ -530,12 +530,8 @@ class RosterTooltip(NotificationAreaTooltip):
if time.strftime('%j', time.localtime())== \
time.strftime('%j', contact.last_status_time):
# it's today, show only the locale hour representation
# FIXME : last_status_time is UTC but _we_ may not be
local_time = time.strftime('%X', contact.last_status_time)
# Hack to delete seconds
# We can't use hour:minutes directly because we don't
# know if we should use %H or %I (depend of user locale)
# See http://docs.python.org/lib/module-time.html
local_time = local_time[:-3]
else:
# time.strftime returns locale encoded string
local_time = time.strftime('%c', contact.last_status_time)
......@@ -557,10 +553,18 @@ class RosterTooltip(NotificationAreaTooltip):
properties.append((show, None))
properties.append((_('Jabber ID: '), prim_contact.jid ))
# contact has only one ressource
if num_resources == 1 and contact.resource:
properties.append((_('Resource: '),
gtkgui_helpers.escape_for_pango_markup(contact.resource) + ' (' + \
unicode(contact.priority) + ')'))
if prim_contact.sub and prim_contact.sub != 'both':
# ('both' is the normal sub so we don't show it)
properties.append(( _('Subscription: '),
gtkgui_helpers.escape_for_pango_markup(helpers.get_uf_sub(prim_contact.sub))))
if prim_contact.keyID:
keyID = None
if len(prim_contact.keyID) == 8:
......@@ -570,13 +574,6 @@ class RosterTooltip(NotificationAreaTooltip):
if keyID:
properties.append((_('OpenPGP: '),
gtkgui_helpers.escape_for_pango_markup(keyID)))
# contact has only one ressource
if num_resources == 1 and contact.resource:
properties.append((_('Resource: '),
gtkgui_helpers.escape_for_pango_markup(contact.resource) + ' (' + \
unicode(contact.priority) + ')'))
while properties:
property = properties.pop(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment