mirror of
https://github.com/weechat/weechat.git
synced 2026-07-08 18:53:12 +02:00
core: rename option weechat.look.save_layout_on_exit to weechat.look.store_layout_on_exit, replace "save" by "store" for layouts
This commit is contained in:
+14
-14
@@ -3413,11 +3413,11 @@ COMMAND_CALLBACK(layout)
|
||||
/* display all layouts */
|
||||
if (argc == 1)
|
||||
{
|
||||
/* display saved layouts */
|
||||
/* display stored layouts */
|
||||
if (gui_layouts)
|
||||
{
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL, _("Saved layouts:"));
|
||||
gui_chat_printf (NULL, _("Stored layouts:"));
|
||||
for (ptr_layout = gui_layouts; ptr_layout;
|
||||
ptr_layout = ptr_layout->next_layout)
|
||||
{
|
||||
@@ -3440,7 +3440,7 @@ COMMAND_CALLBACK(layout)
|
||||
}
|
||||
}
|
||||
else
|
||||
gui_chat_printf (NULL, _("No layout saved"));
|
||||
gui_chat_printf (NULL, _("No stored layouts"));
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -3458,13 +3458,13 @@ COMMAND_CALLBACK(layout)
|
||||
gui_layout_add (ptr_layout);
|
||||
}
|
||||
if (flag_buffers)
|
||||
gui_layout_buffer_save (ptr_layout);
|
||||
gui_layout_buffer_store (ptr_layout);
|
||||
if (flag_windows)
|
||||
gui_layout_window_save (ptr_layout);
|
||||
gui_layout_window_store (ptr_layout);
|
||||
gui_layout_current = ptr_layout;
|
||||
gui_chat_printf (NULL,
|
||||
/* TRANSLATORS: %s%s%s is "buffers" or "windows" or "buffers+windows" */
|
||||
_("Layout of %s%s%s saved in \"%s\" (current layout: %s)"),
|
||||
_("Layout of %s%s%s stored in \"%s\" (current layout: %s)"),
|
||||
(flag_buffers) ? _("buffers") : "",
|
||||
(flag_buffers && flag_windows) ? "+" : "",
|
||||
(flag_windows) ? _("windows") : "",
|
||||
@@ -5666,8 +5666,8 @@ COMMAND_CALLBACK(upgrade)
|
||||
weechat_quit = 1;
|
||||
weechat_upgrading = 1;
|
||||
|
||||
/* save layout, unload plugins, save config, then upgrade */
|
||||
gui_layout_save_on_exit ();
|
||||
/* store layout, unload plugins, save config, then upgrade */
|
||||
gui_layout_store_on_exit ();
|
||||
plugin_end ();
|
||||
if (CONFIG_BOOLEAN(config_look_save_config_on_exit))
|
||||
(void) config_weechat_write ();
|
||||
@@ -7005,17 +7005,17 @@ command_init ()
|
||||
" || del [<name>] [buffers|windows]"
|
||||
" || rename <name> <new_name>"),
|
||||
N_(" store: store current buffers/windows in a layout\n"
|
||||
" apply: apply saved layout\n"
|
||||
" apply: apply stored layout\n"
|
||||
" leave: leave current layout (does not update any layout)\n"
|
||||
" del: delete buffers and/or windows in a saved layout\n"
|
||||
" del: delete buffers and/or windows in a stored layout\n"
|
||||
" (if neither \"buffers\" nor \"windows\" is given after "
|
||||
"the name, the layout is deleted)\n"
|
||||
" rename: rename a layout\n"
|
||||
" name: name for saved layout (default is \"default\")\n"
|
||||
"buffers: save/apply only buffers (order of buffers)\n"
|
||||
"windows: save/apply only windows (buffer displayed by each window)\n"
|
||||
" name: name for stored layout (default is \"default\")\n"
|
||||
"buffers: store/apply only buffers (order of buffers)\n"
|
||||
"windows: store/apply only windows (buffer displayed by each window)\n"
|
||||
"\n"
|
||||
"Without argument, this command displays saved layouts."),
|
||||
"Without argument, this command displays stored layouts."),
|
||||
"store %(layouts_names)|buffers|windows buffers|windows"
|
||||
" || apply %(layouts_names)|buffers|windows buffers|windows"
|
||||
" || leave"
|
||||
|
||||
@@ -159,13 +159,13 @@ struct t_config_option *config_look_read_marker;
|
||||
struct t_config_option *config_look_read_marker_always_show;
|
||||
struct t_config_option *config_look_read_marker_string;
|
||||
struct t_config_option *config_look_save_config_on_exit;
|
||||
struct t_config_option *config_look_save_layout_on_exit;
|
||||
struct t_config_option *config_look_scroll_amount;
|
||||
struct t_config_option *config_look_scroll_bottom_after_switch;
|
||||
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_store_layout_on_exit;
|
||||
struct t_config_option *config_look_tab_width;
|
||||
struct t_config_option *config_look_time_format;
|
||||
struct t_config_option *config_look_window_auto_zoom;
|
||||
@@ -2581,11 +2581,6 @@ config_weechat_init_options ()
|
||||
"save_config_on_exit", "boolean",
|
||||
N_("save configuration file on exit"),
|
||||
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_save_config_on_exit, NULL, NULL, NULL);
|
||||
config_look_save_layout_on_exit = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"save_layout_on_exit", "integer",
|
||||
N_("save layout on exit (buffers, windows, or both)"),
|
||||
"none|buffers|windows|all", 0, 0, "none", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_scroll_amount = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"scroll_amount", "integer",
|
||||
@@ -2627,6 +2622,11 @@ config_weechat_init_options ()
|
||||
"width on screen must be exactly one char"),
|
||||
NULL, 0, 0, "", NULL, 0,
|
||||
&config_check_separator, NULL, &config_change_buffers, NULL, NULL, NULL);
|
||||
config_look_store_layout_on_exit = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"store_layout_on_exit", "integer",
|
||||
N_("store layout on exit (buffers, windows, or both)"),
|
||||
"none|buffers|windows|all", 0, 0, "none", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_tab_width = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"tab_width", "integer",
|
||||
|
||||
@@ -91,12 +91,12 @@ enum t_config_look_read_marker
|
||||
CONFIG_LOOK_READ_MARKER_CHAR,
|
||||
};
|
||||
|
||||
enum t_config_look_save_layout_on_exit
|
||||
enum t_config_look_store_layout_on_exit
|
||||
{
|
||||
CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_NONE = 0,
|
||||
CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_BUFFERS,
|
||||
CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_WINDOWS,
|
||||
CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_ALL,
|
||||
CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_NONE = 0,
|
||||
CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_BUFFERS,
|
||||
CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_WINDOWS,
|
||||
CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_ALL,
|
||||
};
|
||||
|
||||
extern struct t_config_file *weechat_config_file;
|
||||
@@ -191,13 +191,13 @@ extern struct t_config_option *config_look_read_marker;
|
||||
extern struct t_config_option *config_look_read_marker_always_show;
|
||||
extern struct t_config_option *config_look_read_marker_string;
|
||||
extern struct t_config_option *config_look_save_config_on_exit;
|
||||
extern struct t_config_option *config_look_save_layout_on_exit;
|
||||
extern struct t_config_option *config_look_scroll_amount;
|
||||
extern struct t_config_option *config_look_scroll_bottom_after_switch;
|
||||
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_store_layout_on_exit;
|
||||
extern struct t_config_option *config_look_tab_width;
|
||||
extern struct t_config_option *config_look_time_format;
|
||||
extern struct t_config_option *config_look_window_auto_zoom;
|
||||
|
||||
@@ -354,7 +354,7 @@ upgrade_weechat_save_layout_window (struct t_upgrade_file *upgrade_file)
|
||||
|
||||
if (ptr_layout)
|
||||
{
|
||||
gui_layout_window_save (ptr_layout);
|
||||
gui_layout_window_store (ptr_layout);
|
||||
|
||||
/* save tree with layout of windows */
|
||||
rc = upgrade_weechat_save_layout_window_tree (upgrade_file, ptr_layout->layout_windows);
|
||||
|
||||
+1
-1
@@ -476,7 +476,7 @@ main (int argc, char *argv[])
|
||||
|
||||
gui_main_loop (); /* WeeChat main loop */
|
||||
|
||||
gui_layout_save_on_exit (); /* save layout */
|
||||
gui_layout_store_on_exit (); /* store layout */
|
||||
plugin_end (); /* end plugin interface(s) */
|
||||
if (CONFIG_BOOLEAN(config_look_save_config_on_exit))
|
||||
(void) config_weechat_write (); /* save WeeChat config file */
|
||||
|
||||
Reference in New Issue
Block a user