mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 18:56:21 +00:00
Removed chat states from chat_session module, WIP
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
// 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 (*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)) {
|
||||
|
||||
Reference in New Issue
Block a user