summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-05-18 19:03:34 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-05-18 19:03:34 +0000
commite7041a467be1861954ae69397bee19a8d998815b (patch)
tree96bff3ad8fb689ea4e2197bf4d47de137cd04c99 /src/gui
parentee2121b917ac3bf894f014458e9d9306cc0e4d30 (diff)
downloadweechat-e7041a467be1861954ae69397bee19a8d998815b.zip
Added "++++" at bottom of nicklist if end of nicklist is not displayed
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-display.c12
-rw-r--r--src/gui/gui.h6
2 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index 6ef9765ae..cd5d39556 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -962,7 +962,7 @@ gui_draw_buffer_nick (t_gui_buffer *buffer, int erase)
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
nicks_displayed = (ptr_win->win_width / (max_length + 2)) * (ptr_win->win_height - 1);
else
- nicks_displayed = ptr_win->win_height;
+ nicks_displayed = ptr_win->win_nick_height;
ptr_nick = CHANNEL(buffer)->nicks;
for (i = 0; i < ptr_win->win_nick_start; i++)
@@ -988,7 +988,8 @@ gui_draw_buffer_nick (t_gui_buffer *buffer, int erase)
x = column;
break;
}
- if ((i == 0) && (ptr_win->win_nick_start > 0))
+ if ( ((i == 0) && (ptr_win->win_nick_start > 0))
+ || ((i == nicks_displayed - 1) && (ptr_nick->next_nick)) )
{
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_MORE);
j = (max_length + 1) >= 4 ? 4 : max_length + 1;
@@ -1928,12 +1929,13 @@ gui_nick_move_page_down (t_gui_window *window)
if (gui_buffer_has_nicklist (window->buffer))
{
- if (window->win_nick_start + window->win_nick_height < CHANNEL(window->buffer)->nicks_count)
+ if ((CHANNEL(window->buffer)->nicks_count > window->win_nick_height)
+ && (window->win_nick_start + window->win_nick_height - 1 < CHANNEL(window->buffer)->nicks_count))
{
if (window->win_nick_start == 0)
- window->win_nick_start += window->win_nick_height;
- else
window->win_nick_start += (window->win_nick_height - 1);
+ else
+ window->win_nick_start += (window->win_nick_height - 2);
gui_draw_buffer_nick (window->buffer, 1);
}
}
diff --git a/src/gui/gui.h b/src/gui/gui.h
index c5bf0db87..d684f01ba 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -210,9 +210,9 @@ struct t_gui_window
int win_chat_cursor_y; /* position of cursor in chat window */
/* nicklist window settings */
- int win_nick_x, win_nick_y; /* chat window position */
- int win_nick_width; /* width of chat window */
- int win_nick_height; /* height of chat window */
+ int win_nick_x, win_nick_y; /* nick window position */
+ int win_nick_width; /* width of nick window */
+ int win_nick_height; /* height of nick window */
int win_nick_start; /* # of 1st nick for display (scroll) */
/* windows for Curses GUI */