aboutsummaryrefslogtreecommitdiffstats
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2018-05-23 17:52:05 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-05-23 17:52:05 +0200
commit912124bcdcd223981db535ebb784789d4bd03ede (patch)
tree3d6dbf25592ce35e0f2484aa87b90721b15b91dd /src/calcurse.c
parent2d19605ba8f2a630d762e08578206c4935723da4 (diff)
downloadcalcurse-912124bcdcd223981db535ebb784789d4bd03ede.tar.gz
calcurse-912124bcdcd223981db535ebb784789d4bd03ede.zip
Run pre-load hook before testing for modifications
The pre-load hook is often used to manipulate the data files before loading, such as by synchronizing with a remote calendar. Make sure we always execute the pre-load hook upon reloads, even if the data files have not been modified. Fixes GitHub issue #98. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r--src/calcurse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 2c5cd9f..8e1978e 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -619,7 +619,11 @@ int main(int argc, char **argv)
config_load();
wins_erase_status_bar();
io_load_keys(conf.pager);
+
+ run_hook("pre-load");
io_load_data(NULL);
+ run_hook("post-load");
+
io_unset_modified();
wins_slctd_set(conf.default_panel);
wins_resize();