1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 02:03:13 +02:00

irc: add new options irc.color.topic_old and irc.color.topic_new

This commit is contained in:
Sebastien Helleu
2011-04-28 14:27:31 +02:00
parent 7baf4b8b22
commit 43a53a87aa
19 changed files with 202 additions and 98 deletions
+6 -4
View File
@@ -57,6 +57,9 @@
/* macros for WeeChat core and IRC colors */
#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_CHAT_CHANNEL weechat_color("chat_channel")
#define IRC_COLOR_CHAT_DELIMITERS weechat_color("chat_delimiters")
@@ -72,16 +75,15 @@
#define IRC_COLOR_NICK_PREFIX_USER weechat_color(weechat_config_string(irc_config_color_nick_prefix_user))
#define IRC_COLOR_NICK_PREFIX weechat_color(weechat_config_string(irc_config_color_nick_prefix))
#define IRC_COLOR_NICK_SUFFIX weechat_color(weechat_config_string(irc_config_color_nick_suffix))
#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_NOTICE weechat_color(weechat_config_string(irc_config_color_notice))
#define IRC_COLOR_STATUS_NUMBER weechat_color("status_number")
#define IRC_COLOR_STATUS_NAME weechat_color("status_name")
#define IRC_COLOR_STATUS_NAME_SSL weechat_color("status_name_ssl")
#define IRC_COLOR_MESSAGE_JOIN weechat_color(weechat_config_string(irc_config_color_message_join))
#define IRC_COLOR_MESSAGE_QUIT weechat_color(weechat_config_string(irc_config_color_message_quit))
#define IRC_COLOR_REASON_QUIT weechat_color(weechat_config_string(irc_config_color_reason_quit))
#define IRC_COLOR_NOTICE weechat_color(weechat_config_string(irc_config_color_notice))
#define IRC_COLOR_TOPIC_OLD weechat_color(weechat_config_string(irc_config_color_topic_old))
#define IRC_COLOR_TOPIC_NEW weechat_color(weechat_config_string(irc_config_color_topic_new))
#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))
+14
View File
@@ -109,6 +109,8 @@ struct t_config_option *irc_config_color_item_channel_modes;
struct t_config_option *irc_config_color_item_lag_counting;
struct t_config_option *irc_config_color_item_lag_finished;
struct t_config_option *irc_config_color_reason_quit;
struct t_config_option *irc_config_color_topic_old;
struct t_config_option *irc_config_color_topic_new;
/* IRC config, network section */
@@ -2299,6 +2301,18 @@ irc_config_init ()
N_("color for reason in part/quit messages"),
NULL, -1, 0, "default", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
irc_config_color_topic_old = weechat_config_new_option (
irc_config_file, ptr_section,
"topic_old", "color",
N_("color for old channel topic (when topic is changed)"),
NULL, -1, 0, "darkgray", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
irc_config_color_topic_new = weechat_config_new_option (
irc_config_file, ptr_section,
"topic_new", "color",
N_("color for new channel topic (when topic is changed)"),
NULL, -1, 0, "white", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
/* network */
ptr_section = weechat_config_new_section (irc_config_file, "network",
+2
View File
@@ -132,6 +132,8 @@ extern struct t_config_option *irc_config_color_item_channel_modes;
extern struct t_config_option *irc_config_color_item_lag_counting;
extern struct t_config_option *irc_config_color_item_lag_finished;
extern struct t_config_option *irc_config_color_reason_quit;
extern struct t_config_option *irc_config_color_topic_old;
extern struct t_config_option *irc_config_color_topic_new;
extern struct t_config_option *irc_config_network_autoreconnect_delay_growing;
extern struct t_config_option *irc_config_network_autoreconnect_delay_max;
+8 -4
View File
@@ -1696,7 +1696,7 @@ IRC_PROTOCOL_CALLBACK(topic)
ptr_buffer),
irc_protocol_tags (command, NULL, NULL),
_("%s%s%s%s has changed topic for %s%s%s "
"from \"%s%s\" to \"%s%s\""),
"from \"%s%s%s\" to \"%s%s%s\""),
weechat_prefix ("network"),
IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick),
nick,
@@ -1704,8 +1704,10 @@ IRC_PROTOCOL_CALLBACK(topic)
IRC_COLOR_CHAT_CHANNEL,
argv[2],
IRC_COLOR_CHAT,
IRC_COLOR_TOPIC_OLD,
(old_topic_color) ? old_topic_color : ptr_channel->topic,
IRC_COLOR_CHAT,
IRC_COLOR_TOPIC_NEW,
(topic_color) ? topic_color : pos_topic,
IRC_COLOR_CHAT);
if (old_topic_color)
@@ -1717,8 +1719,8 @@ IRC_PROTOCOL_CALLBACK(topic)
command, NULL,
ptr_buffer),
irc_protocol_tags (command, NULL, NULL),
_("%s%s%s%s has changed topic for %s%s%s to "
"\"%s%s\""),
_("%s%s%s%s has changed topic for %s%s%s "
"to \"%s%s%s\""),
weechat_prefix ("network"),
IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick),
nick,
@@ -1726,6 +1728,7 @@ IRC_PROTOCOL_CALLBACK(topic)
IRC_COLOR_CHAT_CHANNEL,
argv[2],
IRC_COLOR_CHAT,
IRC_COLOR_TOPIC_NEW,
(topic_color) ? topic_color : pos_topic,
IRC_COLOR_CHAT);
}
@@ -1744,7 +1747,7 @@ IRC_PROTOCOL_CALLBACK(topic)
ptr_buffer),
irc_protocol_tags (command, NULL, NULL),
_("%s%s%s%s has unset topic for %s%s%s "
"(old topic: \"%s%s\")"),
"(old topic: \"%s%s%s\")"),
weechat_prefix ("network"),
IRC_COLOR_NICK_IN_SERVER_MESSAGE(ptr_nick),
nick,
@@ -1752,6 +1755,7 @@ IRC_PROTOCOL_CALLBACK(topic)
IRC_COLOR_CHAT_CHANNEL,
argv[2],
IRC_COLOR_CHAT,
IRC_COLOR_TOPIC_OLD,
(old_topic_color) ? old_topic_color : ptr_channel->topic,
IRC_COLOR_CHAT);
if (old_topic_color)