diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-01-07 11:23:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-07 11:23:22 +0100 |
commit | e75ee2f74cd8b3de2f28e7b9b8e8b3da90f5c608 (patch) | |
tree | 37a3768f0da742a37f8fa458140ac7869f2a10bf /src/fe-text/mainwindows-layout.c | |
parent | c8012b2e574c6e1e25cf20ed31182323a492a98e (diff) | |
parent | 466d074200e4893f57c4c716c746e8549af65339 (diff) | |
download | irssi-e75ee2f74cd8b3de2f28e7b9b8e8b3da90f5c608.zip |
Merge pull request #746 from ailin-nemui/hide-lines
Add method to hide lines in a view
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); |