aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-01-10 12:39:00 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-01-10 12:41:24 +0100
commita2e3e866a6b77a1b236dc4375b582b327265dc3a (patch)
tree36e0ba7c6d105357f8f6f9b22ec7bc00a464eff3 /src/io.c
parent626139a0b89b02c63dd0b3871925c20c673793e4 (diff)
downloadcalcurse-a2e3e866a6b77a1b236dc4375b582b327265dc3a.tar.gz
calcurse-a2e3e866a6b77a1b236dc4375b582b327265dc3a.zip
Add pre-load and post-load hooks
Potential use case: Synchronize data with some server before loading. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index 7411a6b..fcb13ae 100644
--- a/src/io.c
+++ b/src/io.c
@@ -693,8 +693,10 @@ void io_load_todo(struct item_filter *filter)
/* Load appointments and todo items */
void io_load_data(struct item_filter *filter)
{
+ run_hook("pre-load");
io_load_app(filter);
io_load_todo(filter);
+ run_hook("post-load");
}
void io_reload_data(void)