summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-window.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-01-01 18:22:26 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-01-01 18:22:26 +0100
commit9222a7b109bf5c20ac60466cfc293dc462989bdf (patch)
treee9ddc3fb3cdc238083e1252deafb7f928b837192 /src/gui/curses/gui-curses-window.c
parentcdbffe40da5f4fb23494b0464eea74ad1619a82b (diff)
downloadweechat-9222a7b109bf5c20ac60466cfc293dc462989bdf.zip
Added group support for nicklist, fixed some bugs in plugins API and IRC plugin
Added group support for nicklist (with subgroups). Partial changes in IRC protocol functions (new arguments with argv and argv_eol). Fixed some bugs: - nicklist in plugins API - problem in main loop with select() when SIGWINCH is received (terminal resize) - bug in string explode function - bug in infobar countdown.
Diffstat (limited to 'src/gui/curses/gui-curses-window.c')
-rw-r--r--src/gui/curses/gui-curses-window.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index cdc650ca3..b84e22cf4 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -205,7 +205,7 @@ gui_window_calculate_pos_size (struct t_gui_window *window, int force_calculate)
/* init chat & nicklist settings */
if (window->buffer->nicklist)
{
- max_length = gui_nicklist_get_max_length (window->buffer);
+ max_length = window->buffer->nicklist_max_length;
lines = 0;
@@ -226,10 +226,10 @@ gui_window_calculate_pos_size (struct t_gui_window *window, int force_calculate)
else
{
width_used = window->win_width - (window->win_width % (max_length + 2));
- if (((max_length + 2) * window->buffer->nicks_count) % width_used == 0)
- lines = ((max_length + 2) * window->buffer->nicks_count) / width_used;
+ if (((max_length + 2) * window->buffer->nicklist_visible_count) % width_used == 0)
+ lines = ((max_length + 2) * window->buffer->nicklist_visible_count) / width_used;
else
- lines = (((max_length + 2) * window->buffer->nicks_count) / width_used) + 1;
+ lines = (((max_length + 2) * window->buffer->nicklist_visible_count) / width_used) + 1;
if ((CONFIG_INTEGER(config_look_nicklist_max_size) > 0)
&& (lines > CONFIG_INTEGER(config_look_nicklist_max_size)))
lines = CONFIG_INTEGER(config_look_nicklist_max_size);
@@ -808,7 +808,7 @@ gui_window_nick_end (struct t_gui_window *window)
if (window->buffer->nicklist)
{
new_start =
- window->buffer->nicks_count - window->win_nick_num_max;
+ window->buffer->nicklist_visible_count - window->win_nick_num_max;
if (new_start < 0)
new_start = 0;
else if (new_start >= 1)
@@ -856,9 +856,9 @@ gui_window_nick_page_down (struct t_gui_window *window)
if (window->buffer->nicklist)
{
- if ((window->buffer->nicks_count > window->win_nick_num_max)
+ if ((window->buffer->nicklist_visible_count > window->win_nick_num_max)
&& (window->win_nick_start + window->win_nick_num_max - 1
- < window->buffer->nicks_count))
+ < window->buffer->nicklist_visible_count))
{
if (window->win_nick_start == 0)
window->win_nick_start += (window->win_nick_num_max - 1);
@@ -1335,9 +1335,9 @@ gui_window_refresh_screen (int force)
void
gui_window_refresh_screen_sigwinch ()
{
- if (gui_refresh_screen_needed < 2)
- gui_refresh_screen_needed++;
- signal (SIGWINCH, gui_window_refresh_screen_sigwinch);
+ gui_refresh_screen_needed = 1;
+ //gui_window_refresh_screen (0);
+ signal (SIGWINCH, &gui_window_refresh_screen_sigwinch);
}
/*