Refactor startup screen branch
Removes the pointless first parameter to io_startup_screen() and saves one wins_update() call if system dialogs are disabled. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
c65ccb0e77
commit
691f8a6015
@ -161,8 +161,11 @@ main (int argc, char **argv)
|
|||||||
wins_reinit ();
|
wins_reinit ();
|
||||||
if (notify_bar ())
|
if (notify_bar ())
|
||||||
notify_start_main_thread ();
|
notify_start_main_thread ();
|
||||||
wins_update (FLAG_ALL);
|
if (conf.system_dialogs)
|
||||||
io_startup_screen (conf.system_dialogs, no_data_file);
|
{
|
||||||
|
wins_update (FLAG_ALL);
|
||||||
|
io_startup_screen (no_data_file);
|
||||||
|
}
|
||||||
inday = *day_process_storage (0, 0, &inday);
|
inday = *day_process_storage (0, 0, &inday);
|
||||||
wins_slctd_set (CAL);
|
wins_slctd_set (CAL);
|
||||||
wins_update (FLAG_ALL);
|
wins_update (FLAG_ALL);
|
||||||
|
@ -703,7 +703,7 @@ void io_check_dir (char *, int *);
|
|||||||
unsigned io_file_exist (char *);
|
unsigned io_file_exist (char *);
|
||||||
void io_check_file (char *, int *);
|
void io_check_file (char *, int *);
|
||||||
int io_check_data_files (void);
|
int io_check_data_files (void);
|
||||||
void io_startup_screen (unsigned, int);
|
void io_startup_screen (int);
|
||||||
void io_export_data (enum export_type);
|
void io_export_data (enum export_type);
|
||||||
void io_export_bar (void);
|
void io_export_bar (void);
|
||||||
void io_import_data (enum import_type, char *);
|
void io_import_data (enum import_type, char *);
|
||||||
|
22
src/io.c
22
src/io.c
@ -988,23 +988,17 @@ io_check_data_files (void)
|
|||||||
|
|
||||||
/* Draw the startup screen */
|
/* Draw the startup screen */
|
||||||
void
|
void
|
||||||
io_startup_screen (unsigned show_dialogs, int no_data_file)
|
io_startup_screen (int no_data_file)
|
||||||
{
|
{
|
||||||
const char *welcome_mesg =
|
|
||||||
_("Welcome to Calcurse. Missing data files were created.");
|
|
||||||
const char *data_mesg = _("Data files found. Data will be loaded now.");
|
|
||||||
const char *enter = _("Press [ENTER] to continue");
|
const char *enter = _("Press [ENTER] to continue");
|
||||||
|
|
||||||
if (no_data_file != 0)
|
if (no_data_file)
|
||||||
{
|
status_mesg (_("Data files found. Data will be loaded now."), enter);
|
||||||
status_mesg (welcome_mesg, enter);
|
else
|
||||||
wgetch (win[STA].p);
|
status_mesg (_("Welcome to Calcurse. Missing data files were created."),
|
||||||
}
|
enter);
|
||||||
else if (show_dialogs)
|
|
||||||
{
|
wgetch (win[STA].p);
|
||||||
status_mesg (data_mesg, enter);
|
|
||||||
wgetch (win[STA].p);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Export calcurse data. */
|
/* Export calcurse data. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user