From 5ad0019b2326e4012299e36682669ca767f39cd4 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Thu, 23 Aug 2018 20:45:38 +0200 Subject: Only reload if data files were changed (replacement) This is a replacement for commits 57dd3d6 and 912124b. 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 Signed-off-by: Lukas Fleischer --- src/calcurse.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/calcurse.c') diff --git a/src/calcurse.c b/src/calcurse.c index 7739c0f..533f78c 100644 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -551,15 +551,6 @@ int main(int argc, char **argv) textdomain(PACKAGE); #endif /* ENABLE_NLS */ - /* Thread-safe data structure init */ - apoint_llist_init(); - recur_apoint_llist_init(); - - /* Initialize non-thread-safe data structures. */ - event_llist_init(); - recur_event_llist_init(); - todo_init_list(); - /* * Begin by parsing and handling command line arguments. * The data path is also initialized here. @@ -627,11 +618,7 @@ 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_load_data(NULL, FORCE); wins_slctd_set(conf.default_panel); wins_resize(); /* -- cgit v1.2.3-54-g00ecf