diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-03 11:48:51 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-03 11:48:51 +0200 |
commit | a6363a7b0b49adafe7770ef0dd2fed95c6447096 (patch) | |
tree | b347a8377dd295fc0a923dae564128f2c74dcacd /src/gui/curses | |
parent | 89701be94f614d751926dae1840013fed757a00e (diff) | |
download | weechat-a6363a7b0b49adafe7770ef0dd2fed95c6447096.zip |
Fix display of bold/reverse/underline color attributes in bars
Diffstat (limited to 'src/gui/curses')
-rw-r--r-- | src/gui/curses/gui-curses-bar-window.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c index c34b4f02a..cfc769911 100644 --- a/src/gui/curses/gui-curses-bar-window.c +++ b/src/gui/curses/gui-curses-bar-window.c @@ -276,6 +276,56 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window, CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG])); string++; break; + case GUI_COLOR_SET_WEECHAT_CHAR: + string++; + switch (string[0]) + { + case GUI_COLOR_ATTR_BOLD_CHAR: + string++; + gui_window_set_color_style (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, + A_BOLD); + break; + case GUI_COLOR_ATTR_REVERSE_CHAR: + string++; + gui_window_set_color_style (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, + A_REVERSE); + break; + case GUI_COLOR_ATTR_ITALIC_CHAR: + /* not available in Curses GUI */ + string++; + break; + case GUI_COLOR_ATTR_UNDERLINE_CHAR: + string++; + gui_window_set_color_style (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, + A_UNDERLINE); + break; + } + break; + case GUI_COLOR_REMOVE_WEECHAT_CHAR: + string++; + switch (string[0]) + { + case GUI_COLOR_ATTR_BOLD_CHAR: + string++; + gui_window_remove_color_style (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, + A_BOLD); + break; + case GUI_COLOR_ATTR_REVERSE_CHAR: + string++; + gui_window_remove_color_style (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, + A_REVERSE); + break; + case GUI_COLOR_ATTR_ITALIC_CHAR: + /* not available in Curses GUI */ + string++; + break; + case GUI_COLOR_ATTR_UNDERLINE_CHAR: + string++; + gui_window_remove_color_style (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, + A_UNDERLINE); + break; + } + break; default: next_char = utf8_next_char (string); if (!next_char) |