aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-01-12 18:29:26 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-01-13 17:39:44 +0100
commitc58087d5914322ab8f693729605a9508d67bb676 (patch)
tree8a1c58b51ca6f05c24c99bfd73a8c41276385f9d /src/io.c
parent6d9129764bebb775951c2c8629a291407c25a693 (diff)
downloadcalcurse-c58087d5914322ab8f693729605a9508d67bb676.tar.gz
calcurse-c58087d5914322ab8f693729605a9508d67bb676.zip
Add command line option to suppress dialogs
Implement a -q/--quiet command line option to disable system dialogs temporarily. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/io.c b/src/io.c
index d25180a..2639da5 100644
--- a/src/io.c
+++ b/src/io.c
@@ -425,7 +425,7 @@ void io_save_cal(enum save_display display)
/* Print a message telling data were saved */
if (ui_mode == UI_CURSES && display == IO_SAVE_DISPLAY_BAR &&
- conf.system_dialogs) {
+ show_dialogs()) {
status_mesg(save_success, enter);
wgetch(win[KEY].p);
}
@@ -794,7 +794,7 @@ void io_reload_data(void)
ui_todo_load_items();
ui_todo_sel_reset();
- if (conf.system_dialogs) {
+ if (show_dialogs()) {
status_mesg(reload_success, enter);
wgetch(win[KEY].p);
}
@@ -1113,7 +1113,7 @@ void io_export_data(enum export_type type)
else if (type == IO_EXPORT_PCAL)
pcal_export_data(stream);
- if (conf.system_dialogs && ui_mode == UI_CURSES) {
+ if (show_dialogs() && ui_mode == UI_CURSES) {
status_mesg(success, enter);
wgetch(win[KEY].p);
}
@@ -1211,7 +1211,7 @@ void io_import_data(enum import_type type, const char *stream_name)
stats.todos);
asprintf(&stats_str[3], _("%d skipped"), stats.skipped);
- if (ui_mode == UI_CURSES && conf.system_dialogs) {
+ if (ui_mode == UI_CURSES && show_dialogs()) {
char *read, *stat;
asprintf(&read, proc_report, stats.lines);