mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 02:03:13 +02:00
Added highlight (when our nick is written in a channel/private window), added "col_chat_highlight" configuration option
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2003-12-24
|
||||
WeeChat known bugs, 2003-12-26
|
||||
|
||||
- ./configure does not check that Curses headers are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
@@ -18,3 +18,4 @@ WeeChat known bugs, 2003-12-24
|
||||
- when many WeeChat are launched, log file is not properly written (cleared by
|
||||
each WeeChat at startup)
|
||||
- display problems with Konsole (Kde terminal)
|
||||
- do not switch automatically to private windows when they're created
|
||||
|
||||
@@ -6,6 +6,7 @@ ChangeLog - 2003-12-26
|
||||
|
||||
Version 0.0.4 (under dev!):
|
||||
* Perl plugin, with auto-load
|
||||
* Highlight when our nick is written in a channel/private window
|
||||
* Ctrl-C now intercepted (ignored)
|
||||
* debug messages can be enabled via ./configure --enbale-debug option
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ int cfg_col_chat_nick;
|
||||
int cfg_col_chat_host;
|
||||
int cfg_col_chat_channel;
|
||||
int cfg_col_chat_dark;
|
||||
int cfg_col_chat_highlight;
|
||||
int cfg_col_chat_bg;
|
||||
int cfg_col_status;
|
||||
int cfg_col_status_active;
|
||||
@@ -219,6 +220,10 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for dark separators (chat window)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"green", NULL, &cfg_col_chat_dark, NULL, NULL },
|
||||
{ "col_chat_highlight", N_("color for highlighted nick"),
|
||||
N_("color for highlighted nick (chat window)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"yellow", NULL, &cfg_col_chat_highlight, NULL, NULL },
|
||||
{ "col_chat_bg", N_("background for chat"),
|
||||
N_("background for chat window"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -296,7 +301,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_nick_private", N_("color for other nick in private window"),
|
||||
N_("color for other nick in private window"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"brown", NULL, &cfg_col_nick_private, NULL, NULL },
|
||||
"gray", NULL, &cfg_col_nick_private, NULL, NULL },
|
||||
{ "col_nick_bg", N_("background for nicknames"),
|
||||
N_("background for nicknames"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
|
||||
@@ -102,6 +102,7 @@ extern int cfg_col_chat_nick;
|
||||
extern int cfg_col_chat_host;
|
||||
extern int cfg_col_chat_channel;
|
||||
extern int cfg_col_chat_dark;
|
||||
extern int cfg_col_chat_highlight;
|
||||
extern int cfg_col_chat_bg;
|
||||
extern int cfg_col_status;
|
||||
extern int cfg_col_status_active;
|
||||
|
||||
@@ -1306,6 +1306,8 @@ gui_init_colors ()
|
||||
cfg_col_chat_channel & A_CHARTEXT, cfg_col_chat_bg);
|
||||
init_pair (COLOR_WIN_CHAT_DARK,
|
||||
cfg_col_chat_dark & A_CHARTEXT, cfg_col_chat_bg);
|
||||
init_pair (COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
cfg_col_chat_highlight & A_CHARTEXT, cfg_col_chat_bg);
|
||||
init_pair (COLOR_WIN_STATUS,
|
||||
cfg_col_status & A_CHARTEXT, cfg_col_status_bg);
|
||||
init_pair (COLOR_WIN_STATUS_ACTIVE,
|
||||
@@ -1356,6 +1358,7 @@ gui_init_colors ()
|
||||
color_attr[COLOR_WIN_CHAT_HOST - 1] = cfg_col_chat_host & A_BOLD;
|
||||
color_attr[COLOR_WIN_CHAT_CHANNEL - 1] = cfg_col_chat_channel & A_BOLD;
|
||||
color_attr[COLOR_WIN_CHAT_DARK - 1] = cfg_col_chat_dark & A_BOLD;
|
||||
color_attr[COLOR_WIN_CHAT_HIGHLIGHT - 1] = cfg_col_chat_highlight & A_BOLD;
|
||||
color_attr[COLOR_WIN_STATUS - 1] = cfg_col_status & A_BOLD;
|
||||
color_attr[COLOR_WIN_STATUS_ACTIVE - 1] = cfg_col_status_active & A_BOLD;
|
||||
color_attr[COLOR_WIN_STATUS_DATA_MSG - 1] = cfg_col_status_data_msg & A_BOLD;
|
||||
|
||||
+19
-18
@@ -28,7 +28,7 @@
|
||||
|
||||
#define INPUT_BUFFER_BLOCK_SIZE 256
|
||||
|
||||
#define NUM_COLORS 35
|
||||
#define NUM_COLORS 36
|
||||
#define COLOR_WIN_TITLE 1
|
||||
#define COLOR_WIN_CHAT 2
|
||||
#define COLOR_WIN_CHAT_TIME 3
|
||||
@@ -39,23 +39,24 @@
|
||||
#define COLOR_WIN_CHAT_HOST 8
|
||||
#define COLOR_WIN_CHAT_CHANNEL 9
|
||||
#define COLOR_WIN_CHAT_DARK 10
|
||||
#define COLOR_WIN_STATUS 11
|
||||
#define COLOR_WIN_STATUS_ACTIVE 12
|
||||
#define COLOR_WIN_STATUS_DATA_MSG 13
|
||||
#define COLOR_WIN_STATUS_DATA_OTHER 14
|
||||
#define COLOR_WIN_STATUS_MORE 15
|
||||
#define COLOR_WIN_INPUT 16
|
||||
#define COLOR_WIN_INPUT_CHANNEL 17
|
||||
#define COLOR_WIN_INPUT_NICK 18
|
||||
#define COLOR_WIN_NICK 19
|
||||
#define COLOR_WIN_NICK_OP 20
|
||||
#define COLOR_WIN_NICK_HALFOP 21
|
||||
#define COLOR_WIN_NICK_VOICE 22
|
||||
#define COLOR_WIN_NICK_SEP 23
|
||||
#define COLOR_WIN_NICK_SELF 24
|
||||
#define COLOR_WIN_NICK_PRIVATE 25
|
||||
#define COLOR_WIN_NICK_FIRST 26
|
||||
#define COLOR_WIN_NICK_LAST 35
|
||||
#define COLOR_WIN_CHAT_HIGHLIGHT 11
|
||||
#define COLOR_WIN_STATUS 12
|
||||
#define COLOR_WIN_STATUS_ACTIVE 13
|
||||
#define COLOR_WIN_STATUS_DATA_MSG 14
|
||||
#define COLOR_WIN_STATUS_DATA_OTHER 15
|
||||
#define COLOR_WIN_STATUS_MORE 16
|
||||
#define COLOR_WIN_INPUT 17
|
||||
#define COLOR_WIN_INPUT_CHANNEL 18
|
||||
#define COLOR_WIN_INPUT_NICK 19
|
||||
#define COLOR_WIN_NICK 20
|
||||
#define COLOR_WIN_NICK_OP 21
|
||||
#define COLOR_WIN_NICK_HALFOP 22
|
||||
#define COLOR_WIN_NICK_VOICE 23
|
||||
#define COLOR_WIN_NICK_SEP 24
|
||||
#define COLOR_WIN_NICK_SELF 25
|
||||
#define COLOR_WIN_NICK_PRIVATE 26
|
||||
#define COLOR_WIN_NICK_FIRST 27
|
||||
#define COLOR_WIN_NICK_LAST 36
|
||||
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1)
|
||||
|
||||
#define SERVER(window) ((t_irc_server *)(window->server))
|
||||
|
||||
+14
-7
@@ -57,6 +57,7 @@ irc_display_prefix (t_gui_window *window, char *prefix)
|
||||
|
||||
/*
|
||||
* irc_display_nick: display nick in chat window
|
||||
* if color_nick < 0 then nick is highlighted
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -92,13 +93,19 @@ irc_display_nick (t_gui_window *window, t_irc_nick *nick, int message_type,
|
||||
}
|
||||
}
|
||||
}
|
||||
gui_printf_color_type (window,
|
||||
message_type,
|
||||
(color_nick) ?
|
||||
((cfg_look_color_nicks) ?
|
||||
nick->color : COLOR_WIN_CHAT) :
|
||||
COLOR_WIN_CHAT,
|
||||
"%s", nick->nick);
|
||||
if (color_nick < 0)
|
||||
gui_printf_color_type (window,
|
||||
message_type,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", nick->nick);
|
||||
else
|
||||
gui_printf_color_type (window,
|
||||
message_type,
|
||||
(color_nick) ?
|
||||
((cfg_look_color_nicks) ?
|
||||
nick->color : COLOR_WIN_CHAT) :
|
||||
COLOR_WIN_CHAT,
|
||||
"%s", nick->nick);
|
||||
|
||||
if (display_around)
|
||||
gui_printf_color_type (window,
|
||||
|
||||
+16
-6
@@ -799,8 +799,12 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
ptr_nick = nick_search (ptr_channel, host);
|
||||
if (ptr_nick)
|
||||
{
|
||||
irc_display_nick (ptr_channel->window, ptr_nick,
|
||||
MSG_TYPE_NICK, 1, 1, 0);
|
||||
if (strstr (pos, server->nick))
|
||||
irc_display_nick (ptr_channel->window, ptr_nick,
|
||||
MSG_TYPE_NICK, 1, -1, 0);
|
||||
else
|
||||
irc_display_nick (ptr_channel->window, ptr_nick,
|
||||
MSG_TYPE_NICK, 1, 1, 0);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
@@ -908,10 +912,16 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
if (strstr (pos, server->nick))
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", host);
|
||||
else
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
WeeChat known bugs, 2003-12-24
|
||||
WeeChat known bugs, 2003-12-26
|
||||
|
||||
- ./configure does not check that Curses headers are installed
|
||||
- ./configure does not check that Gtk 2.0 libraries are installed
|
||||
@@ -18,3 +18,4 @@ WeeChat known bugs, 2003-12-24
|
||||
- when many WeeChat are launched, log file is not properly written (cleared by
|
||||
each WeeChat at startup)
|
||||
- display problems with Konsole (Kde terminal)
|
||||
- do not switch automatically to private windows when they're created
|
||||
|
||||
@@ -6,6 +6,7 @@ ChangeLog - 2003-12-26
|
||||
|
||||
Version 0.0.4 (under dev!):
|
||||
* Perl plugin, with auto-load
|
||||
* Highlight when our nick is written in a channel/private window
|
||||
* Ctrl-C now intercepted (ignored)
|
||||
* debug messages can be enabled via ./configure --enbale-debug option
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ int cfg_col_chat_nick;
|
||||
int cfg_col_chat_host;
|
||||
int cfg_col_chat_channel;
|
||||
int cfg_col_chat_dark;
|
||||
int cfg_col_chat_highlight;
|
||||
int cfg_col_chat_bg;
|
||||
int cfg_col_status;
|
||||
int cfg_col_status_active;
|
||||
@@ -219,6 +220,10 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for dark separators (chat window)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"green", NULL, &cfg_col_chat_dark, NULL, NULL },
|
||||
{ "col_chat_highlight", N_("color for highlighted nick"),
|
||||
N_("color for highlighted nick (chat window)"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"yellow", NULL, &cfg_col_chat_highlight, NULL, NULL },
|
||||
{ "col_chat_bg", N_("background for chat"),
|
||||
N_("background for chat window"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
@@ -296,7 +301,7 @@ t_config_option weechat_options_colors[] =
|
||||
{ "col_nick_private", N_("color for other nick in private window"),
|
||||
N_("color for other nick in private window"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"brown", NULL, &cfg_col_nick_private, NULL, NULL },
|
||||
"gray", NULL, &cfg_col_nick_private, NULL, NULL },
|
||||
{ "col_nick_bg", N_("background for nicknames"),
|
||||
N_("background for nicknames"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
|
||||
@@ -102,6 +102,7 @@ extern int cfg_col_chat_nick;
|
||||
extern int cfg_col_chat_host;
|
||||
extern int cfg_col_chat_channel;
|
||||
extern int cfg_col_chat_dark;
|
||||
extern int cfg_col_chat_highlight;
|
||||
extern int cfg_col_chat_bg;
|
||||
extern int cfg_col_status;
|
||||
extern int cfg_col_status_active;
|
||||
|
||||
@@ -1306,6 +1306,8 @@ gui_init_colors ()
|
||||
cfg_col_chat_channel & A_CHARTEXT, cfg_col_chat_bg);
|
||||
init_pair (COLOR_WIN_CHAT_DARK,
|
||||
cfg_col_chat_dark & A_CHARTEXT, cfg_col_chat_bg);
|
||||
init_pair (COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
cfg_col_chat_highlight & A_CHARTEXT, cfg_col_chat_bg);
|
||||
init_pair (COLOR_WIN_STATUS,
|
||||
cfg_col_status & A_CHARTEXT, cfg_col_status_bg);
|
||||
init_pair (COLOR_WIN_STATUS_ACTIVE,
|
||||
@@ -1356,6 +1358,7 @@ gui_init_colors ()
|
||||
color_attr[COLOR_WIN_CHAT_HOST - 1] = cfg_col_chat_host & A_BOLD;
|
||||
color_attr[COLOR_WIN_CHAT_CHANNEL - 1] = cfg_col_chat_channel & A_BOLD;
|
||||
color_attr[COLOR_WIN_CHAT_DARK - 1] = cfg_col_chat_dark & A_BOLD;
|
||||
color_attr[COLOR_WIN_CHAT_HIGHLIGHT - 1] = cfg_col_chat_highlight & A_BOLD;
|
||||
color_attr[COLOR_WIN_STATUS - 1] = cfg_col_status & A_BOLD;
|
||||
color_attr[COLOR_WIN_STATUS_ACTIVE - 1] = cfg_col_status_active & A_BOLD;
|
||||
color_attr[COLOR_WIN_STATUS_DATA_MSG - 1] = cfg_col_status_data_msg & A_BOLD;
|
||||
|
||||
+19
-18
@@ -28,7 +28,7 @@
|
||||
|
||||
#define INPUT_BUFFER_BLOCK_SIZE 256
|
||||
|
||||
#define NUM_COLORS 35
|
||||
#define NUM_COLORS 36
|
||||
#define COLOR_WIN_TITLE 1
|
||||
#define COLOR_WIN_CHAT 2
|
||||
#define COLOR_WIN_CHAT_TIME 3
|
||||
@@ -39,23 +39,24 @@
|
||||
#define COLOR_WIN_CHAT_HOST 8
|
||||
#define COLOR_WIN_CHAT_CHANNEL 9
|
||||
#define COLOR_WIN_CHAT_DARK 10
|
||||
#define COLOR_WIN_STATUS 11
|
||||
#define COLOR_WIN_STATUS_ACTIVE 12
|
||||
#define COLOR_WIN_STATUS_DATA_MSG 13
|
||||
#define COLOR_WIN_STATUS_DATA_OTHER 14
|
||||
#define COLOR_WIN_STATUS_MORE 15
|
||||
#define COLOR_WIN_INPUT 16
|
||||
#define COLOR_WIN_INPUT_CHANNEL 17
|
||||
#define COLOR_WIN_INPUT_NICK 18
|
||||
#define COLOR_WIN_NICK 19
|
||||
#define COLOR_WIN_NICK_OP 20
|
||||
#define COLOR_WIN_NICK_HALFOP 21
|
||||
#define COLOR_WIN_NICK_VOICE 22
|
||||
#define COLOR_WIN_NICK_SEP 23
|
||||
#define COLOR_WIN_NICK_SELF 24
|
||||
#define COLOR_WIN_NICK_PRIVATE 25
|
||||
#define COLOR_WIN_NICK_FIRST 26
|
||||
#define COLOR_WIN_NICK_LAST 35
|
||||
#define COLOR_WIN_CHAT_HIGHLIGHT 11
|
||||
#define COLOR_WIN_STATUS 12
|
||||
#define COLOR_WIN_STATUS_ACTIVE 13
|
||||
#define COLOR_WIN_STATUS_DATA_MSG 14
|
||||
#define COLOR_WIN_STATUS_DATA_OTHER 15
|
||||
#define COLOR_WIN_STATUS_MORE 16
|
||||
#define COLOR_WIN_INPUT 17
|
||||
#define COLOR_WIN_INPUT_CHANNEL 18
|
||||
#define COLOR_WIN_INPUT_NICK 19
|
||||
#define COLOR_WIN_NICK 20
|
||||
#define COLOR_WIN_NICK_OP 21
|
||||
#define COLOR_WIN_NICK_HALFOP 22
|
||||
#define COLOR_WIN_NICK_VOICE 23
|
||||
#define COLOR_WIN_NICK_SEP 24
|
||||
#define COLOR_WIN_NICK_SELF 25
|
||||
#define COLOR_WIN_NICK_PRIVATE 26
|
||||
#define COLOR_WIN_NICK_FIRST 27
|
||||
#define COLOR_WIN_NICK_LAST 36
|
||||
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1)
|
||||
|
||||
#define SERVER(window) ((t_irc_server *)(window->server))
|
||||
|
||||
@@ -57,6 +57,7 @@ irc_display_prefix (t_gui_window *window, char *prefix)
|
||||
|
||||
/*
|
||||
* irc_display_nick: display nick in chat window
|
||||
* if color_nick < 0 then nick is highlighted
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -92,13 +93,19 @@ irc_display_nick (t_gui_window *window, t_irc_nick *nick, int message_type,
|
||||
}
|
||||
}
|
||||
}
|
||||
gui_printf_color_type (window,
|
||||
message_type,
|
||||
(color_nick) ?
|
||||
((cfg_look_color_nicks) ?
|
||||
nick->color : COLOR_WIN_CHAT) :
|
||||
COLOR_WIN_CHAT,
|
||||
"%s", nick->nick);
|
||||
if (color_nick < 0)
|
||||
gui_printf_color_type (window,
|
||||
message_type,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", nick->nick);
|
||||
else
|
||||
gui_printf_color_type (window,
|
||||
message_type,
|
||||
(color_nick) ?
|
||||
((cfg_look_color_nicks) ?
|
||||
nick->color : COLOR_WIN_CHAT) :
|
||||
COLOR_WIN_CHAT,
|
||||
"%s", nick->nick);
|
||||
|
||||
if (display_around)
|
||||
gui_printf_color_type (window,
|
||||
|
||||
@@ -799,8 +799,12 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
ptr_nick = nick_search (ptr_channel, host);
|
||||
if (ptr_nick)
|
||||
{
|
||||
irc_display_nick (ptr_channel->window, ptr_nick,
|
||||
MSG_TYPE_NICK, 1, 1, 0);
|
||||
if (strstr (pos, server->nick))
|
||||
irc_display_nick (ptr_channel->window, ptr_nick,
|
||||
MSG_TYPE_NICK, 1, -1, 0);
|
||||
else
|
||||
irc_display_nick (ptr_channel->window, ptr_nick,
|
||||
MSG_TYPE_NICK, 1, 1, 0);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_MSG,
|
||||
COLOR_WIN_CHAT, "%s\n", pos);
|
||||
@@ -908,10 +912,16 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *arguments)
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "<");
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
if (strstr (pos, server->nick))
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_HIGHLIGHT,
|
||||
"%s", host);
|
||||
else
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_NICK_PRIVATE,
|
||||
"%s", host);
|
||||
gui_printf_color_type (ptr_channel->window,
|
||||
MSG_TYPE_NICK,
|
||||
COLOR_WIN_CHAT_DARK, "> ");
|
||||
|
||||
Reference in New Issue
Block a user