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

Add new option weechat.color.status_time

This commit is contained in:
Sebastien Helleu
2009-12-14 15:50:09 +01:00
parent c1e1e40559
commit 9bfc6a6fd1
15 changed files with 73 additions and 24 deletions
+7
View File
@@ -142,6 +142,7 @@ 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_status_time;
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_group;
@@ -1763,6 +1764,12 @@ config_weechat_init_options ()
N_("text color for buffer with new data (status bar)"),
NULL, -1, 0, "yellow", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_status_time = config_file_new_option (
weechat_config_file, ptr_section,
"status_time", "color",
N_("text color for time (status bar)"),
NULL, -1, 0, "default", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
/* input window */
config_color_input_text_not_found = config_file_new_option (
weechat_config_file, ptr_section,
+1
View File
@@ -155,6 +155,7 @@ 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_status_time;
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_group;
+6 -2
View File
@@ -755,7 +755,7 @@ gui_bar_item_default_time (void *data, struct t_gui_bar_item *item,
{
time_t date;
struct tm *local_time;
char text_time[128];
char text_time[128], text_time2[128];
/* make C compiler happy */
(void) data;
@@ -769,7 +769,11 @@ gui_bar_item_default_time (void *data, struct t_gui_bar_item *item,
local_time) == 0)
return NULL;
return strdup (text_time);
snprintf (text_time2, sizeof (text_time2), "%s%s",
gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(config_color_status_time))),
text_time);
return strdup (text_time2);
}
/*