mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +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 */
|
||||
|
||||
@@ -82,7 +82,7 @@ struct t_gui_buffer
|
||||
char *plugin_name_for_upgrade; /* plugin name when upgrading */
|
||||
|
||||
int number; /* buffer number (first is 1) */
|
||||
int layout_number; /* number of buffer saved in layout */
|
||||
int layout_number; /* number of buffer stored in layout */
|
||||
int layout_number_merge_order; /* order in merge for layout */
|
||||
char *name; /* buffer name */
|
||||
char *full_name; /* plugin name + '.' + buffer name */
|
||||
|
||||
+21
-21
@@ -309,11 +309,11 @@ gui_layout_buffer_get_number_all (struct t_gui_layout *layout)
|
||||
}
|
||||
|
||||
/*
|
||||
* Saves current layout for buffers in a layout.
|
||||
* Stores current layout for buffers in a layout.
|
||||
*/
|
||||
|
||||
void
|
||||
gui_layout_buffer_save (struct t_gui_layout *layout)
|
||||
gui_layout_buffer_store (struct t_gui_layout *layout)
|
||||
{
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
@@ -521,11 +521,11 @@ gui_layout_window_add (struct t_gui_layout_window **layout_window,
|
||||
}
|
||||
|
||||
/*
|
||||
* Saves tree of windows.
|
||||
* Stores tree of windows.
|
||||
*/
|
||||
|
||||
void
|
||||
gui_layout_window_save_tree (struct t_gui_layout *layout,
|
||||
gui_layout_window_store_tree (struct t_gui_layout *layout,
|
||||
struct t_gui_layout_window **layout_windows,
|
||||
struct t_gui_layout_window *parent_layout,
|
||||
struct t_gui_window_tree *tree)
|
||||
@@ -559,25 +559,25 @@ gui_layout_window_save_tree (struct t_gui_layout *layout,
|
||||
|
||||
if (tree->child1)
|
||||
{
|
||||
gui_layout_window_save_tree (layout, layout_windows,
|
||||
gui_layout_window_store_tree (layout, layout_windows,
|
||||
layout_window, tree->child1);
|
||||
}
|
||||
|
||||
if (tree->child2)
|
||||
{
|
||||
gui_layout_window_save_tree (layout, layout_windows,
|
||||
gui_layout_window_store_tree (layout, layout_windows,
|
||||
layout_window, tree->child2);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Saves current layout for windows in a layout.
|
||||
* Stores current layout for windows in a layout.
|
||||
*
|
||||
* Returns internal id of current window.
|
||||
*/
|
||||
|
||||
void
|
||||
gui_layout_window_save (struct t_gui_layout *layout)
|
||||
gui_layout_window_store (struct t_gui_layout *layout)
|
||||
{
|
||||
if (!layout)
|
||||
return;
|
||||
@@ -587,7 +587,7 @@ gui_layout_window_save (struct t_gui_layout *layout)
|
||||
layout->internal_id = 1;
|
||||
layout->internal_id_current_window = -1;
|
||||
|
||||
gui_layout_window_save_tree (layout, &layout->layout_windows, NULL,
|
||||
gui_layout_window_store_tree (layout, &layout->layout_windows, NULL,
|
||||
gui_windows_tree);
|
||||
}
|
||||
|
||||
@@ -759,15 +759,15 @@ gui_layout_window_apply (struct t_gui_layout *layout,
|
||||
}
|
||||
|
||||
/*
|
||||
* Saves layout according to option "save_layout_on_exit".
|
||||
* Stores layout according to option "store_layout_on_exit".
|
||||
*/
|
||||
|
||||
void
|
||||
gui_layout_save_on_exit ()
|
||||
gui_layout_store_on_exit ()
|
||||
{
|
||||
struct t_gui_layout *ptr_layout;
|
||||
|
||||
if (CONFIG_BOOLEAN(config_look_save_layout_on_exit) == CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_NONE)
|
||||
if (CONFIG_BOOLEAN(config_look_store_layout_on_exit) == CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_NONE)
|
||||
return;
|
||||
|
||||
ptr_layout = gui_layout_current;
|
||||
@@ -784,18 +784,18 @@ gui_layout_save_on_exit ()
|
||||
}
|
||||
}
|
||||
|
||||
/* save current layout */
|
||||
switch (CONFIG_BOOLEAN(config_look_save_layout_on_exit))
|
||||
/* store current layout */
|
||||
switch (CONFIG_BOOLEAN(config_look_store_layout_on_exit))
|
||||
{
|
||||
case CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_BUFFERS:
|
||||
gui_layout_buffer_save (ptr_layout);
|
||||
case CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_BUFFERS:
|
||||
gui_layout_buffer_store (ptr_layout);
|
||||
break;
|
||||
case CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_WINDOWS:
|
||||
gui_layout_window_save (ptr_layout);
|
||||
case CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_WINDOWS:
|
||||
gui_layout_window_store (ptr_layout);
|
||||
break;
|
||||
case CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_ALL:
|
||||
gui_layout_buffer_save (ptr_layout);
|
||||
gui_layout_window_save (ptr_layout);
|
||||
case CONFIG_LOOK_STORE_LAYOUT_ON_EXIT_ALL:
|
||||
gui_layout_buffer_store (ptr_layout);
|
||||
gui_layout_window_store (ptr_layout);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -90,7 +90,7 @@ extern void gui_layout_buffer_get_number (struct t_gui_layout *layout,
|
||||
int *layout_number,
|
||||
int *layout_number_merge_order);
|
||||
extern void gui_layout_buffer_get_number_all (struct t_gui_layout *layout);
|
||||
extern void gui_layout_buffer_save (struct t_gui_layout *layout);
|
||||
extern void gui_layout_buffer_store (struct t_gui_layout *layout);
|
||||
extern void gui_layout_buffer_apply (struct t_gui_layout *layout);
|
||||
|
||||
extern void gui_layout_window_remove_all (struct t_gui_layout *layout);
|
||||
@@ -104,12 +104,12 @@ extern struct t_gui_layout_window *gui_layout_window_add (struct t_gui_layout_wi
|
||||
int split_horiz,
|
||||
const char *plugin_name,
|
||||
const char *buffer_name);
|
||||
extern void gui_layout_window_save (struct t_gui_layout *layout);
|
||||
extern void gui_layout_window_store (struct t_gui_layout *layout);
|
||||
extern int gui_layout_window_check_buffer (struct t_gui_window *window);
|
||||
extern void gui_layout_window_assign_buffer (struct t_gui_buffer *buffer);
|
||||
extern void gui_layout_window_apply (struct t_gui_layout *layout,
|
||||
int internal_id_current_window);
|
||||
extern void gui_layout_save_on_exit ();
|
||||
extern void gui_layout_store_on_exit ();
|
||||
extern void gui_layout_free (struct t_gui_layout *layout);
|
||||
extern void gui_layout_remove (struct t_gui_layout *layout);
|
||||
extern void gui_layout_remove_all ();
|
||||
|
||||
@@ -1667,14 +1667,14 @@ gui_window_zoom (struct t_gui_window *window)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* save layout and zoom on current window */
|
||||
/* store layout and zoom on current window */
|
||||
ptr_layout = gui_layout_alloc (GUI_LAYOUT_ZOOM);
|
||||
if (ptr_layout)
|
||||
{
|
||||
gui_layout_add (ptr_layout);
|
||||
hook_signal_send ("window_zoom",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
gui_layout_window_save (ptr_layout);
|
||||
gui_layout_window_store (ptr_layout);
|
||||
gui_window_merge_all (window);
|
||||
hook_signal_send ("window_zoomed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
|
||||
Reference in New Issue
Block a user