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

core: rename option weechat.look.set_title to weechat.look.window_title (evaluated string)

This commit is contained in:
Sebastien Helleu
2013-11-09 17:07:02 +01:00
parent 18ff3064cf
commit 90774b73d8
25 changed files with 244 additions and 169 deletions
+12 -11
View File
@@ -164,10 +164,10 @@ struct t_config_option *config_look_scroll_page_percent;
struct t_config_option *config_look_search_text_not_found_alert;
struct t_config_option *config_look_separator_horizontal;
struct t_config_option *config_look_separator_vertical;
struct t_config_option *config_look_set_title;
struct t_config_option *config_look_time_format;
struct t_config_option *config_look_window_separator_horizontal;
struct t_config_option *config_look_window_separator_vertical;
struct t_config_option *config_look_window_title;
/* config, colors section */
@@ -316,18 +316,17 @@ config_change_save_config_on_exit (void *data, struct t_config_option *option)
}
/*
* Callback for changes on option "weechat.look.set_title".
* Callback for changes on option "weechat.look.window_title".
*/
void
config_change_title (void *data, struct t_config_option *option)
config_change_window_title (void *data, struct t_config_option *option)
{
/* make C compiler happy */
(void) data;
(void) option;
if (CONFIG_BOOLEAN(config_look_set_title))
gui_window_set_title (version_get_name_version ());
gui_window_set_title (CONFIG_STRING(config_look_window_title));
}
/*
@@ -2525,12 +2524,6 @@ config_weechat_init_options ()
"(empty value will draw a real line with ncurses), wide chars are "
"NOT allowed here"),
NULL, 0, 0, "", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_set_title = config_file_new_option (
weechat_config_file, ptr_section,
"set_title", "boolean",
N_("set title for window (terminal for Curses GUI) with "
"name and version"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_title, NULL, NULL, NULL);
config_look_time_format = config_file_new_option (
weechat_config_file, ptr_section,
"time_format", "string",
@@ -2547,6 +2540,14 @@ config_weechat_init_options ()
"window_separator_vertical", "boolean",
N_("display a vertical separator between windows"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_window_title = config_file_new_option (
weechat_config_file, ptr_section,
"window_title", "string",
N_("title for window (terminal for Curses GUI), set on startup; "
"an empty string will keep title unchanged "
"(note: content is evaluated, see /help eval)"),
NULL, 0, 0, "WeeChat ${info:version}", NULL, 0, NULL, NULL,
&config_change_window_title, NULL, NULL, NULL);
/* palette */
ptr_section = config_file_new_section (weechat_config_file, "palette",
+1 -1
View File
@@ -188,10 +188,10 @@ extern struct t_config_option *config_look_scroll_page_percent;
extern struct t_config_option *config_look_search_text_not_found_alert;
extern struct t_config_option *config_look_separator_horizontal;
extern struct t_config_option *config_look_separator_vertical;
extern struct t_config_option *config_look_set_title;
extern struct t_config_option *config_look_time_format;
extern struct t_config_option *config_look_window_separator_horizontal;
extern struct t_config_option *config_look_window_separator_vertical;
extern struct t_config_option *config_look_window_title;
extern struct t_config_option *config_color_bar_more;
extern struct t_config_option *config_color_chat;
+2
View File
@@ -75,6 +75,7 @@
#include "../gui/gui-layout.h"
#include "../gui/gui-main.h"
#include "../plugins/plugin.h"
#include "../plugins/plugin-api.h"
int weechat_debug_core = 0; /* debug level for core */
@@ -452,6 +453,7 @@ main (int argc, char *argv[])
weechat_parse_args (argc, argv); /* parse command line args */
weechat_create_home_dir (); /* create WeeChat home directory */
log_init (); /* init log file */
plugin_api_init (); /* create some hooks (info,hdata,..)*/
secure_read (); /* read secured data options */
config_weechat_read (); /* read WeeChat options */
network_init_gnutls (); /* init GnuTLS */