From c86333393c717a5bda07422f1b5a1b5fe2697da5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 8 Aug 2001 18:05:50 +0000 Subject: Changed signal / function names for /LAYOUT stuff. /LAYOUT RESET now resets the split windows too. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1725 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/mainwindows-layout.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'src/fe-text/mainwindows-layout.c') diff --git a/src/fe-text/mainwindows-layout.c b/src/fe-text/mainwindows-layout.c index 5bcd854d..a97995e0 100644 --- a/src/fe-text/mainwindows-layout.c +++ b/src/fe-text/mainwindows-layout.c @@ -27,7 +27,7 @@ #include "mainwindows.h" #include "gui-windows.h" -static void sig_window_save(WINDOW_REC *window, CONFIG_NODE *node) +static void sig_layout_window_save(WINDOW_REC *window, CONFIG_NODE *node) { WINDOW_REC *active; @@ -39,7 +39,7 @@ static void sig_window_save(WINDOW_REC *window, CONFIG_NODE *node) } } -static void sig_window_restore(WINDOW_REC *window, CONFIG_NODE *node) +static void sig_layout_window_restore(WINDOW_REC *window, CONFIG_NODE *node) { WINDOW_REC *parent; @@ -62,7 +62,7 @@ static void main_window_save(MAIN_WINDOW_REC *window, CONFIG_NODE *node) iconfig_node_set_int(node, "lines", window->height); } -static void sig_windows_saved(void) +static void sig_layout_save(void) { CONFIG_NODE *node; @@ -93,7 +93,7 @@ static GSList *get_sorted_windows_config(CONFIG_NODE *node) return output; } -static void sig_windows_restored(void) +static void sig_layout_restore(void) { MAIN_WINDOW_REC *lower_window; WINDOW_REC *window; @@ -129,18 +129,25 @@ static void sig_windows_restored(void) mainwindow_set_size(lower_window, lower_size); } +static void sig_layout_reset(void) +{ + iconfig_set_str(NULL, "mainwindows", NULL); +} + void mainwindows_layout_init(void) { - signal_add("window save", (SIGNAL_FUNC) sig_window_save); - signal_add("window restore", (SIGNAL_FUNC) sig_window_restore); - signal_add("windows saved", (SIGNAL_FUNC) sig_windows_saved); - signal_add_first("windows restored", (SIGNAL_FUNC) sig_windows_restored); + signal_add("layout window save", (SIGNAL_FUNC) sig_layout_window_save); + signal_add("layout window restore", (SIGNAL_FUNC) sig_layout_window_restore); + signal_add("layout save", (SIGNAL_FUNC) sig_layout_save); + signal_add_first("layout restore", (SIGNAL_FUNC) sig_layout_restore); + signal_add("layout reset", (SIGNAL_FUNC) sig_layout_reset); } void mainwindows_layout_deinit(void) { - signal_remove("window save", (SIGNAL_FUNC) sig_window_save); - signal_remove("window restore", (SIGNAL_FUNC) sig_window_restore); - signal_remove("windows saved", (SIGNAL_FUNC) sig_windows_saved); - signal_remove("windows restored", (SIGNAL_FUNC) sig_windows_restored); + signal_remove("layout window save", (SIGNAL_FUNC) sig_layout_window_save); + signal_remove("layout window restore", (SIGNAL_FUNC) sig_layout_window_restore); + signal_remove("layout save", (SIGNAL_FUNC) sig_layout_save); + signal_remove("layout restore", (SIGNAL_FUNC) sig_layout_restore); + signal_remove("layout reset", (SIGNAL_FUNC) sig_layout_reset); } -- cgit v1.2.3