diff options
author | Ailin Nemui <ailin@esf51.localdomain> | 2014-01-08 13:49:46 +0100 |
---|---|---|
committer | Ailin Nemui <ailin@esf51.localdomain> | 2014-06-27 15:50:36 +0200 |
commit | e71c9f1b06fe73971497d7f4722466070f66748c (patch) | |
tree | 5bf2ed8a9f9367ad36d4e9605521376227d2fa94 /src/fe-text/gui-printtext.c | |
parent | 113f1724d72724c1bb3e2111c0ce92a3cafd67fa (diff) | |
download | irssi-e71c9f1b06fe73971497d7f4722466070f66748c.zip |
add print_text_after_time to specify time stamp for lines
add signal for line removal from textbuffer
Diffstat (limited to 'src/fe-text/gui-printtext.c')
-rw-r--r-- | src/fe-text/gui-printtext.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c index 2b5bfc5f..76b116d8 100644 --- a/src/fe-text/gui-printtext.c +++ b/src/fe-text/gui-printtext.c @@ -102,7 +102,7 @@ void gui_printtext(int xpos, int ypos, const char *str) next_xpos = next_ypos = -1; } -void gui_printtext_after(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str) +void gui_printtext_after_time(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str, time_t time) { GUI_WINDOW_REC *gui; @@ -110,10 +110,16 @@ void gui_printtext_after(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str) gui->use_insert_after = TRUE; gui->insert_after = prev; + gui->insert_after_time = time; format_send_to_gui(dest, str); gui->use_insert_after = FALSE; } +void gui_printtext_after(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str) +{ + gui_printtext_after_time(dest, prev, str, 0); +} + static void remove_old_lines(TEXT_BUFFER_VIEW_REC *view) { LINE_REC *line; @@ -199,9 +205,10 @@ static void sig_gui_print_text(WINDOW_REC *window, void *fgcolor, } lineinfo.level = dest == NULL ? 0 : dest->level; - lineinfo.time = time(NULL); - gui = WINDOW_GUI(window); + lineinfo.time = (gui->use_insert_after && gui->insert_after_time) ? + gui->insert_after_time : time(NULL); + view = gui->view; insert_after = gui->use_insert_after ? gui->insert_after : view->buffer->cur_line; |