diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-nicklist.c | 20 | ||||
-rw-r--r-- | weechat/ChangeLog | 4 | ||||
-rw-r--r-- | weechat/src/gui/curses/gui-curses-nicklist.c | 20 |
4 files changed, 38 insertions, 10 deletions
@@ -1,10 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2007-01-08 +ChangeLog - 2007-01-09 Version 0.2.3 (under dev!): + * fixed display bugs with nicklist at top/bottom when look_nicklist_separator + is OFF (bug #18737) * fixed iconv problem, causing truncated words when using iso locale * fixed topic scroll when topic has multi-bytes chars * fixed compilation problem with iconv under FreeBSD diff --git a/src/gui/curses/gui-curses-nicklist.c b/src/gui/curses/gui-curses-nicklist.c index debd0f1a9..eb01c6ac3 100644 --- a/src/gui/curses/gui-curses-nicklist.c +++ b/src/gui/curses/gui-curses-nicklist.c @@ -43,7 +43,7 @@ void gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size) { t_gui_window *ptr_win; - int i, j, k, x, y, x2, column, max_length, max_chars, nicks_displayed; + int i, j, k, x, y, x2, max_y, column, max_length, max_chars, nicks_displayed; char format_empty[32], *buf, *ptr_buf, *ptr_next, saved_char; t_irc_nick *ptr_nick; @@ -125,6 +125,20 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size) gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_nick, COLOR_WIN_NICK); x = 0; y = (cfg_look_nicklist_separator && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? 1 : 0; + max_y = 0; + switch (cfg_look_nicklist_position) + { + case CFG_LOOK_NICKLIST_LEFT: + case CFG_LOOK_NICKLIST_RIGHT: + max_y = 0; + break; + case CFG_LOOK_NICKLIST_TOP: + max_y = ptr_win->win_nick_height - cfg_look_nicklist_separator; + break; + case CFG_LOOK_NICKLIST_BOTTOM: + max_y = ptr_win->win_nick_height; + break; + } column = 0; if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) || @@ -240,9 +254,7 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size) if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) || (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) { - if (y - ((cfg_look_nicklist_separator - && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? 1 : 0) - >= ptr_win->win_nick_height - 1) + if (y >= max_y) { column += max_length + 2; y = (cfg_look_nicklist_separator && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 598bdc33b..3c413213d 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,10 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2007-01-08 +ChangeLog - 2007-01-09 Version 0.2.3 (under dev!): + * fixed display bugs with nicklist at top/bottom when look_nicklist_separator + is OFF (bug #18737) * fixed iconv problem, causing truncated words when using iso locale * fixed topic scroll when topic has multi-bytes chars * fixed compilation problem with iconv under FreeBSD diff --git a/weechat/src/gui/curses/gui-curses-nicklist.c b/weechat/src/gui/curses/gui-curses-nicklist.c index debd0f1a9..eb01c6ac3 100644 --- a/weechat/src/gui/curses/gui-curses-nicklist.c +++ b/weechat/src/gui/curses/gui-curses-nicklist.c @@ -43,7 +43,7 @@ void gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size) { t_gui_window *ptr_win; - int i, j, k, x, y, x2, column, max_length, max_chars, nicks_displayed; + int i, j, k, x, y, x2, max_y, column, max_length, max_chars, nicks_displayed; char format_empty[32], *buf, *ptr_buf, *ptr_next, saved_char; t_irc_nick *ptr_nick; @@ -125,6 +125,20 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size) gui_window_set_weechat_color (GUI_CURSES(ptr_win)->win_nick, COLOR_WIN_NICK); x = 0; y = (cfg_look_nicklist_separator && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? 1 : 0; + max_y = 0; + switch (cfg_look_nicklist_position) + { + case CFG_LOOK_NICKLIST_LEFT: + case CFG_LOOK_NICKLIST_RIGHT: + max_y = 0; + break; + case CFG_LOOK_NICKLIST_TOP: + max_y = ptr_win->win_nick_height - cfg_look_nicklist_separator; + break; + case CFG_LOOK_NICKLIST_BOTTOM: + max_y = ptr_win->win_nick_height; + break; + } column = 0; if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) || @@ -240,9 +254,7 @@ gui_nicklist_draw (t_gui_buffer *buffer, int erase, int calculate_size) if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) || (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) { - if (y - ((cfg_look_nicklist_separator - && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? 1 : 0) - >= ptr_win->win_nick_height - 1) + if (y >= max_y) { column += max_length + 2; y = (cfg_look_nicklist_separator && (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM)) ? |