diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-22 16:33:04 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-22 16:33:04 +0000 |
commit | 4f0dc2984bcfe28a66ebb86c8127bd1556450ca9 (patch) | |
tree | 82ab718f7eca1396adf4c7b3cfdc6f00aa4f6b19 /src | |
parent | 88ee7addbcc2e17c486b27cbe6a4db62eb9a60a1 (diff) | |
download | weechat-4f0dc2984bcfe28a66ebb86c8127bd1556450ca9.zip |
Added color for windows separators, fixed minor refresh bug when changing some colors
Diffstat (limited to 'src')
-rw-r--r-- | src/common/weeconfig.c | 10 | ||||
-rw-r--r-- | src/common/weeconfig.h | 1 | ||||
-rw-r--r-- | src/gui/curses/gui-display.c | 3 | ||||
-rw-r--r-- | src/gui/gui.h | 4 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c index 5818b257b..c5e2f5db7 100644 --- a/src/common/weeconfig.c +++ b/src/common/weeconfig.c @@ -235,6 +235,7 @@ t_config_option weechat_options_look[] = /* config, colors section */ int cfg_col_real_white; +int cfg_col_separator; int cfg_col_title; int cfg_col_title_bg; int cfg_col_chat; @@ -300,6 +301,10 @@ t_config_option weechat_options_colors[] = "this option to see real white instead of default term foreground color)"), OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE, NULL, NULL, &cfg_col_real_white, NULL, config_change_color }, + { "col_separator", N_("color for window separators (when splited)"), + N_("color for window separators (when splited)"), + OPTION_TYPE_COLOR, 0, 0, 0, + "blue", NULL, &cfg_col_separator, NULL, &config_change_color }, /* title window */ { "col_title", N_("color for title bar"), N_("color for title bar"), @@ -1102,12 +1107,9 @@ config_change_one_server_buffer () void config_change_color () { - t_gui_window *ptr_win; - gui_init_color_pairs (); gui_rebuild_weechat_colors (); - for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) - gui_redraw_buffer (ptr_win->buffer); + gui_refresh_windows (); } /* diff --git a/src/common/weeconfig.h b/src/common/weeconfig.h index 7df3d78cb..ca5859a43 100644 --- a/src/common/weeconfig.h +++ b/src/common/weeconfig.h @@ -112,6 +112,7 @@ extern char *cfg_look_day_change_timestamp; extern char *cfg_look_read_marker; extern int cfg_col_real_white; +extern int cfg_col_separator; extern int cfg_col_title; extern int cfg_col_title_bg; extern int cfg_col_chat; diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index aa103abb9..f5834f1f8 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -772,7 +772,7 @@ gui_draw_window_separator (t_gui_window *window) 1, window->win_y, window->win_x - 1); - gui_window_set_weechat_color (window->win_separator, COLOR_WIN_TITLE); + gui_window_set_weechat_color (window->win_separator, COLOR_WIN_SEPARATOR); wborder (window->win_separator, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '); wnoutrefresh (window->win_separator); refresh (); @@ -3293,6 +3293,7 @@ gui_init_weechat_colors () int i; /* init WeeChat colors */ + gui_color[COLOR_WIN_SEPARATOR] = gui_color_build (COLOR_WIN_SEPARATOR, cfg_col_separator, cfg_col_separator); gui_color[COLOR_WIN_TITLE] = gui_color_build (COLOR_WIN_TITLE, cfg_col_title, cfg_col_title_bg); gui_color[COLOR_WIN_CHAT] = gui_color_build (COLOR_WIN_CHAT, cfg_col_chat, cfg_col_chat_bg); gui_color[COLOR_WIN_CHAT_TIME] = gui_color_build (COLOR_WIN_CHAT_TIME, cfg_col_chat_time, cfg_col_chat_bg); diff --git a/src/gui/gui.h b/src/gui/gui.h index 5515bb805..fcad925b3 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -44,7 +44,8 @@ typedef enum t_weechat_color t_weechat_color; enum t_weechat_color { - COLOR_WIN_TITLE = 0, + COLOR_WIN_SEPARATOR = 0, + COLOR_WIN_TITLE, COLOR_WIN_CHAT, COLOR_WIN_CHAT_TIME, COLOR_WIN_CHAT_TIME_SEP, @@ -516,6 +517,7 @@ extern void gui_window_nick_end (t_gui_window *); extern void gui_window_nick_page_up (t_gui_window *); extern void gui_window_nick_page_down (t_gui_window *); extern void gui_window_init_subwindows (t_gui_window *); +extern void gui_refresh_windows (); extern void gui_window_split_horiz (t_gui_window *, int); extern void gui_window_split_vertic (t_gui_window *, int); extern void gui_window_resize (t_gui_window *, int); |