From 1b75acf01b2f5a8d828aca3376022e156f1444ff Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 18 Jan 2016 18:09:23 +0100 Subject: Save active view on the todo panel Add a configuration option appearance.todoview and use it to automatically save the currently active todo panel view and restore it when restarting calcurse. Signed-off-by: Lukas Fleischer --- src/ui-todo.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ui-todo.c') diff --git a/src/ui-todo.c b/src/ui-todo.c index de19272..971c69d 100644 --- a/src/ui-todo.c +++ b/src/ui-todo.c @@ -327,3 +327,14 @@ void ui_todo_view_prev(void) ui_todo_view--; ui_todo_load_items(); } + +void ui_todo_set_view(int view) +{ + ui_todo_view = (view < 0 || view >= TODO_VIEWS) ? + TODO_SHOW_COMPLETED_VIEW : view; +} + +int ui_todo_get_view(void) +{ + return (int)ui_todo_view; +} -- cgit v1.2.3