Explicit calendar and todo view configuration
The configuration settings for calendar view (monthly/weekly) and todo view (hide/show completed) used to be saved automatically on calcurse exit, with values taken from the current interactive settings. They could not be set explicitly in the configuration menues. Configuration settings are no longer saved on program exit, but on exit from the configuration menu. This means that the saved values are those that were current when the configuration menu was entered. To change a saved value, you must set the view as desired and then enter/exit the configuration menu. The preferred calendar and todo views are no longer automatically taken from the interactive settings, but are explicitly set in the general options menu. Default values are monthly view and hide completed view. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
committed by
Lukas Fleischer
parent
b9f23e134a
commit
63b03c6b36
@@ -256,8 +256,24 @@ enum pos {
|
||||
RIGHT
|
||||
};
|
||||
|
||||
/* Available views for the calendar panel. */
|
||||
enum cal_view {
|
||||
CAL_MONTH_VIEW,
|
||||
CAL_WEEK_VIEW,
|
||||
CAL_VIEWS
|
||||
};
|
||||
|
||||
/* Available views for the todo panel. */
|
||||
enum todo_view {
|
||||
TODO_SHOW_COMPLETED_VIEW,
|
||||
TODO_HIDE_COMPLETED_VIEW,
|
||||
TODO_VIEWS
|
||||
};
|
||||
|
||||
/* General configuration variables. */
|
||||
struct conf {
|
||||
enum cal_view cal_view;
|
||||
enum todo_view todo_view;
|
||||
unsigned auto_save;
|
||||
unsigned auto_gc;
|
||||
unsigned periodic_save;
|
||||
@@ -447,20 +463,7 @@ struct day_item {
|
||||
union aptev_ptr item;
|
||||
};
|
||||
|
||||
/* Available views for the calendar panel. */
|
||||
enum {
|
||||
CAL_MONTH_VIEW,
|
||||
CAL_WEEK_VIEW,
|
||||
CAL_VIEWS
|
||||
};
|
||||
|
||||
/* Available views for the todo panel. */
|
||||
enum {
|
||||
TODO_SHOW_COMPLETED_VIEW,
|
||||
TODO_HIDE_COMPLETED_VIEW,
|
||||
TODO_VIEWS
|
||||
};
|
||||
|
||||
/* Shared variables for the notification threads. */
|
||||
struct notify_app {
|
||||
long time;
|
||||
int got_app;
|
||||
|
||||
Reference in New Issue
Block a user