Move user information after save/reload to the command level
Moving user information to calcurse.c makes it easier to perform the actual save/reload operatons in io.c, e.g. it is possible to load instead of reload after a merge in conflict resolving. The save/reload operations are of such importance that the user should always be informed of the result (it's a bit disquieting when there is no reaction to a save or reload command). Hence, the save/reload status messages are no longer conditioned by show_dialogs(). No confirmation is asked for, so a message stays until the status bar is updated by another action. Care is taken to inform about save/reload actions that result in no change. Texts are kept concise because of the limited message area. When conflicts are present, whether saving or reloading, the "continue/merge/cancel" pattern seems easier to grasp. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
committed by
Lukas Fleischer
parent
d7777ed44e
commit
8b39637a62
@@ -658,7 +658,17 @@ enum getstr {
|
||||
enum {
|
||||
IO_SAVE_CTINUE,
|
||||
IO_SAVE_RELOAD,
|
||||
IO_SAVE_CANCEL
|
||||
IO_SAVE_CANCEL,
|
||||
IO_SAVE_NOOP
|
||||
};
|
||||
|
||||
/* Return codes for the io_reload_data() function. */
|
||||
enum {
|
||||
IO_RELOAD_LOAD,
|
||||
IO_RELOAD_CTINUE,
|
||||
IO_RELOAD_MERGE,
|
||||
IO_RELOAD_CANCEL,
|
||||
IO_RELOAD_NOOP
|
||||
};
|
||||
|
||||
/* Week days. */
|
||||
@@ -860,7 +870,7 @@ unsigned io_save_keys(void);
|
||||
int io_save_cal(enum save_display);
|
||||
void io_load_app(struct item_filter *);
|
||||
void io_load_todo(struct item_filter *);
|
||||
void io_load_data(struct item_filter *, int);
|
||||
int io_load_data(struct item_filter *, int);
|
||||
int io_reload_data(void);
|
||||
void io_load_keys(const char *);
|
||||
int io_check_dir(const char *);
|
||||
|
||||
Reference in New Issue
Block a user