1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge branch 'master' into pgp

This commit is contained in:
James Booth 2015-04-29 23:16:43 +01:00
commit d5188a160e
4 changed files with 10 additions and 2 deletions

View File

@ -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); prof_otrsendres_t res = otr_on_message_send(chatwin->barejid, msg);
if (res != PROF_OTRSUCCESS) { if (res != PROF_OTRSUCCESS) {
char *errmsg = otr_senderror_str(res); char *errmsg = otr_senderror_str(res);
// TODO reference passed window ui_win_error_line((ProfWin*)chatwin, errmsg);
ui_current_error_line(errmsg);
} }
#else #else
char *id = message_send_chat(chatwin->barejid, msg); char *id = message_send_chat(chatwin->barejid, msg);

View File

@ -1296,6 +1296,12 @@ ui_current_print_formatted_line(const char show_char, int attrs, const char * co
g_string_free(fmt_msg, TRUE); g_string_free(fmt_msg, TRUE);
} }
void
ui_win_error_line(ProfWin *window, const char * const msg)
{
win_print(window, '-', NULL, 0, THEME_ERROR, "", msg);
}
void void
ui_current_error_line(const char * const msg) ui_current_error_line(const char * const msg)
{ {

View File

@ -106,6 +106,7 @@ ProfChatWin *ui_get_current_chat(void);
void ui_current_print_line(const char * const msg, ...); 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_print_formatted_line(const char show_char, int attrs, const char * const msg, ...);
void ui_current_error_line(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); win_type_t ui_win_type(int index);
void ui_close_win(int index); void ui_close_win(int index);

View File

@ -171,6 +171,8 @@ void ui_current_print_formatted_line(const char show_char, int attrs, const char
} }
void ui_current_error_line(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) win_type_t ui_win_type(int index)
{ {