Skip to content
Snippets Groups Projects
Commit 63d1ef9e authored by Alexander Cherniuk's avatar Alexander Cherniuk
Browse files

Do not show the idle time in the tooltip, unless it's meaningful

parent ab0353a1
No related branches found
No related tags found
No related merge requests found
......@@ -621,10 +621,14 @@ class RosterTooltip(NotificationAreaTooltip):
else:
formatted = last_active.strftime("%c")
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))
# Do not show the "Idle since" and "Idle for" items if there
# is no meaningful difference between last activity time and
# current time.
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:
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