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

Do not show seconds in roster tooltips (if today)

Better description of option print_fuzzy
parent c4b8421a
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,7 @@ class Config:
'use_speller': [ opt_bool, False, ],
'speller_language': [ opt_str, '', _('Language used by speller')],
'print_time': [ opt_str, 'always', _('\'always\' - print time for every message.\n\'sometimes\' - print time every print_ichat_every_foo_minutes minute.\n\'never\' - never print time.')],
'print_time_fuzzy': [ opt_int, 0, _('Value of fuzziness from 1 to 4 or 0 to disable fuzzyclock. 1 is the most precise clock, 4 the less precise one.') ],
'print_time_fuzzy': [ opt_int, 0, _('Print time in chats using Fuzzy Clock. Value of fuzziness from 1 to 4, or 0 to disable fuzzyclock. 1 is the most precise clock, 4 the less precise one. This is used only if print_time is \'sometimes\'.') ],
'emoticons_theme': [opt_str, 'static', '', True ],
'ascii_formatting': [ opt_bool, True,
_('Treat * / _ pairs as possible formatting characters.'), True],
......
......@@ -529,7 +529,12 @@ 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
local_time = time.strftime('%X', contact.last_status_time)
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)
......
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