summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-06-09 21:33:10 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-06-09 21:33:10 +0200
commit9c5116b4fec232c92b199b53e7b829657413f4fd (patch)
treedbf3d616a768a5c1b3da91a27afd0df34b77b397 /src/gui
parent49f4e4cfa468a74fdbad3c62f5770951e050a6ab (diff)
downloadweechat-9c5116b4fec232c92b199b53e7b829657413f4fd.zip
core: add options weechat.color.chat_nick_offline_highlight(_bg) (text/bg for highlight when nick is offline)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-curses-chat.c8
-rw-r--r--src/gui/curses/gui-curses-color.c1
-rw-r--r--src/gui/gui-color.h1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c
index 5e6ef267f..a44a61479 100644
--- a/src/gui/curses/gui-curses-chat.c
+++ b/src/gui/curses/gui-curses-chat.c
@@ -124,10 +124,14 @@ gui_chat_reset_style (struct t_gui_window *window, struct t_gui_line *line,
{
color = color_inactive_buffer;
}
- else if (nick_offline)
+ else if (nick_offline == 1)
{
color = GUI_COLOR_CHAT_NICK_OFFLINE;
}
+ else if (nick_offline > 1)
+ {
+ color = GUI_COLOR_CHAT_NICK_OFFLINE_HIGHLIGHT;
+ }
if (reset_attributes)
gui_window_reset_style (GUI_WINDOW_OBJECTS(window)->win_chat, color);
@@ -854,7 +858,7 @@ gui_chat_display_time_to_prefix (struct t_gui_window *window,
}
if (!simulate)
{
- gui_chat_reset_style (window, line, nick_offline, 1,
+ gui_chat_reset_style (window, line, (nick_offline) ? 2 : 0, 1,
GUI_COLOR_CHAT_INACTIVE_WINDOW,
(CONFIG_BOOLEAN(config_look_color_inactive_buffer)
&& CONFIG_BOOLEAN(config_look_color_inactive_prefix)
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c
index 853bf508e..e3fffcf31 100644
--- a/src/gui/curses/gui-curses-color.c
+++ b/src/gui/curses/gui-curses-color.c
@@ -1417,6 +1417,7 @@ gui_color_init_weechat ()
gui_color_build (GUI_COLOR_CHAT_INACTIVE_BUFFER, CONFIG_COLOR(config_color_chat_inactive_buffer), CONFIG_COLOR(config_color_chat_bg));
gui_color_build (GUI_COLOR_CHAT_PREFIX_BUFFER_INACTIVE_BUFFER, CONFIG_COLOR(config_color_chat_prefix_buffer_inactive_buffer), CONFIG_COLOR(config_color_chat_bg));
gui_color_build (GUI_COLOR_CHAT_NICK_OFFLINE, CONFIG_COLOR(config_color_chat_nick_offline), CONFIG_COLOR(config_color_chat_bg));
+ gui_color_build (GUI_COLOR_CHAT_NICK_OFFLINE_HIGHLIGHT, CONFIG_COLOR(config_color_chat_nick_offline_highlight), CONFIG_COLOR(config_color_chat_nick_offline_highlight_bg));
/*
* define old nick colors for compatibility on /upgrade with previous
diff --git a/src/gui/gui-color.h b/src/gui/gui-color.h
index 59c8ebc74..14dbed157 100644
--- a/src/gui/gui-color.h
+++ b/src/gui/gui-color.h
@@ -75,6 +75,7 @@ enum t_gui_color_enum
GUI_COLOR_CHAT_INACTIVE_BUFFER,
GUI_COLOR_CHAT_PREFIX_BUFFER_INACTIVE_BUFFER,
GUI_COLOR_CHAT_NICK_OFFLINE,
+ GUI_COLOR_CHAT_NICK_OFFLINE_HIGHLIGHT,
/* number of colors */
GUI_COLOR_NUM_COLORS,