1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

Add 2 new options: weechat.look.prefix_align_more and weechat.look.prefix_buffer_align_more

This commit is contained in:
Sebastien Helleu
2009-08-29 13:06:21 +02:00
parent 88b65fe3c2
commit d2ec2482d6
13 changed files with 122 additions and 11 deletions
+13
View File
@@ -92,8 +92,10 @@ struct t_config_option *config_look_paste_max_lines;
struct t_config_option *config_look_prefix[GUI_CHAT_NUM_PREFIXES];
struct t_config_option *config_look_prefix_align;
struct t_config_option *config_look_prefix_align_max;
struct t_config_option *config_look_prefix_align_more;
struct t_config_option *config_look_prefix_buffer_align;
struct t_config_option *config_look_prefix_buffer_align_max;
struct t_config_option *config_look_prefix_buffer_align_more;
struct t_config_option *config_look_prefix_suffix;
struct t_config_option *config_look_read_marker;
struct t_config_option *config_look_save_config_on_exit;
@@ -1371,6 +1373,11 @@ config_weechat_init_options ()
"prefix_align_max", "integer",
N_("max size for prefix (0 = no max size)"),
NULL, 0, 128, "0", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_prefix_align_more = config_file_new_option (
weechat_config_file, ptr_section,
"prefix_align_more", "boolean",
N_("display '+' if prefix is truncated"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_prefix_buffer_align = config_file_new_option (
weechat_config_file, ptr_section,
"prefix_buffer_align", "integer",
@@ -1383,6 +1390,12 @@ config_weechat_init_options ()
N_("max size for buffer name, when many buffers are merged with same "
"number (0 = no max size)"),
NULL, 0, 128, "0", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_prefix_buffer_align_more = config_file_new_option (
weechat_config_file, ptr_section,
"prefix_buffer_align_more", "boolean",
N_("display '+' if buffer name is truncated (when many buffers are "
"merged with same number)"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_prefix_suffix = config_file_new_option (
weechat_config_file, ptr_section,
"prefix_suffix", "string",
+2
View File
@@ -107,8 +107,10 @@ extern struct t_config_option *config_look_paste_max_lines;
extern struct t_config_option *config_look_prefix[];
extern struct t_config_option *config_look_prefix_align;
extern struct t_config_option *config_look_prefix_align_max;
extern struct t_config_option *config_look_prefix_align_more;
extern struct t_config_option *config_look_prefix_buffer_align;
extern struct t_config_option *config_look_prefix_buffer_align_max;
extern struct t_config_option *config_look_prefix_buffer_align_more;
extern struct t_config_option *config_look_prefix_suffix;
extern struct t_config_option *config_look_read_marker;
extern struct t_config_option *config_look_save_config_on_exit;
+6 -2
View File
@@ -630,7 +630,9 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window,
gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat,
GUI_COLOR_CHAT_PREFIX_MORE);
}
gui_chat_display_word (window, line, str_plus,
gui_chat_display_word (window, line,
(CONFIG_BOOLEAN(config_look_prefix_buffer_align_more)) ?
str_plus : str_space,
NULL, 1, num_lines, count, lines_displayed,
simulate);
}
@@ -744,7 +746,9 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window,
gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat,
GUI_COLOR_CHAT_PREFIX_MORE);
}
gui_chat_display_word (window, line, str_plus,
gui_chat_display_word (window, line,
(CONFIG_BOOLEAN(config_look_prefix_align_more)) ?
str_plus : str_space,
NULL, 1, num_lines, count, lines_displayed,
simulate);
}