diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2017-09-08 15:19:40 +0200 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2017-09-21 14:20:31 +0200 |
commit | 8dfeca57ede1e726de07522a87203ce13676882d (patch) | |
tree | 47d7f3e78826c57f8ab9ec86a996e0257647c8f1 /src/fe-text/mainwindows-layout.c | |
parent | be70fa5eb750ed337a55463c68d5a51b47d1efcd (diff) | |
download | irssi-8dfeca57ede1e726de07522a87203ce13676882d.zip |
hidden lines
Diffstat (limited to 'src/fe-text/mainwindows-layout.c')
-rw-r--r-- | src/fe-text/mainwindows-layout.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fe-text/mainwindows-layout.c b/src/fe-text/mainwindows-layout.c index fae02539..acbcb6b9 100644 --- a/src/fe-text/mainwindows-layout.c +++ b/src/fe-text/mainwindows-layout.c @@ -23,6 +23,7 @@ #include "misc.h" #include "lib-config/iconfig.h" #include "settings.h" +#include "levels.h" #include "mainwindows.h" #include "gui-windows.h" @@ -41,6 +42,12 @@ static void sig_layout_window_save(WINDOW_REC *window, CONFIG_NODE *node) iconfig_node_set_int(node, "parent", active->refnum); } + if (gui->view->hidden_level != MSGLEVEL_HIDDEN) { + char *level = bits2level(gui->view->hidden_level); + iconfig_node_set_str(node, "hidelevel", level); + g_free(level); + } + if (gui->use_scroll) iconfig_node_set_bool(node, "scroll", gui->scroll); } @@ -58,6 +65,9 @@ static void sig_layout_window_restore(WINDOW_REC *window, CONFIG_NODE *node) if (config_node_get_bool(node, "sticky", FALSE)) gui_window_set_sticky(window); + + textbuffer_view_set_hidden_level(gui->view, level2bits(config_node_get_str(node, "hidelevel", "HIDDEN"), NULL)); + if (config_node_get_str(node, "scroll", NULL) != NULL) { gui->use_scroll = TRUE; gui->scroll = config_node_get_bool(node, "scroll", TRUE); |