diff options
author | Timo Sirainen <cras@irssi.org> | 2001-08-08 18:05:50 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-08-08 18:05:50 +0000 |
commit | c86333393c717a5bda07422f1b5a1b5fe2697da5 (patch) | |
tree | 8cc0f656946a2fcb3f60025f9060e659f79adf14 /src/fe-text/mainwindows-layout.c | |
parent | 072a4c774f625a46e65f8ea95f0902aca55286a0 (diff) | |
download | irssi-c86333393c717a5bda07422f1b5a1b5fe2697da5.zip |
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
Diffstat (limited to 'src/fe-text/mainwindows-layout.c')
-rw-r--r-- | src/fe-text/mainwindows-layout.c | 31 |
1 files changed, 19 insertions, 12 deletions
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); } |