Merge branch 'master' into openpgp

Conflicts:
	src/command/commands.c
	src/command/commands.h
This commit is contained in:
James Booth
2015-06-17 00:40:06 +01:00
25 changed files with 689 additions and 684 deletions

View File

@@ -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);
}
}