aboutsummaryrefslogtreecommitdiffstats
path: root/src/calcurse.c
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.c
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.c')
-rw-r--r--src/calcurse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 57dce89..31be357 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -274,7 +274,7 @@ static inline void key_generic_save(void)
char *msg = NULL;
int ret;
- ret = io_save_cal();
+ ret = io_save_cal(interactive);
if (ret == IO_SAVE_RELOAD) {
ui_todo_load_items();
@@ -505,7 +505,7 @@ static inline void key_generic_scroll_down(void)
static inline void key_generic_quit(void)
{
if (conf.auto_save)
- io_save_cal();
+ io_save_cal(interactive);
if (conf.auto_gc)
note_gc();
@@ -540,7 +540,7 @@ static inline void key_generic_cmd(void)
if (!strcmp(cmd_name, "write") || !strcmp(cmd_name, "w") ||
!strcmp(cmd_name, "wq")) {
- io_save_cal();
+ io_save_cal(interactive);
valid = 1;
}
if (!strcmp(cmd_name, "quit") || !strcmp(cmd_name, "q") ||