summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-windows.c
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-04-25 00:42:53 +0200
committerailin-nemui <ailin-nemui@users.noreply.github.com>2018-01-06 00:26:48 +0100
commit4e71a1f485d9a546cb92ad94e8918a2363a88b03 (patch)
tree6bfacd3eec72355b972755ca1612fd69a9d5525b /src/fe-text/gui-windows.c
parent451019d05dfabbac2463f0d835c5113ac140c5c4 (diff)
downloadirssi-4e71a1f485d9a546cb92ad94e8918a2363a88b03.zip
sideways split support for Irssi
warning: * may be buggy This commit adds support for sideways splits into Irssi. To that regard, there are a number of new commands available the "R" commands: /window new rsplit - make a new sideways split /window rshow - show an existing window to the right /window rgrow/rshrink/rsize/rbalance - manipulate the size of your sideways split windows the "D" commands: /window dup/ddown/dleft/dright - navigate the windows directionally, as an alternative to /window up/down that you can bind to some key /window move dleft/dright - the same for moving Enjoy!
Diffstat (limited to 'src/fe-text/gui-windows.c')
-rw-r--r--src/fe-text/gui-windows.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/fe-text/gui-windows.c b/src/fe-text/gui-windows.c
index c63c495c..966c5138 100644
--- a/src/fe-text/gui-windows.c
+++ b/src/fe-text/gui-windows.c
@@ -73,17 +73,18 @@ static void gui_window_created(WINDOW_REC *window, void *automatic)
g_return_if_fail(window != NULL);
- new_parent = window_create_override == 0 ||
- window_create_override == 2 ||
+ new_parent = window_create_override == MAIN_WINDOW_TYPE_DEFAULT ||
+ window_create_override == MAIN_WINDOW_TYPE_SPLIT ||
+ window_create_override == MAIN_WINDOW_TYPE_RSPLIT ||
active_win == NULL || WINDOW_GUI(active_win) == NULL;
- parent = !new_parent ? WINDOW_MAIN(active_win) : mainwindow_create();
+ parent = !new_parent ? WINDOW_MAIN(active_win) : mainwindow_create(window_create_override == MAIN_WINDOW_TYPE_RSPLIT);
if (parent == NULL) {
/* not enough space for new window, but we really can't
abort creation of the window anymore, so create hidden
window instead. */
parent = WINDOW_MAIN(active_win);
}
- window_create_override = -1;
+ window_create_override = MAIN_WINDOW_TYPE_NONE;
if (parent->active == NULL) parent->active = window;
window->gui_data = gui_window_init(window, parent);
@@ -281,13 +282,14 @@ static void read_settings(void)
void gui_windows_init(void)
{
- settings_add_bool("lookandfeel", "autostick_split_windows", TRUE);
+ settings_add_bool("lookandfeel", "autostick_split_windows", FALSE);
+ settings_add_bool("lookandfeel", "autounstick_windows", TRUE);
settings_add_int("lookandfeel", "indent", 10);
settings_add_bool("lookandfeel", "indent_always", FALSE);
settings_add_bool("lookandfeel", "break_wide", FALSE);
settings_add_bool("lookandfeel", "scroll", TRUE);
- window_create_override = -1;
+ window_create_override = MAIN_WINDOW_TYPE_NONE;
read_settings();
signal_add("gui window create override", (SIGNAL_FUNC) sig_window_create_override);