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 <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2016-01-18 18:09:23 +01:00
parent e3ac5542aa
commit 1b75acf01b
3 changed files with 38 additions and 0 deletions

View File

@@ -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;
}