diff options
author | James Booth <boothj5@gmail.com> | 2015-05-04 01:34:18 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-05-04 01:34:18 +0100 |
commit | aca102f542c53a16b32eaf68c4ee8ff07433eda0 (patch) | |
tree | 36d5ccc120540fc91631e70a2cd74f699daab20c /src/ui | |
parent | 3dace733d982fdb33670f9a919cd9f46661d7088 (diff) | |
parent | c8eaaa0ce918064a4009f706baac4a975999fc3f (diff) | |
download | profani-tty-aca102f542c53a16b32eaf68c4ee8ff07433eda0.tar.gz |
Merge branch 'master' into pgp
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/core.c | 19 | ||||
-rw-r--r-- | src/ui/ui.h | 4 |
2 files changed, 7 insertions, 16 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index b4cef52d..8c4d4644 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1273,14 +1273,11 @@ ui_recipient_gone(const char * const barejid, const char * const resource) } } -void +ProfPrivateWin* ui_new_private_win(const char * const fulljid) { - ProfWin *window = (ProfWin*)wins_get_private(fulljid); - if (!window) { - window = wins_new_private(fulljid); - } - ui_ev_focus_win(window); + ProfWin *window = wins_new_private(fulljid); + return (ProfPrivateWin*)window; } void @@ -1357,15 +1354,9 @@ ui_outgoing_chat_msg_carbon(const char * const barejid, const char * const messa } void -ui_outgoing_private_msg(const char * const fulljid, const char * const message) +ui_outgoing_private_msg(ProfPrivateWin *privwin, const char * const message) { - ProfWin *window = (ProfWin*)wins_get_private(fulljid); - if (!window) { - window = wins_new_private(fulljid); - } - - win_print(window, '-', NULL, 0, THEME_TEXT_ME, "me", message); - ui_ev_focus_win(window); + win_print((ProfWin*)privwin, '-', NULL, 0, THEME_TEXT_ME, "me", message); } void diff --git a/src/ui/ui.h b/src/ui/ui.h index 212ed451..c98d45e8 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -84,7 +84,7 @@ void ui_handle_otr_error(const char * const barejid, const char * const message) unsigned long ui_get_idle_time(void); void ui_reset_idle_time(void); -void ui_new_private_win(const char * const fulljid); +ProfPrivateWin* ui_new_private_win(const char * const fulljid); ProfChatWin* ui_new_chat_win(const char * const barejid); void ui_print_system_msg_from_recipient(const char * const barejid, const char *message); gint ui_unread(void); @@ -122,7 +122,7 @@ void ui_recipient_gone(const char * const barejid, const char * const resource); 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); +void ui_outgoing_private_msg(ProfPrivateWin *privwin, const char * const message); void ui_room_join(const char * const roomjid, gboolean focus); void ui_switch_to_room(const char * const roomjid); |