diff options
author | James Booth <boothj5@gmail.com> | 2013-10-06 01:30:53 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-10-06 01:30:53 +0100 |
commit | 33fc43d5e246b9c169d0290f5adcfd41831b248b (patch) | |
tree | 75a40e8546a4bc0e15e150cd886db3abc1d3ba61 /src | |
parent | 9c1809a50e4969aa13cfd163f67da064ceb903c3 (diff) | |
download | profani-tty-33fc43d5e246b9c169d0290f5adcfd41831b248b.tar.gz |
Added win_refresh function
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/window.c | 5 | ||||
-rw-r--r-- | src/ui/window.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 19fc46d2..486fac3b 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -100,7 +100,12 @@ win_print_line(ProfWin *window, const char * const msg, ...) wprintw(window->win, "%s\n", fmt_msg->str); g_string_free(fmt_msg, TRUE); va_end(arg); + win_refresh(window); +} +void +win_refresh(ProfWin *window) +{ int rows, cols; getmaxyx(stdscr, rows, cols); prefresh(window->win, window->y_pos, 0, 1, 0, rows-3, cols-1); diff --git a/src/ui/window.h b/src/ui/window.h index ea5335d0..2d49229f 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -61,6 +61,7 @@ void win_free(ProfWin *window); void win_print_time(ProfWin *window, char show_char); void win_print_line(ProfWin *window, const char * const msg, ...); +void win_refresh(ProfWin *window); void win_presence_colour_on(ProfWin *window, const char * const presence); void win_presence_colour_off(ProfWin *window, const char * const presence); void win_show_contact(ProfWin *window, PContact contact); |