Do not show the idle time in the tooltip, unless it's meaningful
This commit is contained in:
parent
ab0353a13c
commit
63d1ef9e43
1 changed files with 8 additions and 4 deletions
|
@ -621,10 +621,14 @@ class RosterTooltip(NotificationAreaTooltip):
|
||||||
else:
|
else:
|
||||||
formatted = last_active.strftime("%c")
|
formatted = last_active.strftime("%c")
|
||||||
|
|
||||||
cs = "<span foreground='#888A85'>%s</span>"
|
# Do not show the "Idle since" and "Idle for" items if there
|
||||||
properties.append((str(), None))
|
# is no meaningful difference between last activity time and
|
||||||
properties.append(((cs % _("Idle since %s")) % formatted, None))
|
# current time.
|
||||||
properties.append(((cs % _("Idle for %s")) % str(diff), None))
|
if diff.days > 0 and diff.seconds > 0:
|
||||||
|
cs = "<span foreground='#888A85'>%s</span>"
|
||||||
|
properties.append((str(), None))
|
||||||
|
properties.append(((cs % _("Idle since %s")) % formatted, None))
|
||||||
|
properties.append(((cs % _("Idle for %s")) % str(diff), None))
|
||||||
|
|
||||||
while properties:
|
while properties:
|
||||||
property_ = properties.pop(0)
|
property_ = properties.pop(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue