summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-windows.c
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-01-08 12:20:20 +0100
committerGitHub <noreply@github.com>2018-01-08 12:20:20 +0100
commita6663c58d4364c371e82d718f0ed5460df6d8b36 (patch)
tree679808d4b01e904e625a7873200383e914a67434 /src/fe-text/gui-windows.c
parentf83ba5a5bb1f42384ba06710fc074e960f0a662f (diff)
parentded4e4d98df3c8df20119574c145fe1a736ee994 (diff)
downloadirssi-a6663c58d4364c371e82d718f0ed5460df6d8b36.zip
Merge pull request #697 from ailin-nemui/rsplit
sideways split support for Irssi
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 34c55772..3efb9803 100644
--- a/src/fe-text/gui-windows.c
+++ b/src/fe-text/gui-windows.c
@@ -75,17 +75,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);
@@ -285,13 +286,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);