aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-05-30 23:23:03 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2020-06-13 10:56:15 -0400
commit5942c0760dc49256c584e37368aeb3d4915f74f3 (patch)
tree31cd72885bf46104edfb927bdfe354253b5d8cee /src/io.c
parent223f722b1dc03677a9ba1b0646c684d747d75e43 (diff)
downloadcalcurse-5942c0760dc49256c584e37368aeb3d4915f74f3.tar.gz
calcurse-5942c0760dc49256c584e37368aeb3d4915f74f3.zip
Remove systemdialogs option from configuration
The option controls the welcome window and the export/import result messages. The former is dropped. The latter are now always displayed unless calcurse is invoked with the "quiet" option (-q). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/io.c b/src/io.c
index 1caa6d3..663c858 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1207,21 +1207,6 @@ int io_check_data_files(void)
return missing;
}
-/* Draw the startup screen */
-void io_startup_screen(int no_data_file)
-{
- const char *enter = _("Press [ENTER] to continue");
-
- if (no_data_file)
- status_mesg(_("Welcome to Calcurse. Missing data files were created."),
- enter);
- else
- status_mesg(_("Data files found. Data will be loaded now."),
- enter);
-
- keys_wait_for_any_key(win[KEY].p);
-}
-
/* Export calcurse data. */
void io_export_data(enum export_type type, int export_uid)
{
@@ -1252,7 +1237,7 @@ void io_export_data(enum export_type type, int export_uid)
else if (type == IO_EXPORT_PCAL)
pcal_export_data(stream);
- if (show_dialogs() && ui_mode == UI_CURSES) {
+ if (!quiet && ui_mode == UI_CURSES) {
fclose(stream);
status_mesg(success, enter);
keys_wait_for_any_key(win[KEY].p);
@@ -1360,7 +1345,7 @@ void io_import_data(enum import_type type, char *stream_name,
stats.todos);
asprintf(&stats_str[3], _("%d skipped"), stats.skipped);
- if (ui_mode == UI_CURSES && show_dialogs()) {
+ if (ui_mode == UI_CURSES && !quiet) {
char *read, *stat;
asprintf(&read, proc_report, stats.lines);
@@ -1371,7 +1356,7 @@ void io_import_data(enum import_type type, char *stream_name,
mem_free(read);
mem_free(stat);
keys_wait_for_any_key(win[KEY].p);
- } else if (ui_mode == UI_CMDLINE && show_dialogs()) {
+ } else if (ui_mode == UI_CMDLINE && !quiet) {
printf(proc_report, stats.lines);
printf("\n%s / %s / %s / %s\n", stats_str[0], stats_str[1],
stats_str[2], stats_str[3]);