mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Print timestamps correctly with /SB REDRAW
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@926 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
47eda740cc
commit
fab312dde3
4 changed files with 14 additions and 20 deletions
|
|
@ -390,17 +390,14 @@ char *format_get_level_tag(THEME_REC *theme, TEXT_DEST_REC *dest)
|
|||
((level & (MSGLEVEL_NEVER|MSGLEVEL_LASTLOG)) == 0 && \
|
||||
(timestamps || (msgs_timestamps && ((level) & MSGLEVEL_MSGS))))
|
||||
|
||||
static char *get_timestamp(THEME_REC *theme, TEXT_DEST_REC *dest)
|
||||
static char *get_timestamp(THEME_REC *theme, TEXT_DEST_REC *dest, time_t t)
|
||||
{
|
||||
struct tm *tm;
|
||||
time_t t;
|
||||
int diff;
|
||||
|
||||
if (!show_timestamp(dest->level))
|
||||
return NULL;
|
||||
|
||||
t = time(NULL);
|
||||
|
||||
if (timestamp_timeout > 0) {
|
||||
diff = t - dest->window->last_timestamp;
|
||||
dest->window->last_timestamp = t;
|
||||
|
|
@ -442,12 +439,12 @@ static char *get_server_tag(THEME_REC *theme, TEXT_DEST_REC *dest)
|
|||
IRCTXT_SERVERTAG, server->tag);
|
||||
}
|
||||
|
||||
char *format_get_line_start(THEME_REC *theme, TEXT_DEST_REC *dest)
|
||||
char *format_get_line_start(THEME_REC *theme, TEXT_DEST_REC *dest, time_t t)
|
||||
{
|
||||
char *timestamp, *servertag;
|
||||
char *linestart;
|
||||
|
||||
timestamp = get_timestamp(theme, dest);
|
||||
timestamp = get_timestamp(theme, dest, t);
|
||||
servertag = get_server_tag(theme, dest);
|
||||
|
||||
if (timestamp == NULL && servertag == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue