summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-bar-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/curses/gui-curses-bar-window.c')
-rw-r--r--src/gui/curses/gui-curses-bar-window.c38
1 files changed, 13 insertions, 25 deletions
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c
index 3e5ee5a1d..801a9078e 100644
--- a/src/gui/curses/gui-curses-bar-window.c
+++ b/src/gui/curses/gui-curses-bar-window.c
@@ -405,7 +405,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
int chars_available, index, size;
int length_screen_before_cursor, length_screen_after_cursor;
int diff, max_length, optimal_number_of_lines;
- int some_data_not_displayed, separator_horizontal, separator_vertical;
+ int some_data_not_displayed;
int index_item, index_subitem, index_line;
if (!gui_init_ok)
@@ -747,47 +747,35 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
if (CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_SEPARATOR]))
{
- separator_horizontal = ACS_HLINE;
- separator_vertical = ACS_VLINE;
- if (CONFIG_STRING(config_look_separator_horizontal)
- && CONFIG_STRING(config_look_separator_horizontal)[0])
- {
- separator_horizontal = utf8_char_int (CONFIG_STRING(config_look_separator_horizontal));
- if (separator_horizontal > 127)
- separator_horizontal = ACS_HLINE;
- }
- if (CONFIG_STRING(config_look_separator_vertical)
- && CONFIG_STRING(config_look_separator_vertical)[0])
- {
- separator_vertical = utf8_char_int (CONFIG_STRING(config_look_separator_vertical));
- if (separator_vertical > 127)
- separator_vertical = ACS_VLINE;
- }
switch (CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_POSITION]))
{
case GUI_BAR_POSITION_BOTTOM:
gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
GUI_COLOR_SEPARATOR);
- mvwhline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
- 0, 0, separator_horizontal, bar_window->width);
+ gui_window_hline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
+ 0, 0, bar_window->width,
+ CONFIG_STRING(config_look_separator_horizontal));
break;
case GUI_BAR_POSITION_TOP:
gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
GUI_COLOR_SEPARATOR);
- mvwhline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
- 0, 0, separator_horizontal, bar_window->width);
+ gui_window_hline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
+ 0, 0, bar_window->width,
+ CONFIG_STRING(config_look_separator_horizontal));
break;
case GUI_BAR_POSITION_LEFT:
gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
GUI_COLOR_SEPARATOR);
- mvwvline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
- 0, 0, separator_vertical, bar_window->height);
+ gui_window_vline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
+ 0, 0, bar_window->height,
+ CONFIG_STRING(config_look_separator_vertical));
break;
case GUI_BAR_POSITION_RIGHT:
gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
GUI_COLOR_SEPARATOR);
- mvwvline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
- 0, 0, separator_vertical, bar_window->height);
+ gui_window_vline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator,
+ 0, 0, bar_window->height,
+ CONFIG_STRING(config_look_separator_vertical));
break;
case GUI_BAR_NUM_POSITIONS:
break;