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

Added "look_set_title" option in config file

This commit is contained in:
Sebastien Helleu
2003-10-04 08:53:10 +00:00
parent db5ee98418
commit ede76f7b44
12 changed files with 60 additions and 50 deletions
+6 -1
View File
@@ -51,6 +51,7 @@ t_config_section config_sections[CONFIG_NUMBER_SECTIONS] =
/* config, look & feel section */
int cfg_look_set_title;
int cfg_look_startup_logo;
int cfg_look_startup_version;
char *cfg_look_weechat_slogan;
@@ -69,7 +70,11 @@ char *cfg_look_no_nickname;
char *cfg_look_completor;
t_config_option weechat_options_look[] =
{ { "look_startup_logo", N_("display " WEECHAT_NAME " logo at startup"),
{ { "look_set_title", N_("set title for terminal window (curses GUI) with name & version"),
N_("set title for terminal window (curses GUI) with name & version"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
NULL, NULL, &cfg_look_set_title, NULL, NULL },
{ "look_startup_logo", N_("display " WEECHAT_NAME " logo at startup"),
N_("display " WEECHAT_NAME " logo at startup"),
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
NULL, NULL, &cfg_look_startup_logo, NULL, NULL },
+1
View File
@@ -75,6 +75,7 @@ struct t_config_option
int (*handler_change)(int *, char **);
};
extern int cfg_look_set_title;
extern int cfg_look_startup_logo;
extern int cfg_look_startup_version;
extern char *cfg_look_weechat_slogan;
+2 -2
View File
@@ -1545,9 +1545,9 @@ gui_init ()
signal (SIGWINCH, gui_resize_term_handler);
#ifdef __LINUX__
#ifdef __linux__
/* set title for term window, not for console */
if (strcmp (getenv ("TERM"), "linux") != 0)
if (cfg_look_set_title && (strcmp (getenv ("TERM"), "linux") != 0))
printf ("\e]2;" WEECHAT_NAME " " WEECHAT_VERSION "\a\e]1;" WEECHAT_NAME " " WEECHAT_VERSION "\a");
#endif