diff options
author | James Booth <boothj5@gmail.com> | 2015-05-04 00:57:17 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-05-04 00:57:17 +0100 |
commit | bb2b5d20d5cf34e5644b9f04889e0e90e06aeb8a (patch) | |
tree | b4a8a17b55a8559096b3020e17778e3a0971694b /src/ui | |
parent | bab4da039a69b4a51d7d909eb63c4667807c900c (diff) | |
parent | ef54ff305eb4d5f971547721e20a8347f6ee7770 (diff) | |
download | profani-tty-bb2b5d20d5cf34e5644b9f04889e0e90e06aeb8a.tar.gz |
Merge branch 'master' into pgp
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/core.c | 16 | ||||
-rw-r--r-- | src/ui/ui.h | 2 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index fb1a4219..b4cef52d 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -433,15 +433,15 @@ ui_incoming_msg(const char * const barejid, const char * const resource, const c win_print_incoming_message(window, tv_stamp, display_name, message); } + if (prefs_get_boolean(PREF_BEEP)) { + beep(); + } + int ui_index = num; if (ui_index == 10) { ui_index = 0; } - if (prefs_get_boolean(PREF_BEEP)) { - beep(); - } - if (prefs_get_boolean(PREF_NOTIFY_MESSAGE)) { gboolean is_current = wins_is_current(window); if ( !is_current || (is_current && prefs_get_boolean(PREF_NOTIFY_MESSAGE_CURRENT)) ) { @@ -1329,14 +1329,12 @@ ui_new_chat_win(const char * const barejid) } void -ui_outgoing_chat_msg(const char * const barejid, const char * const message, char *id) +ui_outgoing_chat_msg(ProfChatWin *chatwin, const char * const message, char *id) { - ProfWin *window = (ProfWin*)wins_get_chat(barejid); - if (prefs_get_boolean(PREF_RECEIPTS_REQUEST) && id) { - win_print_with_receipt(window, '-', NULL, 0, THEME_TEXT_ME, "me", message, id); + win_print_with_receipt((ProfWin*)chatwin, '-', NULL, 0, THEME_TEXT_ME, "me", message, id); } else { - win_print(window, '-', NULL, 0, THEME_TEXT_ME, "me", message); + win_print((ProfWin*)chatwin, '-', NULL, 0, THEME_TEXT_ME, "me", message); } } diff --git a/src/ui/ui.h b/src/ui/ui.h index 6d85c9e8..212ed451 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -120,7 +120,7 @@ void ui_message_receipt(const char * const barejid, const char * const id); void ui_disconnected(void); void ui_recipient_gone(const char * const barejid, const char * const resource); -void ui_outgoing_chat_msg(const char * const barejid, const char * const message, char *id); +void ui_outgoing_chat_msg(ProfChatWin *chatwin, const char * const message, char *id); void ui_outgoing_chat_msg_carbon(const char * const barejid, const char * const message); void ui_outgoing_private_msg(const char * const fulljid, const char * const message); |