diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-02-24 09:44:22 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-02-24 09:44:22 +0100 |
commit | a79f7219935b5c888e4071c0b7a5a2ad6ca1034d (patch) | |
tree | 64601019108278b0dcc9c2187e6f493021f67b8b /src/gui | |
parent | 4eb25460828cce238f03086d5102a9977b306265 (diff) | |
download | weechat-a79f7219935b5c888e4071c0b7a5a2ad6ca1034d.zip |
Reset color used to display spaces around time and buffer in chat area
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index a8a21474d..bca6ffb83 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -442,36 +442,28 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window, int i, length, length_allowed, num_spaces; struct t_gui_lines *mixed_lines; + if (!simulate) + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); + /* display time */ if (window->buffer->time_for_each_line && (line->data->str_time && line->data->str_time[0])) { - if (!simulate) - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); - gui_chat_display_word (window, line, line->data->str_time, NULL, 1, num_lines, count, lines_displayed, simulate); + + if (!simulate) + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, lines_displayed, simulate); } - else - { - if (!simulate) - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); - } /* display buffer name (if many buffers are merged) */ mixed_lines = line->data->buffer->mixed_lines; if (mixed_lines) { - if (!simulate) - { - gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat, - GUI_COLOR_CHAT_PREFIX_BUFFER); - } - if ((CONFIG_INTEGER(config_look_prefix_buffer_align_max) > 0) && (CONFIG_INTEGER(config_look_prefix_buffer_align) != CONFIG_LOOK_PREFIX_BUFFER_ALIGN_NONE)) { @@ -487,6 +479,11 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window, if (CONFIG_INTEGER(config_look_prefix_buffer_align) == CONFIG_LOOK_PREFIX_BUFFER_ALIGN_RIGHT) { + if (!simulate) + { + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, + GUI_COLOR_CHAT); + } for (i = 0; i < num_spaces; i++) { gui_chat_display_word (window, line, str_space, @@ -495,6 +492,12 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window, } } + if (!simulate) + { + gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat, + GUI_COLOR_CHAT_PREFIX_BUFFER); + } + /* not enough space to display full buffer name? => truncate it! */ if ((CONFIG_INTEGER(config_look_prefix_buffer_align) != CONFIG_LOOK_PREFIX_BUFFER_ALIGN_NONE) && (num_spaces < 0)) @@ -531,6 +534,11 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window, } else { + if (!simulate) + { + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, + GUI_COLOR_CHAT); + } if ((CONFIG_INTEGER(config_look_prefix_buffer_align) == CONFIG_LOOK_PREFIX_BUFFER_ALIGN_LEFT) || ((CONFIG_INTEGER(config_look_prefix_buffer_align) == CONFIG_LOOK_PREFIX_BUFFER_ALIGN_NONE) && (CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE))) |