diff options
Diffstat (limited to 'src/profanity.c')
-rw-r--r-- | src/profanity.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/profanity.c b/src/profanity.c index 6ce31cc3..bbf07f0b 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -92,7 +92,8 @@ prof_run(const int disable_tls, char *log_level, char *account_name) line = ui_readline(); if (line) { - cont = cmd_process_input(line); + ProfWin *window = wins_get_current(); + cont = cmd_process_input(window, line); free(line); line = NULL; } else { @@ -132,10 +133,10 @@ prof_handle_idle(void) void prof_handle_activity(void) { - win_type_t win_type = ui_current_win_type(); jabber_conn_status_t status = jabber_get_connection_status(); + ProfWin *current = wins_get_current(); - if ((status == JABBER_CONNECTED) && (win_type == WIN_CHAT)) { + if ((status == JABBER_CONNECTED) && (current->type == WIN_CHAT)) { ProfChatWin *chatwin = wins_get_current_chat(); chat_state_handle_typing(chatwin->barejid, chatwin->state); } @@ -144,12 +145,13 @@ prof_handle_activity(void) static void _connect_default(const char * const account) { + ProfWin *window = wins_get_current(); if (account) { - cmd_execute_connect(account); + cmd_execute_connect(window, account); } else { char *pref_connect_account = prefs_get_string(PREF_CONNECT_ACCOUNT); if (pref_connect_account) { - cmd_execute_connect(pref_connect_account); + cmd_execute_connect(window, pref_connect_account); prefs_free_string(pref_connect_account); } } |