mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 03:33:12 +02:00
Create default bars only if no bar is defined in configuration file
This commit is contained in:
@@ -7,6 +7,7 @@ v0.3.5-dev, 2011-03-18
|
||||
Version 0.3.5 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: create default bars only if no bar is defined in configuration file
|
||||
* core: add new option weechat.look.highlight_tags (force highlight on tags)
|
||||
* core: fix bug with repeat of last completion ("%*"), which failed when many
|
||||
templates are used in completion
|
||||
|
||||
+34
-17
@@ -526,6 +526,38 @@ config_day_change_timer_cb (void *data, int remaining_calls)
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* config_weechat_init_after_read: initialize some things after reading (or
|
||||
* reloading) configuration file
|
||||
*/
|
||||
|
||||
void
|
||||
config_weechat_init_after_read ()
|
||||
{
|
||||
gui_buffer_notify_set_all ();
|
||||
|
||||
proxy_use_temp_proxies ();
|
||||
|
||||
gui_bar_use_temp_bars ();
|
||||
if (gui_bars)
|
||||
{
|
||||
/*
|
||||
* at least one bar defined => just ensure that at least one bar is
|
||||
* using item "input_text"
|
||||
*/
|
||||
gui_bar_create_default_input ();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no bar defined => create default bars */
|
||||
gui_bar_create_default ();
|
||||
}
|
||||
|
||||
/* if no key was found config file, then we use default bindings */
|
||||
if (!gui_keys)
|
||||
gui_keyboard_default_bindings ();
|
||||
}
|
||||
|
||||
/*
|
||||
* config_weechat_reload_cb: reload WeeChat configuration file
|
||||
* return one of these values:
|
||||
@@ -564,15 +596,7 @@ config_weechat_reload_cb (void *data, struct t_config_file *config_file)
|
||||
rc = config_file_reload (config_file);
|
||||
|
||||
if (rc == WEECHAT_CONFIG_READ_OK)
|
||||
{
|
||||
gui_buffer_notify_set_all ();
|
||||
proxy_use_temp_proxies ();
|
||||
gui_bar_use_temp_bars ();
|
||||
gui_bar_create_default ();
|
||||
/* if no key was found config file, then we use default bindings */
|
||||
if (!gui_keys)
|
||||
gui_keyboard_default_bindings ();
|
||||
}
|
||||
config_weechat_init_after_read ();
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -2428,14 +2452,7 @@ config_weechat_read ()
|
||||
|
||||
rc = config_file_read (weechat_config_file);
|
||||
if (rc == WEECHAT_CONFIG_READ_OK)
|
||||
{
|
||||
proxy_use_temp_proxies ();
|
||||
gui_bar_use_temp_bars ();
|
||||
gui_bar_create_default ();
|
||||
/* if no key was found config file, then we use default bindings */
|
||||
if (!gui_keys)
|
||||
gui_keyboard_default_bindings ();
|
||||
}
|
||||
config_weechat_init_after_read ();
|
||||
|
||||
if (rc != WEECHAT_CONFIG_READ_OK)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user