mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 00:03:12 +02:00
Remove old and unused color options
This commit is contained in:
@@ -103,8 +103,6 @@ struct t_config_option *config_look_set_title;
|
||||
|
||||
struct t_config_option *config_color_separator;
|
||||
struct t_config_option *config_color_bar_more;
|
||||
struct t_config_option *config_color_title;
|
||||
struct t_config_option *config_color_title_bg;
|
||||
struct t_config_option *config_color_chat;
|
||||
struct t_config_option *config_color_chat_bg;
|
||||
struct t_config_option *config_color_chat_time;
|
||||
@@ -127,9 +125,6 @@ struct t_config_option *config_color_chat_read_marker;
|
||||
struct t_config_option *config_color_chat_read_marker_bg;
|
||||
struct t_config_option *config_color_chat_text_found;
|
||||
struct t_config_option *config_color_chat_text_found_bg;
|
||||
struct t_config_option *config_color_status;
|
||||
struct t_config_option *config_color_status_bg;
|
||||
struct t_config_option *config_color_status_delimiters;
|
||||
struct t_config_option *config_color_status_number;
|
||||
struct t_config_option *config_color_status_name;
|
||||
struct t_config_option *config_color_status_data_msg;
|
||||
@@ -137,16 +132,9 @@ struct t_config_option *config_color_status_data_private;
|
||||
struct t_config_option *config_color_status_data_highlight;
|
||||
struct t_config_option *config_color_status_data_other;
|
||||
struct t_config_option *config_color_status_more;
|
||||
struct t_config_option *config_color_input;
|
||||
struct t_config_option *config_color_input_bg;
|
||||
struct t_config_option *config_color_input_server;
|
||||
struct t_config_option *config_color_input_channel;
|
||||
struct t_config_option *config_color_input_nick;
|
||||
struct t_config_option *config_color_input_delimiters;
|
||||
struct t_config_option *config_color_input_text_not_found;
|
||||
struct t_config_option *config_color_input_actions;
|
||||
struct t_config_option *config_color_nicklist;
|
||||
struct t_config_option *config_color_nicklist_bg;
|
||||
struct t_config_option *config_color_nicklist_group;
|
||||
struct t_config_option *config_color_nicklist_away;
|
||||
struct t_config_option *config_color_nicklist_prefix1;
|
||||
@@ -1255,19 +1243,6 @@ config_weechat_init ()
|
||||
N_("text color for '+' when scrolling bars"),
|
||||
NULL, -1, 0, "lightmagenta", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
/* title window */
|
||||
config_color_title = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"title", "color",
|
||||
N_("text color for title bar"),
|
||||
NULL, -1, 0, "default", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_title_bg = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"title_bg", "color",
|
||||
N_("background color for title bar"),
|
||||
NULL, -1, 0, "blue", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
/* chat window */
|
||||
config_color_chat = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
@@ -1480,24 +1455,6 @@ config_weechat_init ()
|
||||
NULL, -1, 0, "lightmagenta", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
/* status window */
|
||||
config_color_status = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"status", "color",
|
||||
N_("text color for status bar"),
|
||||
NULL, -1, 0, "default", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_status_bg = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"status_bg", "color",
|
||||
N_("background color for status bar"),
|
||||
NULL, -1, 0, "blue", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_status_delimiters = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"status_delimiters", "color",
|
||||
N_("text color for status bar delimiters"),
|
||||
NULL, -1, 0, "cyan", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_status_number = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"status_number", "color",
|
||||
@@ -1542,42 +1499,12 @@ config_weechat_init ()
|
||||
NULL, -1, 0, "yellow", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
/* input window */
|
||||
config_color_input = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input", "color",
|
||||
N_("text color for input line"),
|
||||
NULL, -1, 0, "default", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_input_bg = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_bg", "color",
|
||||
N_("background color for input line"),
|
||||
NULL, -1, 0, "default", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_input_server = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_server", "color",
|
||||
N_("text color for server name in input line"),
|
||||
NULL, -1, 0, "brown", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_input_channel = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_channel", "color",
|
||||
N_("text color for channel name in input line"),
|
||||
NULL, -1, 0, "white", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_input_nick = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_nick", "color",
|
||||
N_("text color for nick name in input line"),
|
||||
NULL, -1, 0, "lightcyan", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_input_delimiters = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_delimiters", "color",
|
||||
N_("text color for delimiters in input line"),
|
||||
NULL, -1, 0, "cyan", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_input_text_not_found = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"input_text_not_found", "color",
|
||||
@@ -1591,18 +1518,6 @@ config_weechat_init ()
|
||||
NULL, -1, 0, "lightgreen", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
/* nicklist window */
|
||||
config_color_nicklist = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"nicklist", "color",
|
||||
N_("text color for nicklist"),
|
||||
NULL, -1, 0, "default", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_nicklist_bg = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"nicklist_bg", "color",
|
||||
N_("background color for nicklist"),
|
||||
NULL, -1, 0, "default", NULL,
|
||||
NULL, NULL, &config_change_color, NULL, NULL, NULL);
|
||||
config_color_nicklist_group = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"nicklist_group", "color",
|
||||
|
||||
@@ -115,8 +115,6 @@ extern struct t_config_option *config_look_set_title;
|
||||
|
||||
extern struct t_config_option *config_color_separator;
|
||||
extern struct t_config_option *config_color_bar_more;
|
||||
extern struct t_config_option *config_color_title;
|
||||
extern struct t_config_option *config_color_title_bg;
|
||||
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_time;
|
||||
@@ -139,9 +137,6 @@ extern struct t_config_option *config_color_chat_read_marker;
|
||||
extern struct t_config_option *config_color_chat_read_marker_bg;
|
||||
extern struct t_config_option *config_color_chat_text_found;
|
||||
extern struct t_config_option *config_color_chat_text_found_bg;
|
||||
extern struct t_config_option *config_color_status;
|
||||
extern struct t_config_option *config_color_status_bg;
|
||||
extern struct t_config_option *config_color_status_delimiters;
|
||||
extern struct t_config_option *config_color_status_number;
|
||||
extern struct t_config_option *config_color_status_name;
|
||||
extern struct t_config_option *config_color_status_data_msg;
|
||||
@@ -149,16 +144,9 @@ extern struct t_config_option *config_color_status_data_private;
|
||||
extern struct t_config_option *config_color_status_data_highlight;
|
||||
extern struct t_config_option *config_color_status_data_other;
|
||||
extern struct t_config_option *config_color_status_more;
|
||||
extern struct t_config_option *config_color_input;
|
||||
extern struct t_config_option *config_color_input_bg;
|
||||
extern struct t_config_option *config_color_input_server;
|
||||
extern struct t_config_option *config_color_input_channel;
|
||||
extern struct t_config_option *config_color_input_nick;
|
||||
extern struct t_config_option *config_color_input_delimiters;
|
||||
extern struct t_config_option *config_color_input_text_not_found;
|
||||
extern struct t_config_option *config_color_input_actions;
|
||||
extern struct t_config_option *config_color_nicklist;
|
||||
extern struct t_config_option *config_color_nicklist_bg;
|
||||
extern struct t_config_option *config_color_nicklist_group;
|
||||
extern struct t_config_option *config_color_nicklist_away;
|
||||
extern struct t_config_option *config_color_nicklist_prefix1;
|
||||
|
||||
+25
-11
@@ -713,7 +713,7 @@ gui_bar_item_default_input_search (void *data, struct t_gui_bar_item *item,
|
||||
(window->buffer->text_search_found
|
||||
|| !window->buffer->input_buffer
|
||||
|| !window->buffer->input_buffer[0]) ?
|
||||
gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_input))) :
|
||||
GUI_COLOR_CUSTOM_BAR_FG :
|
||||
gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_input_text_not_found))),
|
||||
ptr_message);
|
||||
}
|
||||
@@ -1188,19 +1188,33 @@ gui_bar_item_default_buffer_nicklist (void *data, struct t_gui_bar_item *item,
|
||||
strcat (buf, " ");
|
||||
}
|
||||
}
|
||||
config_file_search_with_string (ptr_nick->prefix_color,
|
||||
NULL, NULL, &ptr_option,
|
||||
NULL);
|
||||
if (ptr_option)
|
||||
strcat (buf, gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(ptr_option))));
|
||||
if (strchr (ptr_nick->prefix_color, '.'))
|
||||
{
|
||||
config_file_search_with_string (ptr_nick->prefix_color,
|
||||
NULL, NULL, &ptr_option,
|
||||
NULL);
|
||||
if (ptr_option)
|
||||
strcat (buf, gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(ptr_option))));
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat (buf, gui_color_get_custom (ptr_nick->prefix_color));
|
||||
}
|
||||
str_prefix[0] = ptr_nick->prefix;
|
||||
str_prefix[1] = '\0';
|
||||
strcat (buf, str_prefix);
|
||||
config_file_search_with_string (ptr_nick->color,
|
||||
NULL, NULL, &ptr_option,
|
||||
NULL);
|
||||
if (ptr_option)
|
||||
strcat (buf, gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(ptr_option))));
|
||||
if (strchr (ptr_nick->color, '.'))
|
||||
{
|
||||
config_file_search_with_string (ptr_nick->color,
|
||||
NULL, NULL, &ptr_option,
|
||||
NULL);
|
||||
if (ptr_option)
|
||||
strcat (buf, gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(ptr_option))));
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat (buf, gui_color_get_custom (ptr_nick->color));
|
||||
}
|
||||
strcat (buf, ptr_nick->name);
|
||||
}
|
||||
else
|
||||
|
||||
+13
-13
@@ -1697,9 +1697,9 @@ gui_bar_create_default_input ()
|
||||
"vertical", /* filling_left_right */
|
||||
"1", /* size */
|
||||
"0", /* size_max */
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_input)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_input_delimiters)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_input_bg)),
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"default", /* color bg */
|
||||
"0", /* separators */
|
||||
buf)) /* items */
|
||||
{
|
||||
@@ -1736,9 +1736,9 @@ gui_bar_create_default_title ()
|
||||
"vertical" , /* filling_left_right */
|
||||
"1", /* size */
|
||||
"0", /* size_max */
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_title)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_title)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_title_bg)),
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"blue", /* color bg */
|
||||
"0", /* separators */
|
||||
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_TITLE])) /* items */
|
||||
{
|
||||
@@ -1797,9 +1797,9 @@ gui_bar_create_default_status ()
|
||||
"vertical", /* filling_left_right */
|
||||
"1", /* size */
|
||||
"0", /* size_max */
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_status)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_status_delimiters)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_status_bg)),
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"blue", /* color bg */
|
||||
"0", /* separators */
|
||||
buf)) /* items */
|
||||
{
|
||||
@@ -1835,10 +1835,10 @@ gui_bar_create_default_nicklist ()
|
||||
"vertical", /* filling_left_right */
|
||||
"0", /* size */
|
||||
"0", /* size_max */
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_nicklist)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_nicklist)),
|
||||
gui_color_get_name (CONFIG_COLOR(config_color_nicklist_bg)),
|
||||
"1", /* separators */
|
||||
"default", /* color fg */
|
||||
"cyan", /* color delim */
|
||||
"default", /* color bg */
|
||||
"1", /* separators */
|
||||
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_NICKLIST])) /* items */
|
||||
{
|
||||
gui_chat_printf (NULL, _("Bar \"%s\" created"),
|
||||
|
||||
@@ -757,7 +757,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
|
||||
/* save last modifier string received */
|
||||
aspell_last_modifier_string = strdup (string);
|
||||
|
||||
color_normal = weechat_color (weechat_config_string (weechat_config_get ("weechat.color.input")));
|
||||
color_normal = weechat_color ("bar_fg");
|
||||
length_color_normal = strlen (color_normal);
|
||||
color_error = weechat_color (weechat_config_string (weechat_aspell_config_look_color));
|
||||
length_color_error = strlen (color_error);
|
||||
|
||||
@@ -65,6 +65,10 @@ struct t_config_option *irc_config_look_smart_filter;
|
||||
struct t_config_option *irc_config_look_smart_filter_delay;
|
||||
struct t_config_option *irc_config_look_notice_as_pv;
|
||||
|
||||
/* IRC config, color section */
|
||||
|
||||
struct t_config_option *irc_config_color_input_nick;
|
||||
|
||||
/* IRC config, network section */
|
||||
|
||||
struct t_config_option *irc_config_network_default_msg_part;
|
||||
@@ -207,6 +211,22 @@ irc_config_change_look_highlight_tags (void *data,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_color_input_nick: called when the color of input nick is
|
||||
* changed
|
||||
*/
|
||||
|
||||
void
|
||||
irc_config_change_color_input_nick (void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
weechat_bar_item_update ("input_prompt");
|
||||
}
|
||||
|
||||
/*
|
||||
* irc_config_change_network_away_check: called when away check is changed
|
||||
*/
|
||||
@@ -1110,6 +1130,25 @@ irc_config_init ()
|
||||
N_("display notices as private messages"),
|
||||
NULL, 0, 0, "off", NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
/* color */
|
||||
ptr_section = weechat_config_new_section (irc_config_file, "color",
|
||||
0, 0,
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL);
|
||||
if (!ptr_section)
|
||||
{
|
||||
weechat_config_free (irc_config_file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
irc_config_color_input_nick = weechat_config_new_option (
|
||||
irc_config_file, ptr_section,
|
||||
"input_nick", "color",
|
||||
N_("color for nick in input bar"),
|
||||
NULL, -1, 0, "lightcyan", NULL, NULL, NULL,
|
||||
&irc_config_change_color_input_nick, NULL, NULL, NULL);
|
||||
|
||||
/* network */
|
||||
ptr_section = weechat_config_new_section (irc_config_file, "network",
|
||||
0, 0,
|
||||
|
||||
@@ -76,6 +76,8 @@ extern struct t_config_option *irc_config_look_smart_filter;
|
||||
extern struct t_config_option *irc_config_look_smart_filter_delay;
|
||||
extern struct t_config_option *irc_config_look_notice_as_pv;
|
||||
|
||||
extern struct t_config_option *irc_config_color_input_nick;
|
||||
|
||||
extern struct t_config_option *irc_config_network_default_msg_part;
|
||||
extern struct t_config_option *irc_config_network_default_msg_quit;
|
||||
extern struct t_config_option *irc_config_network_away_check;
|
||||
|
||||
@@ -219,7 +219,7 @@ irc_nick_new (struct t_irc_server *server, struct t_irc_channel *channel,
|
||||
weechat_nicklist_add_nick (channel->buffer, ptr_group,
|
||||
ptr_nick->name,
|
||||
(is_away) ?
|
||||
"weechat.color.nicklist_away" : "weechat.color.nicklist",
|
||||
"weechat.color.nicklist_away" : "bar_fg",
|
||||
prefix, str_prefix_color, 1);
|
||||
|
||||
return ptr_nick;
|
||||
@@ -268,7 +268,7 @@ irc_nick_new (struct t_irc_server *server, struct t_irc_channel *channel,
|
||||
weechat_nicklist_add_nick (channel->buffer, ptr_group,
|
||||
new_nick->name,
|
||||
(is_away) ?
|
||||
"weechat.color.nicklist_away" : "weechat.color.nicklist",
|
||||
"weechat.color.nicklist_away" : "bar_fg",
|
||||
prefix, str_prefix_color, 1);
|
||||
|
||||
/* all is ok, return address of new nick */
|
||||
@@ -320,7 +320,7 @@ irc_nick_change (struct t_irc_server *server, struct t_irc_channel *channel,
|
||||
"weechat.color.nicklist_prefix%d",
|
||||
prefix_color);
|
||||
weechat_nicklist_add_nick (channel->buffer, ptr_group,
|
||||
nick->name, "weechat.color.nicklist",
|
||||
nick->name, "bar_fg",
|
||||
prefix, str_prefix_color, 1);
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ irc_nick_set (struct t_irc_channel *channel,
|
||||
weechat_nicklist_add_nick (channel->buffer, ptr_group,
|
||||
nick->name,
|
||||
(nick->flags & IRC_NICK_AWAY) ?
|
||||
"weechat.color.nicklist_away" : "weechat.color.nicklist",
|
||||
"weechat.color.nicklist_away" : "bar_fg",
|
||||
prefix, str_prefix_color, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#define IRC_COLOR_BAR_DELIM weechat_color("bar_delim")
|
||||
#define IRC_COLOR_STATUS_NUMBER weechat_color(weechat_config_string(weechat_config_get("weechat.color.status_number")))
|
||||
#define IRC_COLOR_STATUS_NAME weechat_color(weechat_config_string(weechat_config_get("weechat.color.status_name")))
|
||||
#define IRC_COLOR_INPUT_NICK weechat_color(weechat_config_string(weechat_config_get("weechat.color.input_nick")))
|
||||
#define IRC_COLOR_INPUT_NICK weechat_color(weechat_config_string(irc_config_color_input_nick))
|
||||
|
||||
extern struct t_weechat_plugin *weechat_irc_plugin;
|
||||
extern struct t_hook *irc_hook_timer_check_away;
|
||||
|
||||
Reference in New Issue
Block a user