diff --git a/src/core/wee-config.c b/src/core/wee-config.c index fc7a12f..480b4c3 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -85,6 +85,10 @@ struct t_config_option *config_look_bar_more_up; struct t_config_option *config_look_bar_more_down; struct t_config_option *config_look_buffer_notify_default; struct t_config_option *config_look_buffer_time_format; +struct t_config_option *config_look_color_inactive_time; +struct t_config_option *config_look_color_inactive_prefix_buffer; +struct t_config_option *config_look_color_inactive_prefix; +struct t_config_option *config_look_color_inactive_message; struct t_config_option *config_look_color_pairs_auto_reset; struct t_config_option *config_look_color_real_white; struct t_config_option *config_look_command_chars; @@ -147,9 +151,12 @@ struct t_config_option *config_color_separator; struct t_config_option *config_color_bar_more; struct t_config_option *config_color_chat; struct t_config_option *config_color_chat_bg; +struct t_config_option *config_color_chat_inactive_window; +struct t_config_option *config_color_chat_inactive_line; struct t_config_option *config_color_chat_time; struct t_config_option *config_color_chat_time_delimiters; struct t_config_option *config_color_chat_prefix_buffer; +struct t_config_option *config_color_chat_prefix_buffer_inactive_line; struct t_config_option *config_color_chat_prefix[GUI_CHAT_NUM_PREFIXES]; struct t_config_option *config_color_chat_prefix_more; struct t_config_option *config_color_chat_prefix_suffix; @@ -1644,6 +1651,31 @@ config_weechat_init_options () "\"${color}\", for example french time: " "\"${lightblue}%H${white}%M${lightred}%S\""), NULL, 0, 0, "%H:%M:%S", NULL, 0, NULL, NULL, &config_change_buffer_time_format, NULL, NULL, NULL); + config_look_color_inactive_time = config_file_new_option ( + weechat_config_file, ptr_section, + "color_inactive_time", "boolean", + N_("use special color for inactive time (when window is not current " + "window, or if line is from a merged buffer not selected)"), + NULL, 0, 0, "off", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL); + config_look_color_inactive_prefix_buffer = config_file_new_option ( + weechat_config_file, ptr_section, + "color_inactive_prefix_buffer", "boolean", + N_("use special color for inactive buffer name in prefix (when window " + "is not current window, or if line is from a merged buffer not " + "selected)"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL); + config_look_color_inactive_prefix = config_file_new_option ( + weechat_config_file, ptr_section, + "color_inactive_prefix", "boolean", + N_("use special color for inactive prefix (when window is not current " + "window, or if line is from a merged buffer not selected)"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL); + config_look_color_inactive_message = config_file_new_option ( + weechat_config_file, ptr_section, + "color_inactive_message", "boolean", + N_("use special color for inactive message (when window is not current " + "window, or if line is from a merged buffer not selected)"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL); config_look_color_pairs_auto_reset = config_file_new_option ( weechat_config_file, ptr_section, "color_pairs_auto_reset", "integer", @@ -2051,6 +2083,20 @@ config_weechat_init_options () N_("background color for chat"), NULL, -1, 0, "default", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL); + config_color_chat_inactive_window = config_file_new_option ( + weechat_config_file, ptr_section, + "chat_inactive_window", "color", + N_("text color for chat when window is inactive (not current selected " + "window)"), + NULL, GUI_COLOR_CHAT_INACTIVE_WINDOW, 0, "darkgray", NULL, 0, + NULL, NULL, &config_change_color, NULL, NULL, NULL); + config_color_chat_inactive_line = config_file_new_option ( + weechat_config_file, ptr_section, + "chat_inactive_line", "color", + N_("text color for chat when line is inactive (buffer is merged with " + "other buffers and is not selected)"), + NULL, GUI_COLOR_CHAT_INACTIVE_LINE, 0, "darkgray", NULL, 0, + NULL, NULL, &config_change_color, NULL, NULL, NULL); config_color_chat_time = config_file_new_option ( weechat_config_file, ptr_section, "chat_time", "color", @@ -2070,6 +2116,14 @@ config_weechat_init_options () "merged with same number)"), NULL, GUI_COLOR_CHAT_PREFIX_BUFFER, 0, "brown", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL); + config_color_chat_prefix_buffer_inactive_line = config_file_new_option ( + weechat_config_file, ptr_section, + "chat_prefix_buffer_inactive_line", "color", + N_("text color for inactive buffer name (before prefix, when many " + "buffers are merged with same number and if buffer is not " + "selected)"), + NULL, GUI_COLOR_CHAT_PREFIX_BUFFER_INACTIVE_LINE, 0, "darkgray", NULL, 0, + NULL, NULL, &config_change_color, NULL, NULL, NULL); config_color_chat_prefix[GUI_CHAT_PREFIX_ERROR] = config_file_new_option ( weechat_config_file, ptr_section, "chat_prefix_error", "color", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index d411706..3e863f8 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -112,6 +112,10 @@ extern struct t_config_option *config_look_buffer_notify_default; extern struct t_config_option *config_look_buffer_time_format; extern struct t_config_option *config_look_command_chars; extern struct t_config_option *config_look_confirm_quit; +extern struct t_config_option *config_look_color_inactive_time; +extern struct t_config_option *config_look_color_inactive_prefix_buffer; +extern struct t_config_option *config_look_color_inactive_prefix; +extern struct t_config_option *config_look_color_inactive_message; extern struct t_config_option *config_look_color_pairs_auto_reset; extern struct t_config_option *config_look_color_real_white; extern struct t_config_option *config_look_day_change; @@ -169,9 +173,12 @@ extern struct t_config_option *config_color_separator; extern struct t_config_option *config_color_bar_more; extern struct t_config_option *config_color_chat; extern struct t_config_option *config_color_chat_bg; +extern struct t_config_option *config_color_chat_inactive_window; +extern struct t_config_option *config_color_chat_inactive_line; extern struct t_config_option *config_color_chat_time; extern struct t_config_option *config_color_chat_time_delimiters; extern struct t_config_option *config_color_chat_prefix_buffer; +extern struct t_config_option *config_color_chat_prefix_buffer_inactive_line; extern struct t_config_option *config_color_chat_prefix[]; extern struct t_config_option *config_color_chat_prefix_more; extern struct t_config_option *config_color_chat_prefix_suffix; diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index 95afebe..ceffcb5 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -101,6 +101,42 @@ gui_chat_marker_for_line (struct t_gui_buffer *buffer, struct t_gui_line *line) } /* + * gui_chat_reset_style: reset style using color depending on window (active or + * not) and line (buffer selected in merged buffer or not) + */ + +void +gui_chat_reset_style (struct t_gui_window *window, struct t_gui_line *line) +{ + if (CONFIG_BOOLEAN(config_look_color_inactive_message)) + { + if (window != gui_current_window) + { + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, + GUI_COLOR_CHAT_INACTIVE_WINDOW); + } + else + { + if (line && !(line->data->buffer->active)) + { + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, + GUI_COLOR_CHAT_INACTIVE_LINE); + } + else + { + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, + GUI_COLOR_CHAT); + } + } + } + else + { + gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, + GUI_COLOR_CHAT); + } +} + +/* * gui_chat_display_new_line: display a new line */ @@ -170,9 +206,17 @@ gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate) */ char * -gui_chat_string_next_char (struct t_gui_window *window, - const unsigned char *string, int apply_style) +gui_chat_string_next_char (struct t_gui_window *window, struct t_gui_line *line, + const unsigned char *string, int apply_style, + int apply_style_inactive) { + if (apply_style && apply_style_inactive + && ((window != gui_current_window) + || (line && !(line->data->buffer->active)))) + { + apply_style = 0; + } + while (string[0]) { switch (string[0]) @@ -236,7 +280,7 @@ gui_chat_string_next_char (struct t_gui_window *window, case GUI_COLOR_RESET_CHAR: string++; if (apply_style) - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); + gui_chat_reset_style (window, line); break; default: return (char *)string; @@ -255,8 +299,10 @@ gui_chat_string_next_char (struct t_gui_window *window, */ int -gui_chat_display_word_raw (struct t_gui_window *window, const char *string, - int max_chars_on_screen, int display) +gui_chat_display_word_raw (struct t_gui_window *window, struct t_gui_line *line, + const char *string, + int max_chars_on_screen, int display, + int apply_style_inactive) { char *next_char, *output, utf_char[16]; int x, chars_displayed, display_char, size_on_screen; @@ -273,8 +319,9 @@ gui_chat_display_word_raw (struct t_gui_window *window, const char *string, while (string && string[0]) { - string = gui_chat_string_next_char (window, - (unsigned char *)string, 1); + string = gui_chat_string_next_char (window, line, + (unsigned char *)string, 1, + apply_style_inactive); if (!string) return chars_displayed; @@ -322,7 +369,8 @@ gui_chat_display_word (struct t_gui_window *window, struct t_gui_line *line, const char *word, const char *word_end, int prefix, int num_lines, int count, - int *lines_displayed, int simulate) + int *lines_displayed, int simulate, + int apply_style_inactive) { char *data, *ptr_data, *end_line, saved_char, str_space[] = " "; int pos_saved_char, chars_to_display, num_displayed; @@ -381,13 +429,16 @@ gui_chat_display_word (struct t_gui_window *window, ptr_attrs, ptr_pair, NULL); gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT_PREFIX_SUFFIX); - gui_chat_display_word_raw (window, + gui_chat_display_word_raw (window, line, CONFIG_STRING(config_look_prefix_suffix), - 0, 1); + 0, 1, apply_style_inactive); } window->win_chat_cursor_x += gui_chat_strlen_screen (CONFIG_STRING(config_look_prefix_suffix)); if (!simulate) - gui_chat_display_word_raw (window, str_space, 0, 1); + { + gui_chat_display_word_raw (window, line, str_space, 0, 1, + apply_style_inactive); + } window->win_chat_cursor_x += gui_chat_strlen_screen (str_space); if (!simulate) wattr_set (GUI_WINDOW_OBJECTS(window)->win_chat, attrs, pair, NULL); @@ -408,9 +459,15 @@ gui_chat_display_word (struct t_gui_window *window, saved_char = ptr_data[pos_saved_char]; ptr_data[pos_saved_char] = '\0'; if ((count == 0) || (*lines_displayed >= num_lines - count)) - gui_chat_display_word_raw (window, ptr_data, 0, 1); + { + gui_chat_display_word_raw (window, line, ptr_data, 0, 1, + apply_style_inactive); + } else - gui_chat_display_word_raw (window, ptr_data, 0, 0); + { + gui_chat_display_word_raw (window, line, ptr_data, 0, 0, + apply_style_inactive); + } ptr_data[pos_saved_char] = saved_char; } ptr_data += pos_saved_char; @@ -421,9 +478,15 @@ gui_chat_display_word (struct t_gui_window *window, if (!simulate) { if ((count == 0) || (*lines_displayed >= num_lines - count)) - gui_chat_display_word_raw (window, ptr_data, 0, 1); + { + gui_chat_display_word_raw (window, line, ptr_data, 0, 1, + apply_style_inactive); + } else - gui_chat_display_word_raw (window, ptr_data, 0, 0); + { + gui_chat_display_word_raw (window, line, ptr_data, 0, 0, + apply_style_inactive); + } } ptr_data += strlen (ptr_data); } @@ -467,7 +530,7 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, { if (window->win_chat_cursor_y < window->coords_size) window->coords[window->win_chat_cursor_y].line = line; - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); + gui_chat_reset_style (window, line); } /* display time */ @@ -478,15 +541,17 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, window->coords[window->win_chat_cursor_y].time_x1 = window->win_chat_cursor_x; gui_chat_display_word (window, line, line->data->str_time, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_time)); if (window->win_chat_cursor_y < window->coords_size) window->coords[window->win_chat_cursor_y].time_x2 = window->win_chat_cursor_x - 1; if (!simulate) - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); + gui_chat_reset_style (window, line); gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_time)); } /* display buffer name (if many buffers are merged) */ @@ -510,22 +575,22 @@ gui_chat_display_time_to_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); - } + gui_chat_reset_style (window, line); for (i = 0; i < num_spaces; i++) { gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, - lines_displayed, simulate); + lines_displayed, simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix_buffer)); } } if (!simulate) { gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat, - GUI_COLOR_CHAT_PREFIX_BUFFER); + (line->data->buffer->active) ? + GUI_COLOR_CHAT_PREFIX_BUFFER : + GUI_COLOR_CHAT_PREFIX_BUFFER_INACTIVE_LINE); } if (window->win_chat_cursor_y < window->coords_size) @@ -541,13 +606,15 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, gui_chat_string_real_pos (short_name, length_allowed), 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix_buffer)); } else { gui_chat_display_word (window, line, short_name, NULL, 1, num_lines, count, - lines_displayed, simulate); + lines_displayed, simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix_buffer)); } if (window->win_chat_cursor_y < window->coords_size) @@ -565,15 +632,13 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, (CONFIG_BOOLEAN(config_look_prefix_buffer_align_more)) ? str_plus : str_space, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix_buffer)); } else { if (!simulate) - { - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, - GUI_COLOR_CHAT); - } + gui_chat_reset_style (window, line); 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))) @@ -582,14 +647,16 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, { gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix_buffer)); } } if (mixed_lines->buffer_max_length > 0) { gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix_buffer)); } } } @@ -600,10 +667,7 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, || (CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE))) { if (!simulate) - { - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, - GUI_COLOR_CHAT); - } + gui_chat_reset_style (window, line); if (CONFIG_INTEGER(config_look_prefix_align_max) > 0) { @@ -622,7 +686,8 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, { gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, - lines_displayed, simulate); + lines_displayed, simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix)); } } @@ -652,14 +717,16 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, line->data->prefix + gui_chat_string_real_pos (line->data->prefix, length_allowed), 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix)); } else { gui_chat_display_word (window, line, (prefix_highlighted) ? prefix_highlighted : line->data->prefix, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix)); } if (window->win_chat_cursor_y < window->coords_size) @@ -669,7 +736,7 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, free (prefix_highlighted); if (!simulate) - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); + gui_chat_reset_style (window, line); if (CONFIG_INTEGER(config_look_prefix_align) == CONFIG_LOOK_PREFIX_ALIGN_LEFT) { @@ -677,7 +744,8 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, { gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix)); } } if ((CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE) @@ -692,7 +760,8 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, (CONFIG_BOOLEAN(config_look_prefix_align_more)) ? str_plus : str_space, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix)); } else { @@ -700,7 +769,8 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, { gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_prefix)); } } if ((CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE) @@ -715,10 +785,10 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window, gui_chat_display_word (window, line, CONFIG_STRING(config_look_prefix_suffix), NULL, 1, num_lines, count, - lines_displayed, simulate); + lines_displayed, simulate, 0); gui_chat_display_word (window, line, str_space, NULL, 1, num_lines, count, - lines_displayed, simulate); + lines_displayed, simulate, 0); } } } @@ -790,7 +860,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, /* reset color & style for a new line */ if (!simulate) - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); + gui_chat_reset_style (window, line); if (!line->data->message || !line->data->message[0]) { @@ -830,9 +900,10 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, while (ptr_style < ptr_data + word_start_offset) { /* loop until no style/char available */ - ptr_style = gui_chat_string_next_char (window, + ptr_style = gui_chat_string_next_char (window, line, (unsigned char *)ptr_style, - 1); + 1, + CONFIG_BOOLEAN(config_look_color_inactive_message)); if (!ptr_style) break; ptr_style = utf8_next_char (ptr_style); @@ -846,7 +917,8 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, gui_chat_display_word (window, line, ptr_data, ptr_end_offset + 1, 0, num_lines, count, &lines_displayed, - simulate); + simulate, + CONFIG_BOOLEAN(config_look_color_inactive_message)); if ((!simulate) && (window->win_chat_cursor_y >= window->win_chat_height)) ptr_data = NULL; @@ -864,9 +936,10 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line, next_char = utf8_next_char (ptr_data); if (!next_char) break; - ptr_data = gui_chat_string_next_char (window, + ptr_data = gui_chat_string_next_char (window, line, (unsigned char *)next_char, - 1); + 1, + CONFIG_BOOLEAN(config_look_color_inactive_message)); } } } @@ -938,7 +1011,7 @@ gui_chat_display_line_y (struct t_gui_window *window, struct t_gui_line *line, int y) { /* reset color & style for a new line */ - gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, GUI_COLOR_CHAT); + gui_chat_reset_style (window, line); window->win_chat_cursor_x = 0; window->win_chat_cursor_y = y; @@ -948,8 +1021,9 @@ gui_chat_display_line_y (struct t_gui_window *window, struct t_gui_line *line, window->win_chat_cursor_x); wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat); - if (gui_chat_display_word_raw (window, line->data->message, - window->win_chat_width, 1) < window->win_chat_width) + if (gui_chat_display_word_raw (window, line, line->data->message, + window->win_chat_width, 1, + CONFIG_BOOLEAN(config_look_color_inactive_message)) < window->win_chat_width) { gui_window_clrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat); } @@ -1077,11 +1151,10 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase) { gui_window_coords_alloc (ptr_win); + gui_chat_reset_style (ptr_win, NULL); + if (erase) { - gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(ptr_win)->win_chat, - GUI_COLOR_CHAT); - snprintf (format_empty, 32, "%%-%ds", ptr_win->win_chat_width); for (i = 0; i < ptr_win->win_chat_height; i++) { @@ -1090,9 +1163,6 @@ gui_chat_draw (struct t_gui_buffer *buffer, int erase) } } - gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(ptr_win)->win_chat, - GUI_COLOR_CHAT); - ptr_win->win_chat_cursor_x = 0; ptr_win->win_chat_cursor_y = 0; diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index 4f6f1c8..2375019 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -1382,6 +1382,9 @@ gui_color_init_weechat () gui_color_build (GUI_COLOR_CHAT_VALUE, CONFIG_COLOR(config_color_chat_value), CONFIG_COLOR(config_color_chat_bg)); gui_color_build (GUI_COLOR_CHAT_PREFIX_BUFFER, CONFIG_COLOR(config_color_chat_prefix_buffer), CONFIG_COLOR(config_color_chat_bg)); gui_color_build (GUI_COLOR_CHAT_TAGS, CONFIG_COLOR(config_color_chat_tags), CONFIG_COLOR(config_color_chat_bg)); + gui_color_build (GUI_COLOR_CHAT_INACTIVE_WINDOW, CONFIG_COLOR(config_color_chat_inactive_window), CONFIG_COLOR(config_color_chat_bg)); + gui_color_build (GUI_COLOR_CHAT_INACTIVE_LINE, CONFIG_COLOR(config_color_chat_inactive_line), CONFIG_COLOR(config_color_chat_bg)); + gui_color_build (GUI_COLOR_CHAT_PREFIX_BUFFER_INACTIVE_LINE, CONFIG_COLOR(config_color_chat_prefix_buffer_inactive_line), CONFIG_COLOR(config_color_chat_bg)); /* * define old nick colors for compatibility on /upgrade with previous diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 08dc8d8..b4a88bb 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -1119,6 +1119,8 @@ gui_window_switch (struct t_gui_window *window) gui_window_switch_to_buffer (gui_current_window, gui_current_window->buffer, 1); + old_window->refresh_needed = 1; + gui_input_move_to_buffer (old_window->buffer, window->buffer); } diff --git a/src/gui/gtk/gui-gtk-chat.c b/src/gui/gtk/gui-gtk-chat.c index ce677f1..5f441b8 100644 --- a/src/gui/gtk/gui-gtk-chat.c +++ b/src/gui/gtk/gui-gtk-chat.c @@ -174,12 +174,15 @@ gui_chat_set_weechat_color (struct t_gui_window *window, int weechat_color) */ char * -gui_chat_string_next_char (struct t_gui_window *window, - const unsigned char *string, int apply_style) +gui_chat_string_next_char (struct t_gui_window *window, struct t_gui_line *line, + const unsigned char *string, int apply_style, + int apply_style_inactive) { /* TODO: write this function for Gtk */ (void) window; + (void) line; (void) apply_style; + (void) apply_style_inactive; return (char *)string; } diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 2cfd454..823b3fc 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -162,7 +162,8 @@ gui_chat_strlen_screen (const char *string) length = 0; while (string && string[0]) { - string = gui_chat_string_next_char (NULL, (unsigned char *)string, 0); + string = gui_chat_string_next_char (NULL, NULL, + (unsigned char *)string, 0, 0); if (string) { size_on_screen = (gui_chat_utf_char_valid (string)) ? utf8_char_size_screen (string) : 1; @@ -184,9 +185,9 @@ gui_chat_string_add_offset (const char *string, int offset) { while (string && string[0] && (offset > 0)) { - string = gui_chat_string_next_char (NULL, + string = gui_chat_string_next_char (NULL, NULL, (unsigned char *)string, - 0); + 0, 0); if (string) { string = utf8_next_char (string); @@ -209,9 +210,9 @@ gui_chat_string_add_offset_screen (const char *string, int offset_screen) while (string && string[0] && (offset_screen > 0)) { - string = gui_chat_string_next_char (NULL, + string = gui_chat_string_next_char (NULL, NULL, (unsigned char *)string, - 0); + 0, 0); if (string) { size_on_screen = (gui_chat_utf_char_valid (string)) ? utf8_char_size_screen (string) : 1; @@ -240,9 +241,9 @@ gui_chat_string_real_pos (const char *string, int pos) ptr_string = string; while (ptr_string && ptr_string[0] && (pos > 0)) { - ptr_string = gui_chat_string_next_char (NULL, + ptr_string = gui_chat_string_next_char (NULL, NULL, (unsigned char *)ptr_string, - 0); + 0, 0); if (ptr_string) { size_on_screen = (((unsigned char)ptr_string[0]) < 32) ? 1 : utf8_char_size_screen (ptr_string); @@ -279,8 +280,8 @@ gui_chat_get_word_info (struct t_gui_window *window, leading_spaces = 1; while (data && data[0]) { - next_char = gui_chat_string_next_char (window, (unsigned char *)data, - 0); + next_char = gui_chat_string_next_char (window, NULL, + (unsigned char *)data, 0, 0); if (next_char) { next_char2 = utf8_next_char (next_char); diff --git a/src/gui/gui-chat.h b/src/gui/gui-chat.h index f62ef80..6bcffaf 100644 --- a/src/gui/gui-chat.h +++ b/src/gui/gui-chat.h @@ -87,8 +87,10 @@ extern void gui_chat_end (); /* chat functions (GUI dependent) */ extern char *gui_chat_string_next_char (struct t_gui_window *window, + struct t_gui_line *line, const unsigned char *string, - int apply_style); + int apply_style, + int apply_style_inactive); extern void gui_chat_draw (struct t_gui_buffer *buffer, int erase); extern void gui_chat_draw_line (struct t_gui_buffer *buffer, struct t_gui_line *line); diff --git a/src/gui/gui-color.h b/src/gui/gui-color.h index b0f114c..90c2574 100644 --- a/src/gui/gui-color.h +++ b/src/gui/gui-color.h @@ -62,6 +62,9 @@ enum t_gui_color_enum GUI_COLOR_CHAT_VALUE, GUI_COLOR_CHAT_PREFIX_BUFFER, GUI_COLOR_CHAT_TAGS, + GUI_COLOR_CHAT_INACTIVE_WINDOW, + GUI_COLOR_CHAT_INACTIVE_LINE, + GUI_COLOR_CHAT_PREFIX_BUFFER_INACTIVE_LINE, /* number of colors */ GUI_COLOR_NUM_COLORS, diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index c29c73f..9fe1b6d 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -973,6 +973,7 @@ gui_line_add_y (struct t_gui_buffer *buffer, int y, const char *message) buffer->own_lines->lines_count++; /* fill data in new line */ + new_line->data->buffer = buffer; new_line->data->y = y; new_line->data->date = 0; new_line->data->date_printed = 0; diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c index 5d0c0eb..c1283ad 100644 --- a/src/gui/gui-window.c +++ b/src/gui/gui-window.c @@ -228,9 +228,9 @@ gui_window_get_context_at_xy (struct t_gui_window *window, word_start = (*line)->data->message; while (word_start && (word_start < ptr_data)) { - word_start = (char *)gui_chat_string_next_char (NULL, + word_start = (char *)gui_chat_string_next_char (NULL, NULL, (unsigned char *)word_start, - 0); + 0, 0); if (word_start) { if (word_start[0] == ' ') @@ -242,9 +242,9 @@ gui_window_get_context_at_xy (struct t_gui_window *window, word_end = ptr_data; while (word_end && word_end[0]) { - word_end = (char *)gui_chat_string_next_char (NULL, + word_end = (char *)gui_chat_string_next_char (NULL, NULL, (unsigned char *)word_end, - 0); + 0, 0); if (word_end) { if (word_end[0] == ' ') diff --git a/src/plugins/irc/irc-color.h b/src/plugins/irc/irc-color.h index ad9b4c3..e1d73a8 100644 --- a/src/plugins/irc/irc-color.h +++ b/src/plugins/irc/irc-color.h @@ -60,7 +60,7 @@ #define IRC_COLOR_BAR_FG weechat_color("bar_fg") #define IRC_COLOR_BAR_BG weechat_color("bar_bg") #define IRC_COLOR_BAR_DELIM weechat_color("bar_delim") -#define IRC_COLOR_CHAT weechat_color("chat") +#define IRC_COLOR_RESET weechat_color("reset") #define IRC_COLOR_CHAT_CHANNEL weechat_color("chat_channel") #define IRC_COLOR_CHAT_DELIMITERS weechat_color("chat_delimiters") #define IRC_COLOR_CHAT_HOST weechat_color("chat_host") diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 3790177..072e304 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -355,7 +355,7 @@ irc_command_me_channel_display (struct t_irc_server *server, weechat_prefix ("action"), IRC_COLOR_CHAT_NICK_SELF, server->nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (string) ? string : ""); if (string) free (string); @@ -854,7 +854,7 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME, IRC_COLOR_CHAT_SERVER, ptr_server->name, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); irc_server_apply_command_line_options (ptr_server, argc, argv); if (!irc_command_connect_one_server (ptr_server, 0, 0)) @@ -928,10 +928,10 @@ irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, argv[1], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, irc_cmd, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, " ", str_time); } @@ -948,10 +948,10 @@ irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, argv[1], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, irc_cmd, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[3]) ? " " : "", (argv_eol[3]) ? argv_eol[3] : ""); } @@ -1514,10 +1514,10 @@ irc_command_ignore_display (struct t_irc_ignore *ignore) weechat_printf (NULL, _(" %s[%s%d%s]%s mask: %s / server: %s / channel: %s"), IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, ignore->number, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (mask) ? mask : ignore->mask, (ignore->server) ? ignore->server : "*", (ignore->channel) ? ignore->channel : "*"); @@ -2559,7 +2559,7 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc, IRC_COLOR_CHAT_NICK, targets[i], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (string) ? string : ((msg_pwd_hidden) ? msg_pwd_hidden : argv_eol[arg_text])); @@ -2591,7 +2591,7 @@ irc_command_msg (void *data, struct t_gui_buffer *buffer, int argc, IRC_COLOR_CHAT_NICK, targets[i], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (string) ? string : argv_eol[arg_text]); } if (string) @@ -2767,11 +2767,11 @@ irc_command_notice (void *data, struct t_gui_buffer *buffer, int argc, IRC_COLOR_NOTICE, /* TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) */ _("Notice"), - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (irc_channel_is_channel (argv[arg_nick])) ? IRC_COLOR_CHAT_CHANNEL : IRC_COLOR_CHAT_NICK, argv[arg_nick], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (string) ? string : str_args); if (string) free (string); @@ -3748,7 +3748,7 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME, IRC_COLOR_CHAT_SERVER, new_server->name, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); /* do not connect to server after creating it */ /* @@ -3799,10 +3799,10 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME, IRC_COLOR_CHAT_SERVER, argv[2], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_SERVER, argv[3], - IRC_COLOR_CHAT); + IRC_COLOR_RESET); return WEECHAT_RC_OK; } @@ -3848,10 +3848,10 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME, IRC_COLOR_CHAT_SERVER, argv[2], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_SERVER, argv[3], - IRC_COLOR_CHAT); + IRC_COLOR_RESET); return WEECHAT_RC_OK; } @@ -3895,7 +3895,7 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME, IRC_COLOR_CHAT_SERVER, argv[2], - IRC_COLOR_CHAT); + IRC_COLOR_RESET); return WEECHAT_RC_OK; } @@ -3936,7 +3936,7 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME, IRC_COLOR_CHAT_SERVER, (server_name) ? server_name : "???", - IRC_COLOR_CHAT); + IRC_COLOR_RESET); if (server_name) free (server_name); @@ -4552,10 +4552,10 @@ irc_command_wallchops (void *data, struct t_gui_buffer *buffer, int argc, IRC_COLOR_NOTICE, /* TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) */ _("Notice"), - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, ptr_channel->name, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, argv_eol[pos_args]); support_wallchops = irc_server_get_isupport_value (ptr_server, diff --git a/src/plugins/irc/irc-ctcp.c b/src/plugins/irc/irc-ctcp.c index 0af20dd..e420269 100644 --- a/src/plugins/irc/irc-ctcp.c +++ b/src/plugins/irc/irc-ctcp.c @@ -126,10 +126,10 @@ irc_ctcp_display_request (struct t_irc_server *server, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, ctcp, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (arguments) ? " " : "", (arguments) ? arguments : "", (reply && !reply[0]) ? _(" (blocked)") : ""); @@ -188,10 +188,10 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, arguments + 1, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, difftime / 1000000, (difftime % 1000000) / 1000, (NG_("second", "seconds", @@ -210,10 +210,10 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, arguments + 1, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, " ", pos_args); } @@ -227,7 +227,7 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, arguments + 1, "", @@ -286,10 +286,10 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, ctcp, - (str_args[0]) ? IRC_COLOR_CHAT : "", + (str_args[0]) ? IRC_COLOR_RESET : "", (str_args[0]) ? " " : "", str_args); number++; @@ -823,7 +823,7 @@ irc_ctcp_recv_dcc (struct t_irc_server *server, const char *nick, IRC_PLUGIN_NAME, IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_file); free (dcc_args); return; @@ -922,7 +922,7 @@ irc_ctcp_recv (struct t_irc_server *server, const char *command, weechat_prefix ("action"), (ptr_nick) ? ptr_nick->color : ((nick) ? irc_nick_find_color (nick) : IRC_COLOR_CHAT_NICK), nick, - (pos_args) ? IRC_COLOR_CHAT : "", + (pos_args) ? IRC_COLOR_RESET : "", (pos_args) ? " " : "", (pos_args) ? pos_args : ""); } @@ -960,7 +960,7 @@ irc_ctcp_recv (struct t_irc_server *server, const char *command, (nick_is_me) ? IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (ptr_channel, nick), nick, - (pos_args) ? IRC_COLOR_CHAT : "", + (pos_args) ? IRC_COLOR_RESET : "", (pos_args) ? " " : "", (pos_args) ? pos_args : ""); weechat_hook_signal_send ("irc_pv", @@ -1019,10 +1019,10 @@ irc_ctcp_recv (struct t_irc_server *server, const char *command, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, arguments + 1, - (pos_args) ? IRC_COLOR_CHAT : "", + (pos_args) ? IRC_COLOR_RESET : "", (pos_args) ? " " : "", (pos_args) ? pos_args : ""); } diff --git a/src/plugins/irc/irc-display.c b/src/plugins/irc/irc-display.c index a1ce8f6..6e69625 100644 --- a/src/plugins/irc/irc-display.c +++ b/src/plugins/irc/irc-display.c @@ -144,7 +144,7 @@ irc_display_away (struct t_irc_server *server, const char *string1, IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_NICK, server->nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, string1, string2, IRC_COLOR_CHAT_DELIMITERS); @@ -165,16 +165,15 @@ irc_display_server (struct t_irc_server *server, int with_detail) if (with_detail) { weechat_printf (NULL, ""); - weechat_printf (NULL, _("%sServer: %s%s %s[%s%s%s]%s%s"), - IRC_COLOR_CHAT, + weechat_printf (NULL, _("Server: %s%s %s[%s%s%s]%s%s"), IRC_COLOR_CHAT_SERVER, server->name, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (server->is_connected) ? _("connected") : _("not connected"), IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (server->temp_server) ? _(" (temporary)") : ""); /* addresses */ if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_ADDRESSES])) @@ -476,11 +475,11 @@ irc_display_server (struct t_irc_server *server, int with_detail) IRC_COLOR_CHAT_SERVER, server->name, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (server->is_connected) ? _("connected") : _("not connected"), IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (server->temp_server) ? _(" (temporary)") : "", num_channels, NG_("channel", "channels", num_channels), @@ -491,7 +490,7 @@ irc_display_server (struct t_irc_server *server, int with_detail) weechat_printf (NULL, " %s%s%s%s", IRC_COLOR_CHAT_SERVER, server->name, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (server->temp_server) ? _(" (temporary)") : ""); } } diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index 9656ff4..eeb7042 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -881,13 +881,13 @@ irc_nick_as_prefix (struct t_irc_server *server, struct t_irc_nick *nick, { prefix[0] = (weechat_config_boolean (weechat_config_get ("weechat.look.nickmode_empty"))) ? ' ' : '\0'; - str_prefix_color = IRC_COLOR_CHAT; + str_prefix_color = IRC_COLOR_RESET; } } else { prefix[0] = '\0'; - str_prefix_color = IRC_COLOR_CHAT; + str_prefix_color = IRC_COLOR_RESET; } snprintf (result, sizeof (result), "%s%s%s%s%s%s%s%s\t", diff --git a/src/plugins/irc/irc-notify.c b/src/plugins/irc/irc-notify.c index a1d1ceb..3ed15fb 100644 --- a/src/plugins/irc/irc-notify.c +++ b/src/plugins/irc/irc-notify.c @@ -338,10 +338,10 @@ irc_notify_display (struct t_gui_buffer *buffer, struct t_irc_notify *notify) " %s%s%s @ %s%s%s: %s%s", IRC_COLOR_CHAT_NICK, notify->nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_SERVER, notify->server->name, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_MESSAGE_QUIT, _("offline")); } @@ -351,13 +351,13 @@ irc_notify_display (struct t_gui_buffer *buffer, struct t_irc_notify *notify) " %s%s%s @ %s%s%s: %s%s %s%s%s%s%s%s", IRC_COLOR_CHAT_NICK, notify->nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_SERVER, notify->server->name, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_MESSAGE_JOIN, _("online"), - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (notify->away_message) ? " (" : "", (notify->away_message) ? _("away") : "", (notify->away_message) ? ": \"" : "", @@ -387,7 +387,7 @@ irc_notify_display_list (struct t_irc_server *server) _("Notify list for %s%s%s:"), IRC_COLOR_CHAT_SERVER, server->name, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); for (ptr_notify = server->notify_list; ptr_notify; ptr_notify = ptr_notify->next_notify) { @@ -504,7 +504,7 @@ irc_notify_set_away_message (struct t_irc_notify *notify, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, notify->nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, away_message); } else if (notify->away_message && !away_message) @@ -515,7 +515,7 @@ irc_notify_set_away_message (struct t_irc_notify *notify, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, notify->nick, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); } else if (notify->away_message && away_message) { @@ -525,7 +525,7 @@ irc_notify_set_away_message (struct t_irc_notify *notify, weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, notify->nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, away_message); } diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 0d9dace..f31c0d2 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -396,7 +396,7 @@ IRC_PROTOCOL_CALLBACK(generic_error) && (strcmp (chan_nick, ptr_channel->name) == 0)) ? IRC_COLOR_CHAT_CHANNEL : "", (chan_nick) ? chan_nick : "", - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (chan_nick) ? ": " : "", args); @@ -428,10 +428,10 @@ IRC_PROTOCOL_CALLBACK(invite) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, (argv[3][0] == ':') ? argv[3] + 1 : argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); } return WEECHAT_RC_OK; } @@ -584,7 +584,7 @@ IRC_PROTOCOL_CALLBACK(kick) argv[3], IRC_COLOR_MESSAGE_QUIT, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_comment, IRC_COLOR_CHAT_DELIMITERS); } @@ -685,7 +685,7 @@ IRC_PROTOCOL_CALLBACK(kill) nick, IRC_COLOR_MESSAGE_QUIT, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_comment, IRC_COLOR_CHAT_DELIMITERS); } @@ -771,10 +771,10 @@ IRC_PROTOCOL_CALLBACK(mode) IRC_COLOR_CHAT_CHANNEL, (ptr_channel) ? ptr_channel->name : argv[2], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_modes, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), nick); } @@ -790,10 +790,10 @@ IRC_PROTOCOL_CALLBACK(mode) _("%sUser mode %s[%s%s%s]%s by %s%s"), weechat_prefix ("network"), IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_modes, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, nick); } @@ -879,7 +879,7 @@ IRC_PROTOCOL_CALLBACK(nick) weechat_prefix ("network"), IRC_COLOR_CHAT_NICK_SELF, new_nick, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); } else { @@ -902,10 +902,10 @@ IRC_PROTOCOL_CALLBACK(nick) weechat_config_boolean(irc_config_look_color_nicks_in_server_messages) ? old_color : IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), new_nick, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); } irc_channel_nick_speaking_rename (ptr_channel, nick, new_nick); @@ -999,7 +999,7 @@ IRC_PROTOCOL_CALLBACK(notice) IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), (nick && nick[0]) ? nick : "?", IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_args); } else @@ -1048,7 +1048,7 @@ IRC_PROTOCOL_CALLBACK(notice) weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_args); if ((ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE) && ptr_channel->has_quit_server) @@ -1076,10 +1076,10 @@ IRC_PROTOCOL_CALLBACK(notice) IRC_COLOR_NOTICE, /* TRANSLATORS: "Notice" is command name in IRC protocol (translation is frequently the same word) */ _("Notice"), - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, pos_target, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_args); } else @@ -1098,7 +1098,7 @@ IRC_PROTOCOL_CALLBACK(notice) IRC_COLOR_CHAT_HOST, address, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_args); } else @@ -1113,7 +1113,7 @@ IRC_PROTOCOL_CALLBACK(notice) weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_args); } else @@ -1701,16 +1701,16 @@ IRC_PROTOCOL_CALLBACK(topic) weechat_prefix ("network"), IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, argv[2], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_TOPIC_OLD, (old_topic_color) ? old_topic_color : ptr_channel->topic, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_TOPIC_NEW, (topic_color) ? topic_color : pos_topic, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); if (old_topic_color) free (old_topic_color); } @@ -1725,13 +1725,13 @@ IRC_PROTOCOL_CALLBACK(topic) weechat_prefix ("network"), IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, argv[2], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_TOPIC_NEW, (topic_color) ? topic_color : pos_topic, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); } if (topic_color) free (topic_color); @@ -1752,13 +1752,13 @@ IRC_PROTOCOL_CALLBACK(topic) weechat_prefix ("network"), IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, argv[2], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_TOPIC_OLD, (old_topic_color) ? old_topic_color : ptr_channel->topic, - IRC_COLOR_CHAT); + IRC_COLOR_RESET); if (old_topic_color) free (old_topic_color); } @@ -1772,10 +1772,10 @@ IRC_PROTOCOL_CALLBACK(topic) weechat_prefix ("network"), IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), nick, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, argv[2], - IRC_COLOR_CHAT); + IRC_COLOR_RESET); } } } @@ -1814,7 +1814,7 @@ IRC_PROTOCOL_CALLBACK(wallops) IRC_COLOR_CHAT_HOST, address, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[2][0] == ':') ? argv_eol[2] + 1 : argv_eol[2]); return WEECHAT_RC_OK; @@ -2007,9 +2007,9 @@ IRC_PROTOCOL_CALLBACK(221) weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, argv[2], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[3][0] == ':') ? argv_eol[3] + 1 : argv_eol[3], IRC_COLOR_CHAT_DELIMITERS); @@ -2061,7 +2061,7 @@ IRC_PROTOCOL_CALLBACK(301) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_away_msg); if (ptr_channel) { @@ -2186,7 +2186,7 @@ IRC_PROTOCOL_CALLBACK(whois_nick_msg) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); return WEECHAT_RC_OK; @@ -2215,7 +2215,7 @@ IRC_PROTOCOL_CALLBACK(whowas_nick_msg) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); return WEECHAT_RC_OK; @@ -2248,7 +2248,7 @@ IRC_PROTOCOL_CALLBACK(311) argv[4], argv[5], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[7][0] == ':') ? argv_eol[7] + 1 : argv_eol[7]); return WEECHAT_RC_OK; @@ -2277,10 +2277,10 @@ IRC_PROTOCOL_CALLBACK(312) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, argv[4], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[5][0] == ':') ? argv_eol[5] + 1 : argv_eol[5], IRC_COLOR_CHAT_DELIMITERS); @@ -2314,7 +2314,7 @@ IRC_PROTOCOL_CALLBACK(314) argv[4], argv[5], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[7][0] == ':') ? argv_eol[7] + 1 : argv_eol[7]); return WEECHAT_RC_OK; @@ -2352,7 +2352,7 @@ IRC_PROTOCOL_CALLBACK(315) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); } @@ -2399,22 +2399,22 @@ IRC_PROTOCOL_CALLBACK(317) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, day, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("day", "days", day), IRC_COLOR_CHAT_CHANNEL, hour, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("hour", "hours", hour), IRC_COLOR_CHAT_CHANNEL, min, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("minute", "minutes", min), IRC_COLOR_CHAT_CHANNEL, sec, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("second", "seconds", sec), IRC_COLOR_CHAT_CHANNEL, weechat_util_get_time_string (&datetime)); @@ -2431,18 +2431,18 @@ IRC_PROTOCOL_CALLBACK(317) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, hour, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("hour", "hours", hour), IRC_COLOR_CHAT_CHANNEL, min, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("minute", "minutes", min), IRC_COLOR_CHAT_CHANNEL, sec, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("second", "seconds", sec), IRC_COLOR_CHAT_CHANNEL, weechat_util_get_time_string (&datetime)); @@ -2512,10 +2512,10 @@ IRC_PROTOCOL_CALLBACK(322) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, argv[4], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (pos_topic && pos_topic[0]) ? ": " : "", (pos_topic && pos_topic[0]) ? pos_topic : ""); } @@ -2598,7 +2598,7 @@ IRC_PROTOCOL_CALLBACK(324) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argc > 4) ? ((argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]) : "", IRC_COLOR_CHAT_DELIMITERS); @@ -2643,7 +2643,7 @@ IRC_PROTOCOL_CALLBACK(327) argv[4], argv[5], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, pos_realname, IRC_COLOR_CHAT_DELIMITERS); } @@ -2691,7 +2691,7 @@ IRC_PROTOCOL_CALLBACK(328) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); } @@ -2746,7 +2746,7 @@ IRC_PROTOCOL_CALLBACK(329) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, weechat_util_get_time_string (&datetime)); } @@ -2786,7 +2786,7 @@ IRC_PROTOCOL_CALLBACK(330_343) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[5][0] == ':') ? argv_eol[5] + 1 : argv_eol[5], IRC_COLOR_CHAT_NICK, argv[4]); @@ -2806,7 +2806,7 @@ IRC_PROTOCOL_CALLBACK(330_343) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); } @@ -2896,9 +2896,9 @@ IRC_PROTOCOL_CALLBACK(332) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (topic_color) ? topic_color : ((pos_topic) ? pos_topic : ""), - IRC_COLOR_CHAT); + IRC_COLOR_RESET); if (topic_color) free (topic_color); @@ -2959,7 +2959,7 @@ IRC_PROTOCOL_CALLBACK(333) (topic_address) ? topic_address : "", IRC_COLOR_CHAT_DELIMITERS, (topic_address && topic_address[0]) ? ")" : "", - IRC_COLOR_CHAT, + IRC_COLOR_RESET, weechat_util_get_time_string (&datetime)); } else @@ -2987,7 +2987,7 @@ IRC_PROTOCOL_CALLBACK(333) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick), topic_nick, IRC_COLOR_CHAT_DELIMITERS, @@ -2996,7 +2996,7 @@ IRC_PROTOCOL_CALLBACK(333) (topic_address) ? topic_address : "", IRC_COLOR_CHAT_DELIMITERS, (topic_address && topic_address[0]) ? ")" : "", - IRC_COLOR_CHAT, + IRC_COLOR_RESET, weechat_util_get_time_string (&datetime)); } else @@ -3010,7 +3010,7 @@ IRC_PROTOCOL_CALLBACK(333) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, weechat_util_get_time_string (&datetime)); } } @@ -3041,7 +3041,7 @@ IRC_PROTOCOL_CALLBACK(338) IRC_COLOR_CHAT_NICK, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[5][0] == ':') ? argv_eol[5] + 1 : argv_eol[5], IRC_COLOR_CHAT_HOST, argv[4]); @@ -3069,13 +3069,13 @@ IRC_PROTOCOL_CALLBACK(341) weechat_prefix ("network"), IRC_COLOR_CHAT_NICK, argv[2], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, argv[4], - IRC_COLOR_CHAT); + IRC_COLOR_RESET); return WEECHAT_RC_OK; } @@ -3101,7 +3101,7 @@ IRC_PROTOCOL_CALLBACK(344) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_HOST, (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); @@ -3129,7 +3129,7 @@ IRC_PROTOCOL_CALLBACK(345) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); return WEECHAT_RC_OK; @@ -3172,14 +3172,14 @@ IRC_PROTOCOL_CALLBACK(346) IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_HOST, argv[4], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, irc_message_get_nick_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_HOST, irc_message_get_address_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, weechat_util_get_time_string (&datetime)); } else @@ -3197,7 +3197,7 @@ IRC_PROTOCOL_CALLBACK(346) IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_HOST, argv[4], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, irc_message_get_nick_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, @@ -3242,7 +3242,7 @@ IRC_PROTOCOL_CALLBACK(347) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (pos_args) ? " " : "", (pos_args) ? pos_args : ""); @@ -3285,17 +3285,17 @@ IRC_PROTOCOL_CALLBACK(348) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_HOST, argv[4], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, irc_message_get_nick_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_HOST, irc_message_get_address_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, weechat_util_get_time_string (&datetime)); } else @@ -3310,7 +3310,7 @@ IRC_PROTOCOL_CALLBACK(348) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_HOST, argv[4]); } @@ -3351,7 +3351,7 @@ IRC_PROTOCOL_CALLBACK(349) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (pos_args) ? " " : "", (pos_args) ? pos_args : ""); @@ -3476,7 +3476,7 @@ IRC_PROTOCOL_CALLBACK(352) argv[4], argv[5], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (pos_attr) ? pos_attr : "", (pos_attr) ? " " : "", (pos_hopcount) ? pos_hopcount : "", @@ -3575,9 +3575,9 @@ IRC_PROTOCOL_CALLBACK(353) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, pos_channel, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv_eol[args][0] == ':') ? argv_eol[args] + 1 : argv_eol[args], IRC_COLOR_CHAT_DELIMITERS); @@ -3673,7 +3673,7 @@ IRC_PROTOCOL_CALLBACK(366) strcat (string, irc_nick_find_color (nickname)); } else - strcat (string, IRC_COLOR_CHAT); + strcat (string, IRC_COLOR_RESET); strcat (string, nickname); i++; } @@ -3686,7 +3686,7 @@ IRC_PROTOCOL_CALLBACK(366) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, ptr_channel->name, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_DELIMITERS, string, IRC_COLOR_CHAT_DELIMITERS); @@ -3708,27 +3708,27 @@ IRC_PROTOCOL_CALLBACK(366) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, ptr_channel->name, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_CHANNEL, num_nicks, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("nick", "nicks", num_nicks), IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_CHANNEL, num_op, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("op", "ops", num_op), IRC_COLOR_CHAT_CHANNEL, num_halfop, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("halfop", "halfops", num_halfop), IRC_COLOR_CHAT_CHANNEL, num_voice, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("voice", "voices", num_voice), IRC_COLOR_CHAT_CHANNEL, num_normal, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, NG_("normal", "normals", num_normal), IRC_COLOR_CHAT_DELIMITERS); @@ -3745,7 +3745,7 @@ IRC_PROTOCOL_CALLBACK(366) weechat_prefix ("network"), IRC_COLOR_CHAT_CHANNEL, argv[3], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (argv[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]); } @@ -3789,14 +3789,14 @@ IRC_PROTOCOL_CALLBACK(367) IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_HOST, argv[4], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, irc_message_get_nick_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_HOST, irc_message_get_address_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, weechat_util_get_time_string (&datetime)); } else @@ -3814,7 +3814,7 @@ IRC_PROTOCOL_CALLBACK(367) IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_HOST, argv[4], - IRC_COLOR_CHAT, + IRC_COLOR_RESET, IRC_COLOR_CHAT_NICK, irc_message_get_nick_from_host (argv[5]), IRC_COLOR_CHAT_DELIMITERS, @@ -3859,7 +3859,7 @@ IRC_PROTOCOL_CALLBACK(368) IRC_COLOR_CHAT_CHANNEL, argv[3], IRC_COLOR_CHAT_DELIMITERS, - IRC_COLOR_CHAT, + IRC_COLOR_RESET, (pos_args) ? " " : "", (pos_args) ? pos_args : "");