summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-03-04 14:12:36 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-03-04 14:12:36 +0100
commit16e62bdc609076fa55e8e0140c839703892108d0 (patch)
tree208578a8ecdb876e3722df86436df7398e94758c
parentfa60269325264785af6ae4a3c43ad06ee69bb58d (diff)
downloadweechat-16e62bdc609076fa55e8e0140c839703892108d0.zip
Fix display in bars with filling set to columns_vertical or columns_horizontal
-rw-r--r--src/gui/curses/gui-curses-bar-window.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c
index 881ca5779..24b0c9468 100644
--- a/src/gui/curses/gui-curses-bar-window.c
+++ b/src/gui/curses/gui-curses-bar-window.c
@@ -147,6 +147,7 @@ gui_bar_window_create_win (struct t_gui_bar_window *bar_window)
int
gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
+ enum t_gui_bar_filling filling,
int *x, int *y,
const char *string,
int reset_color_before_display,
@@ -368,7 +369,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
{
if (*x + size_on_screen > bar_window->width)
{
- if (gui_bar_get_filling (bar_window->bar) == GUI_BAR_FILLING_VERTICAL)
+ if (filling == GUI_BAR_FILLING_VERTICAL)
return 0;
if (*y >= bar_window->height - 1)
return 0;
@@ -390,7 +391,7 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
*x += size_on_screen;
if ((*x >= bar_window->width)
- && (gui_bar_get_filling (bar_window->bar) != GUI_BAR_FILLING_VERTICAL))
+ && (filling == GUI_BAR_FILLING_HORIZONTAL))
{
if (*y >= bar_window->height - 1)
return 0;
@@ -619,7 +620,8 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
if ((bar_window->scroll_y == 0)
|| (line >= bar_window->scroll_y))
{
- if (!gui_bar_window_print_string (bar_window, &x, &y,
+ if (!gui_bar_window_print_string (bar_window, filling,
+ &x, &y,
items[line], 1, 1))
{
some_data_not_displayed = 1;
@@ -636,7 +638,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
}
while (x < bar_window->width)
{
- gui_bar_window_print_string (bar_window,
+ gui_bar_window_print_string (bar_window, filling,
&x, &y, " ", 0, 0);
}
}