diff options
author | James Booth <boothj5@gmail.com> | 2013-10-06 19:11:51 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-10-06 19:11:51 +0100 |
commit | 47c96ed4e7d4787ba4560b49544f0d624038f8c6 (patch) | |
tree | e5483375c591ec79e1627f8eb18817c32408d534 /src/ui/core.c | |
parent | 78ee448a8db1622c2c2ad8cad6f8b974743b0394 (diff) | |
download | profani-tty-47c96ed4e7d4787ba4560b49544f0d624038f8c6.tar.gz |
ProfWin->print_incoming_message added
Diffstat (limited to 'src/ui/core.c')
-rw-r--r-- | src/ui/core.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 8e84274f..1fac0dc3 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -279,28 +279,7 @@ ui_incoming_msg(const char * const from, const char * const message, // currently viewing chat window with sender if (wins_is_current(window)) { - if (tv_stamp == NULL) { - window->print_time(window, '-'); - } else { - GDateTime *time = g_date_time_new_from_timeval_utc(tv_stamp); - gchar *date_fmt = g_date_time_format(time, "%H:%M:%S"); - wattron(window->win, COLOUR_TIME); - wprintw(window->win, "%s - ", date_fmt); - wattroff(window->win, COLOUR_TIME); - g_date_time_unref(time); - g_free(date_fmt); - } - - if (strncmp(message, "/me ", 4) == 0) { - wattron(window->win, COLOUR_THEM); - wprintw(window->win, "*%s ", display_from); - waddstr(window->win, message + 4); - wprintw(window->win, "\n"); - wattroff(window->win, COLOUR_THEM); - } else { - _win_show_user(window->win, display_from, 1); - _win_show_message(window->win, message); - } + window->print_incoming_message(window, tv_stamp, display_from, message); title_bar_set_typing(FALSE); title_bar_draw(); status_bar_active(num); |