diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-04-06 23:21:18 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-04-06 23:23:58 +0200 |
commit | 1c442e6aefd8855cdeec776b0e4e604edf585884 (patch) | |
tree | 18b7a62118ce65473d3bd192b2c86a1954f42178 /src/calcurse.c | |
parent | d0b0ed3c202c3212a65ba628026a53d9663fc2d7 (diff) | |
download | calcurse-1c442e6aefd8855cdeec776b0e4e604edf585884.zip |
Miscellaneous small code cleanups
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r-- | src/calcurse.c | 14 |
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); |