aboutsummaryrefslogtreecommitdiffstats
path: root/src/calcurse.h
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-08-30 16:20:15 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-10-21 20:01:34 +0200
commit657f007cd294b9743d9a64e52c9ccdca8b3de3e1 (patch)
tree2dfd7b6e048e98a6188597e7d31e18e255aaf77e /src/calcurse.h
parent39ab4665e6bb13372da24b86f32cc50fff8c0e9f (diff)
downloadcalcurse-657f007cd294b9743d9a64e52c9ccdca8b3de3e1.tar.gz
calcurse-657f007cd294b9743d9a64e52c9ccdca8b3de3e1.zip
Distinguish between interactive and periodic save
A new argument to io_save_cal() makes it possible for the periodic save thread to avoid 1) user interaction and 2) overwriting new data. At the moment the thread has no way to report on the result of the save. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r--src/calcurse.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 17c45f8..49b1a70 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -654,7 +654,11 @@ enum getstr {
#define PARSE_DATETIME_HAS_DATE (1 << 0)
#define PARSE_DATETIME_HAS_TIME (1 << 1)
-/* Return codes for the io_save_cal() function. */
+/* Save types and return codes for the io_save_cal() function. */
+enum save_type {
+ interactive,
+ periodic
+};
enum {
IO_SAVE_CTINUE,
IO_SAVE_RELOAD,
@@ -862,7 +866,7 @@ unsigned io_save_apts(const char *);
void io_dump_todo(const char *);
unsigned io_save_todo(const char *);
unsigned io_save_keys(void);
-int io_save_cal(void);
+int io_save_cal(enum save_type);
void io_load_app(struct item_filter *);
void io_load_todo(struct item_filter *);
int io_load_data(struct item_filter *, int);