summaryrefslogtreecommitdiffstats
path: root/src/calcurse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/calcurse.c')
-rw-r--r--src/calcurse.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index d3b1d03..f681d12 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -65,11 +65,8 @@ int
main (int argc, char **argv)
{
struct day_items_nb inday;
- int non_interactive;
int no_data_file = 1;
int cut_item = 0;
- const char *quit_message = _("Do you really want to quit ?");
- char choices[] = "[y/n] ";
int count;
#if ENABLE_NLS
@@ -90,9 +87,11 @@ main (int argc, char **argv)
* Begin by parsing and handling command line arguments.
* The data path is also initialized here.
*/
- non_interactive = parse_args (argc, argv);
- if (non_interactive)
- exit_calcurse (EXIT_SUCCESS);
+ if (parse_args (argc, argv))
+ {
+ /* Non-interactive mode. */
+ exit_calcurse (EXIT_SUCCESS);
+ }
else
{
no_data_file = io_check_data_files ();
@@ -136,7 +135,6 @@ main (int argc, char **argv)
init_pair (COLR_DEFAULT, foreground, background);
init_pair (COLR_HIGH, COLOR_BLACK, COLOR_GREEN);
init_pair (COLR_CUSTOM, COLOR_RED, background);
-
}
else
{
@@ -543,7 +541,7 @@ main (int argc, char **argv)
if (conf.confirm_quit)
{
- status_mesg (_(quit_message), choices);
+ status_mesg_yesno (_("Do you really want to quit ?"));
key = wgetch (win[STA].p);
if (key == 'y')
exit_calcurse (EXIT_SUCCESS);