Handling of modified flag
The flag modified (io.c) keeps track of the memory state of data: modified == 0: unchanged since load or last save modified == 1: changed since load or last save It is now unset in io_load_data() and io_save_cal() only. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
e97360df71
commit
8c2ccebe35
@ -626,7 +626,6 @@ int main(int argc, char **argv)
|
|||||||
io_load_data(NULL);
|
io_load_data(NULL);
|
||||||
run_hook("post-load");
|
run_hook("post-load");
|
||||||
|
|
||||||
io_unset_modified();
|
|
||||||
wins_slctd_set(conf.default_panel);
|
wins_slctd_set(conf.default_panel);
|
||||||
wins_resize();
|
wins_resize();
|
||||||
/*
|
/*
|
||||||
|
4
src/io.c
4
src/io.c
@ -905,6 +905,7 @@ void io_load_data(struct item_filter *filter)
|
|||||||
io_load_app(filter);
|
io_load_app(filter);
|
||||||
io_load_todo(filter);
|
io_load_todo(filter);
|
||||||
io_mutex_unlock();
|
io_mutex_unlock();
|
||||||
|
io_unset_modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
int io_reload_data(void)
|
int io_reload_data(void)
|
||||||
@ -958,9 +959,8 @@ int io_reload_data(void)
|
|||||||
todo_init_list();
|
todo_init_list();
|
||||||
|
|
||||||
io_load_data(NULL);
|
io_load_data(NULL);
|
||||||
run_hook("post-load");
|
|
||||||
|
|
||||||
io_unset_modified();
|
run_hook("post-load");
|
||||||
|
|
||||||
if (show_dialogs()) {
|
if (show_dialogs()) {
|
||||||
status_mesg(reload_success, enter);
|
status_mesg(reload_success, enter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user