diff options
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 81ecb3cd..133a3990 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1030,7 +1030,26 @@ win_printf(ProfWin *window, const char show_char, int pad_indent, GDateTime *tim buffer_push(window->layout->buffer, show_char, pad_indent, timestamp, flags, theme_item, from, fmt_msg->str, NULL); _win_print(window, show_char, pad_indent, timestamp, flags, theme_item, from, fmt_msg->str, NULL); - // TODO: cross-reference.. this should be replaced by a real event-based system + inp_nonblocking(TRUE); + g_date_time_unref(timestamp); + + g_string_free(fmt_msg, TRUE); + va_end(arg); +} + +void +win_printf_line(ProfWin *window, theme_item_t theme_item, const char *const message, ...) +{ + GDateTime *timestamp = g_date_time_new_now_local(); + + va_list arg; + va_start(arg, message); + GString *fmt_msg = g_string_new(NULL); + g_string_vprintf(fmt_msg, message, arg); + + buffer_push(window->layout->buffer, '-', 0, timestamp, 0, theme_item, "", fmt_msg->str, NULL); + + _win_print(window, '-', 0, timestamp, 0, theme_item, "", fmt_msg->str, NULL); inp_nonblocking(TRUE); g_date_time_unref(timestamp); |