gc-roster-tooltip : Remove horizontal separator
gc-tooltip : If date==today, show only "Since %hour" instead of full date
This commit is contained in:
parent
37c08ee033
commit
031d10f3fa
|
@ -408,13 +408,6 @@ class GCTooltip(BaseTooltip):
|
||||||
while properties:
|
while properties:
|
||||||
property = properties.pop(0)
|
property = properties.pop(0)
|
||||||
vcard_current_row += 1
|
vcard_current_row += 1
|
||||||
if vcard_current_row == 3 and not status_message_present or\
|
|
||||||
vcard_current_row == 4 and status_message_present:
|
|
||||||
# horizontal separator after status, if something after
|
|
||||||
h_separator = gtk.HSeparator()
|
|
||||||
vcard_table.attach(h_separator, 1, 3, vcard_current_row, vcard_current_row + 1,\
|
|
||||||
gtk.FILL, vertical_fill, 0)
|
|
||||||
vcard_current_row += 1
|
|
||||||
vertical_fill = gtk.FILL
|
vertical_fill = gtk.FILL
|
||||||
if not properties:
|
if not properties:
|
||||||
vertical_fill |= gtk.EXPAND
|
vertical_fill |= gtk.EXPAND
|
||||||
|
@ -564,9 +557,14 @@ class RosterTooltip(NotificationAreaTooltip):
|
||||||
text = _('Last status on %s')
|
text = _('Last status on %s')
|
||||||
else:
|
else:
|
||||||
text = _('Since %s')
|
text = _('Since %s')
|
||||||
|
|
||||||
# time.strftime returns locale encoded string
|
if time.strftime('%j', time.localtime())== \
|
||||||
local_time = time.strftime('%c', contact.last_status_time)
|
time.strftime('%j', contact.last_status_time):
|
||||||
|
# it's today, show only the locale hour representation
|
||||||
|
local_time = time.strftime('%X', contact.last_status_time)
|
||||||
|
else:
|
||||||
|
# time.strftime returns locale encoded string
|
||||||
|
local_time = time.strftime('%c', contact.last_status_time)
|
||||||
local_time = local_time.decode(locale.getpreferredencoding())
|
local_time = local_time.decode(locale.getpreferredencoding())
|
||||||
text = text % local_time
|
text = text % local_time
|
||||||
properties.append(('<span style="italic">%s</span>' % text, None))
|
properties.append(('<span style="italic">%s</span>' % text, None))
|
||||||
|
|
Loading…
Reference in New Issue