mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 01:33:12 +02:00
Add new option irc.color.item_channel_modes
This commit is contained in:
@@ -233,7 +233,7 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item,
|
||||
snprintf (modes, sizeof (modes),
|
||||
"%s(%s%s%s)",
|
||||
IRC_COLOR_BAR_DELIM,
|
||||
IRC_COLOR_STATUS_NAME,
|
||||
IRC_COLOR_ITEM_CHANNEL_MODES,
|
||||
channel->modes,
|
||||
IRC_COLOR_BAR_DELIM);
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ struct t_config_option *irc_config_color_message_quit;
|
||||
struct t_config_option *irc_config_color_notice;
|
||||
struct t_config_option *irc_config_color_input_nick;
|
||||
struct t_config_option *irc_config_color_item_away;
|
||||
struct t_config_option *irc_config_color_item_channel_modes;
|
||||
|
||||
/* IRC config, network section */
|
||||
|
||||
@@ -336,6 +337,22 @@ irc_config_change_color_item_away (void *data,
|
||||
weechat_bar_item_update ("away");
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_color_item_channel_modes: called when the color of channel
|
||||
* modes is changed
|
||||
*/
|
||||
|
||||
void
|
||||
irc_config_change_color_item_channel_modes (void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
weechat_bar_item_update ("buffer_name");
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_network_away_check: called when away check is changed
|
||||
*/
|
||||
@@ -1241,6 +1258,12 @@ irc_config_init ()
|
||||
N_("color for away item"),
|
||||
NULL, -1, 0, "yellow", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_color_item_away, NULL, NULL, NULL);
|
||||
irc_config_color_item_channel_modes = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"item_channel_modes", "color",
|
||||
N_("color for channel modes, near channel name"),
|
||||
NULL, -1, 0, "default", NULL, 0, NULL, NULL,
|
||||
&irc_config_change_color_item_channel_modes, NULL, NULL, NULL);
|
||||
|
||||
/* network */
|
||||
ptr_section = weechat_config_new_section (irc_config_file, "network",
|
||||
|
||||
@@ -85,6 +85,7 @@ extern struct t_config_option *irc_config_color_message_quit;
|
||||
extern struct t_config_option *irc_config_color_notice;
|
||||
extern struct t_config_option *irc_config_color_input_nick;
|
||||
extern struct t_config_option *irc_config_color_item_away;
|
||||
extern struct t_config_option *irc_config_color_item_channel_modes;
|
||||
|
||||
extern struct t_config_option *irc_config_network_default_msg_part;
|
||||
extern struct t_config_option *irc_config_network_default_msg_quit;
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define IRC_COLOR_NOTICE weechat_color(weechat_config_string(irc_config_color_notice))
|
||||
#define IRC_COLOR_INPUT_NICK weechat_color(weechat_config_string(irc_config_color_input_nick))
|
||||
#define IRC_COLOR_ITEM_AWAY weechat_color(weechat_config_string(irc_config_color_item_away))
|
||||
#define IRC_COLOR_ITEM_CHANNEL_MODES weechat_color(weechat_config_string(irc_config_color_item_channel_modes))
|
||||
#define IRC_COLOR_NICK_IN_SERVER_MESSAGE(nick) \
|
||||
((nick && weechat_config_boolean(irc_config_look_color_nicks_in_server_messages)) ? \
|
||||
nick->color : IRC_COLOR_CHAT_NICK)
|
||||
|
||||
Reference in New Issue
Block a user