diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/event/client_events.c | 3 | ||||
-rw-r--r-- | src/ui/core.c | 6 | ||||
-rw-r--r-- | src/ui/ui.h | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/event/client_events.c b/src/event/client_events.c index af8b833c..f3c67f63 100644 --- a/src/event/client_events.c +++ b/src/event/client_events.c @@ -69,8 +69,7 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char * const msg) prof_otrsendres_t res = otr_on_message_send(chatwin->barejid, msg); if (res != PROF_OTRSUCCESS) { char *errmsg = otr_senderror_str(res); - // TODO reference passed window - ui_current_error_line(errmsg); + ui_win_error_line((ProfWin*)chatwin, errmsg); } #else char *id = message_send_chat(chatwin->barejid, msg); diff --git a/src/ui/core.c b/src/ui/core.c index 40f9dbbf..b985e52b 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1297,6 +1297,12 @@ ui_current_print_formatted_line(const char show_char, int attrs, const char * co } void +ui_win_error_line(ProfWin *window, const char * const msg) +{ + win_print(window, '-', NULL, 0, THEME_ERROR, "", msg); +} + +void ui_current_error_line(const char * const msg) { ProfWin *current = wins_get_current(); diff --git a/src/ui/ui.h b/src/ui/ui.h index 11457988..e98a105e 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -106,6 +106,7 @@ ProfChatWin *ui_get_current_chat(void); void ui_current_print_line(const char * const msg, ...); void ui_current_print_formatted_line(const char show_char, int attrs, const char * const msg, ...); void ui_current_error_line(const char * const msg); +void ui_win_error_line(ProfWin *window, const char * const msg); win_type_t ui_win_type(int index); void ui_close_win(int index); |