Only reload if data files were changed (replacement)
This is a replacement for commits57dd3d6and912124b. The idea is to move the check for modified files and the list initialization into io_load_data(), and let io_load_data() decide what to load. A new argument is used to force a load. The return code from new_data() (the renamed version of io_check_data_files_modified()) tells which files have changed. 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
ab0fe68225
commit
5ad0019b23
@@ -172,6 +172,8 @@
|
||||
|
||||
/* Mnemonics */
|
||||
#define NOHILT 0 /* 'No highlight' argument */
|
||||
#define NOFORCE 0
|
||||
#define FORCE 1
|
||||
|
||||
#define ERROR_MSG(...) do { \
|
||||
char msg[BUFSIZ]; \
|
||||
@@ -858,7 +860,7 @@ unsigned io_save_keys(void);
|
||||
int io_save_cal(enum save_display);
|
||||
void io_load_app(struct item_filter *);
|
||||
void io_load_todo(struct item_filter *);
|
||||
void io_load_data(struct item_filter *);
|
||||
void io_load_data(struct item_filter *, int);
|
||||
int io_reload_data(void);
|
||||
void io_load_keys(const char *);
|
||||
int io_check_dir(const char *);
|
||||
|
||||
Reference in New Issue
Block a user