Compare commits
3 Commits
1bc5c51bdb
...
56e0305017
| Author | SHA1 | Date | |
|---|---|---|---|
|
56e0305017
|
|||
|
aa5edea26d
|
|||
|
|
562bd28cff
|
@@ -341,7 +341,7 @@ sv_ev_room_message(ProfMessage* message)
|
||||
status_bar_active(num, WIN_MUC, mucwin->roomjid);
|
||||
|
||||
if ((g_strcmp0(mynick, message->from_jid->resourcepart) != 0) && (prefs_get_boolean(PREF_BEEP))) {
|
||||
beep();
|
||||
ui_beep();
|
||||
}
|
||||
|
||||
// not currently on groupchat window
|
||||
@@ -349,7 +349,7 @@ sv_ev_room_message(ProfMessage* message)
|
||||
status_bar_new(num, WIN_MUC, mucwin->roomjid);
|
||||
|
||||
if ((g_strcmp0(mynick, message->from_jid->resourcepart) != 0) && (prefs_get_boolean(PREF_FLASH))) {
|
||||
flash();
|
||||
ui_flash();
|
||||
}
|
||||
|
||||
cons_show_incoming_room_message(message->from_jid->resourcepart, mucwin->roomjid, num, mention, triggers, mucwin->unread, window);
|
||||
|
||||
@@ -327,7 +327,7 @@ chatwin_incoming_msg(ProfChatWin* chatwin, ProfMessage* message, gboolean win_cr
|
||||
cons_show_incoming_message(display_name, num, chatwin->unread, window);
|
||||
|
||||
if (prefs_get_boolean(PREF_FLASH)) {
|
||||
flash();
|
||||
ui_flash();
|
||||
}
|
||||
|
||||
chatwin->unread++;
|
||||
@@ -364,7 +364,7 @@ chatwin_incoming_msg(ProfChatWin* chatwin, ProfMessage* message, gboolean win_cr
|
||||
wins_add_quotes_ac(window, message->plain, FALSE);
|
||||
|
||||
if (prefs_get_boolean(PREF_BEEP)) {
|
||||
beep();
|
||||
ui_beep();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,9 @@ static Display* display;
|
||||
static void _ui_draw_term_title(void);
|
||||
|
||||
// Skip drawing while an external editor is active (ui_suspended) or after the
|
||||
// screen has been closed (endwin).
|
||||
// screen has been closed (endwin). The flag is authoritative and does not rely
|
||||
// on isendwin() staying TRUE, which a stray doupdate() during the session could
|
||||
// otherwise clear.
|
||||
static gboolean
|
||||
_ui_redraw_suspended(void)
|
||||
{
|
||||
@@ -189,6 +191,7 @@ ui_suspend(void)
|
||||
{
|
||||
ui_suspended = TRUE;
|
||||
inp_suspend();
|
||||
doupdate();
|
||||
endwin();
|
||||
}
|
||||
|
||||
@@ -200,6 +203,22 @@ ui_resume(void)
|
||||
inp_resume();
|
||||
}
|
||||
|
||||
void
|
||||
ui_beep(void)
|
||||
{
|
||||
if (!isendwin()) {
|
||||
beep();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ui_flash(void)
|
||||
{
|
||||
if (!isendwin()) {
|
||||
flash();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ui_resize(void)
|
||||
{
|
||||
|
||||
@@ -311,7 +311,10 @@ inp_get_line(void)
|
||||
werase(inp_win);
|
||||
wmove(inp_win, 0, 0);
|
||||
_inp_win_update_virtual();
|
||||
doupdate();
|
||||
// Don't write to the terminal while suspended (external editor active).
|
||||
if (!isendwin()) {
|
||||
doupdate();
|
||||
}
|
||||
char* line = NULL;
|
||||
while (!line) {
|
||||
line = inp_readline();
|
||||
@@ -338,7 +341,10 @@ inp_get_password(void)
|
||||
werase(inp_win);
|
||||
wmove(inp_win, 0, 0);
|
||||
_inp_win_update_virtual();
|
||||
doupdate();
|
||||
// Don't write to the terminal while suspended (external editor active).
|
||||
if (!isendwin()) {
|
||||
doupdate();
|
||||
}
|
||||
char* password = NULL;
|
||||
get_password = TRUE;
|
||||
while (!password) {
|
||||
@@ -459,7 +465,9 @@ _inp_write(char* line, int offset)
|
||||
_inp_win_handle_scroll();
|
||||
|
||||
_inp_win_update_virtual();
|
||||
doupdate();
|
||||
if (!isendwin()) {
|
||||
doupdate();
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -57,7 +57,7 @@ privwin_incoming_msg(ProfPrivateWin* privatewin, ProfMessage* message)
|
||||
privatewin->unread++;
|
||||
|
||||
if (prefs_get_boolean(PREF_FLASH)) {
|
||||
flash();
|
||||
ui_flash();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ privwin_incoming_msg(ProfPrivateWin* privatewin, ProfMessage* message)
|
||||
wins_add_quotes_ac(window, message->plain, TRUE);
|
||||
|
||||
if (prefs_get_boolean(PREF_BEEP)) {
|
||||
beep();
|
||||
ui_beep();
|
||||
}
|
||||
|
||||
if (notify) {
|
||||
|
||||
@@ -84,6 +84,8 @@ void ui_handle_recipient_error(const char* const recipient, const char* const er
|
||||
void ui_handle_error(const char* const err_msg);
|
||||
void ui_clear_win_title(void);
|
||||
void ui_goodbye_title(void);
|
||||
void ui_beep(void);
|
||||
void ui_flash(void);
|
||||
void ui_handle_room_configuration_form_error(const char* const roomjid, const char* const message);
|
||||
void ui_handle_room_config_submit_result(const char* const roomjid);
|
||||
void ui_handle_room_config_submit_result_error(const char* const roomjid, const char* const message);
|
||||
|
||||
@@ -1475,3 +1475,13 @@ ui_is_suspended(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
ui_beep(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ui_flash(void)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user