diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command/commands.c | 4 | ||||
-rw-r--r-- | src/ui/core.c | 7 | ||||
-rw-r--r-- | src/ui/ui.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index 7316de2f..68785ee6 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -3887,7 +3887,7 @@ cmd_otr(gchar **args, struct cmd_help_t help) } else if (!ui_current_win_is_otr()) { ui_current_print_formatted_line('!', 0, "You are not currently in an OTR session."); } else { - ProfChatWin *chatwin = wins_get_current_chat(); + ProfChatWin *chatwin = ui_get_current_chat(); char *fingerprint = otr_get_their_fingerprint(chatwin->barejid); ui_current_print_formatted_line('!', 0, "%s's OTR fingerprint: %s", chatwin->barejid, fingerprint); free(fingerprint); @@ -3933,7 +3933,7 @@ cmd_otr(gchar **args, struct cmd_help_t help) if (!otr_key_loaded()) { ui_current_print_formatted_line('!', 0, "You have not generated or loaded a private key, use '/otr gen'"); } else { - ProfChatWin *chatwin = wins_get_current_chat(); + ProfChatWin *chatwin = ui_get_current_chat(); char *otr_query_message = otr_start_query(); message_send_chat(chatwin->barejid, otr_query_message); } diff --git a/src/ui/core.c b/src/ui/core.c index ef203838..98fda0c4 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -314,6 +314,12 @@ _ui_get_recipients(void) return recipients; } +ProfChatWin * +_ui_get_current_chat(void) +{ + return wins_get_current_chat(); +} + static void _ui_incoming_msg(const char * const barejid, const char * const message, GTimeVal *tv_stamp) { @@ -3208,5 +3214,6 @@ ui_init_module(void) ui_redraw = _ui_redraw; ui_show_all_room_rosters = _ui_show_all_room_rosters; ui_hide_all_room_rosters = _ui_hide_all_room_rosters; + ui_get_current_chat = _ui_get_current_chat; } diff --git a/src/ui/ui.h b/src/ui/ui.h index ec8d38c0..59324113 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -109,6 +109,8 @@ int (*ui_current_win_index)(void); gboolean (*ui_current_win_is_otr)(void); void (*ui_current_set_otr)(gboolean value); +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); |