summaryrefslogtreecommitdiff
path: root/src/utils.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/utils.c
parent6d9129764bebb775951c2c8629a291407c25a693 (diff)
downloadcalcurse-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/utils.c')
-rw-r--r--src/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 528657e..deff631 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1653,3 +1653,8 @@ int hash_matches(const char *pattern, const char *hash)
return (starts_with(hash, pattern) != invert);
}
+
+int show_dialogs(void)
+{
+ return (!quiet) && conf.system_dialogs;
+}