From aea2e737f96078337567f1e16ec087a0ef55a054 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Fri, 14 Mar 2008 12:39:35 +0000 Subject: [PATCH] Make /layout reset take effect immediately. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4765 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- TODO | 2 -- src/fe-common/core/windows-layout.c | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index ad3e7d84..d64c3481 100644 --- a/TODO +++ b/TODO @@ -252,8 +252,6 @@ - Windows: - /WINDOW SIZE -sticky, so f.e. /WINDOW BALANCE wouldn't affect it. - - /LAYOUT save|reset doesn't affect anything immediately, only after - restart - Check that /LAYOUT SAVE works properly with all the different /SETs, like reuse_unsued_windows, windows_auto_renumber and autoclose_windows. What should it do if some channel is /PARTed with autoclose_windows diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 882e8539..4db60431 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -240,6 +240,14 @@ void windows_layout_save(void) void windows_layout_reset(void) { + GSList *tmp; + + for (tmp = windows; tmp != NULL; tmp = tmp->next) { + WINDOW_REC *window = tmp->data; + while (window->bound_items != NULL) + window_bind_destroy(window, window->bound_items->data); + } + iconfig_set_str(NULL, "windows", NULL); signal_emit("layout reset", 0);