mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added resize check to ui module
This commit is contained in:
parent
7100b0e361
commit
7d6ce4da02
@ -70,7 +70,6 @@ prof_run(const int disable_tls, char *log_level)
|
|||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
while(ch != '\n') {
|
while(ch != '\n') {
|
||||||
|
|
||||||
if (jabber_get_connection_status() == JABBER_CONNECTED) {
|
if (jabber_get_connection_status() == JABBER_CONNECTED) {
|
||||||
_handle_idle_time();
|
_handle_idle_time();
|
||||||
}
|
}
|
||||||
@ -78,24 +77,16 @@ prof_run(const int disable_tls, char *log_level)
|
|||||||
gdouble elapsed = g_timer_elapsed(timer, NULL);
|
gdouble elapsed = g_timer_elapsed(timer, NULL);
|
||||||
|
|
||||||
gint remind_period = prefs_get_notify_remind();
|
gint remind_period = prefs_get_notify_remind();
|
||||||
|
|
||||||
// 0 means to not remind
|
|
||||||
if (remind_period > 0 && elapsed >= remind_period) {
|
if (remind_period > 0 && elapsed >= remind_period) {
|
||||||
notify_remind();
|
notify_remind();
|
||||||
g_timer_start(timer);
|
g_timer_start(timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_handle_special_keys(&ch);
|
ui_handle_special_keys(&ch, inp, size);
|
||||||
|
|
||||||
if (ch == KEY_RESIZE) {
|
|
||||||
ui_resize(ch, inp, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
ui_refresh();
|
ui_refresh();
|
||||||
jabber_process_events();
|
jabber_process_events();
|
||||||
|
|
||||||
ch = inp_get_char(inp, &size);
|
ch = inp_get_char(inp, &size);
|
||||||
|
|
||||||
if (ch != ERR) {
|
if (ch != ERR) {
|
||||||
ui_reset_idle_time();
|
ui_reset_idle_time();
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,8 @@ void ui_contact_online(const char * const from, const char * const show,
|
|||||||
void ui_contact_offline(const char * const from, const char * const show,
|
void ui_contact_offline(const char * const from, const char * const show,
|
||||||
const char * const status);
|
const char * const status);
|
||||||
void ui_disconnected(void);
|
void ui_disconnected(void);
|
||||||
void ui_handle_special_keys(const wint_t * const ch);
|
void ui_handle_special_keys(const wint_t * const ch, const char * const inp,
|
||||||
|
const int size);
|
||||||
void ui_switch_win(const int i);
|
void ui_switch_win(const int i);
|
||||||
gboolean ui_windows_full(void);
|
gboolean ui_windows_full(void);
|
||||||
unsigned long ui_get_idle_time(void);
|
unsigned long ui_get_idle_time(void);
|
||||||
|
@ -508,10 +508,15 @@ ui_disconnected(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ui_handle_special_keys(const wint_t * const ch)
|
ui_handle_special_keys(const wint_t * const ch, const char * const inp,
|
||||||
|
const int size)
|
||||||
{
|
{
|
||||||
_win_handle_switch(ch);
|
_win_handle_switch(ch);
|
||||||
_win_handle_page(ch);
|
_win_handle_page(ch);
|
||||||
|
if (*ch == KEY_RESIZE) {
|
||||||
|
ui_resize(*ch, inp, size);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user