diff options
| author | James Booth <boothj5@gmail.com> | 2015-01-08 00:57:25 +0000 |
|---|---|---|
| committer | James Booth <boothj5@gmail.com> | 2015-01-08 00:57:25 +0000 |
| commit | 5e7d2f5f91d47af330742a3b554e6f03450d6623 (patch) | |
| tree | 5560d7b60b3b32b9c56adf1291b91d5db34a4101 /src/ui | |
| parent | 8bbf126e83205f942ec2bfdc1a9597c82a2c811d (diff) | |
| download | profani-tty-5e7d2f5f91d47af330742a3b554e6f03450d6623.tar.gz | |
Removed chat states from chat_session module, WIP
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/core.c | 8 | ||||
| -rw-r--r-- | src/ui/inputwin.c | 24 |
2 files changed, 14 insertions, 18 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index fafa4377..8eb9025b 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -686,9 +686,7 @@ ui_close_connected_win(int index) otr_end_session(chatwin->barejid); } #endif - if (chat_session_exists(chatwin->barejid)) { - chat_session_on_window_close(chatwin->barejid); - } + chat_session_remove(chatwin->barejid); } } } @@ -1145,9 +1143,7 @@ ui_prune_wins(void) if (window->type == WIN_CHAT) { if (conn_status == JABBER_CONNECTED) { ProfChatWin *chatwin = (ProfChatWin*)window; - if (chat_session_exists(chatwin->barejid)) { - chat_session_on_window_close(chatwin->barejid); - } + chat_session_remove(chatwin->barejid); } } diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 19318745..57634385 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -145,18 +145,18 @@ inp_get_char(char *input, int *size, int *result) noecho(); *result = wget_wch(inp_win, &ch); - gboolean in_command = FALSE; - if ((display_size > 0 && input[0] == '/') || - (display_size == 0 && ch == '/')) { - in_command = TRUE; - } - - if (*result == ERR) { - prof_handle_idle(); - } - if ((*result != ERR) && (*result != KEY_CODE_YES) && !in_command && _printable(ch)) { - prof_handle_activity(); - } +// gboolean in_command = FALSE; +// if ((display_size > 0 && input[0] == '/') || +// (display_size == 0 && ch == '/')) { +// in_command = TRUE; +// } + +// if (*result == ERR) { +// prof_handle_idle(); +// } +// if ((*result != ERR) && (*result != KEY_CODE_YES) && !in_command && _printable(ch)) { +// prof_handle_activity(); +// } // if it wasn't an arrow key etc if (!_handle_edit(*result, ch, input, size)) { |