From 16e62bdc609076fa55e8e0140c839703892108d0 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 4 Mar 2010 14:12:36 +0100 Subject: Fix display in bars with filling set to columns_vertical or columns_horizontal --- src/gui/curses/gui-curses-bar-window.c | 10 ++++++---- 1 file 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); } } -- cgit v1.2.3