init/shutdown: fix.

Queue a restart. Make config checking less aggressive.
This commit is contained in:
Alastair Poole 2020-09-11 13:52:50 +01:00
parent 3453ed3a10
commit db9b8a73a7
4 changed files with 3 additions and 7 deletions

View File

@ -79,8 +79,6 @@ config_load(void)
if (!f) _config_fail("read");
cfg = eet_read(f, "Config", &size);
_config_check(cfg);
if (cfg->version < CONFIG_VERSION)
{
free(cfg);
@ -88,6 +86,8 @@ config_load(void)
cfg = _config_init();
}
_config_check(cfg);
eet_close(f);
}

View File

@ -99,7 +99,6 @@ int
main(int argc, char **argv)
{
Ui *ui;
Eina_Bool restart = EINA_FALSE;
int i;
for (i = 0; i < argc; i++)
@ -136,9 +135,7 @@ main(int argc, char **argv)
if (ui)
{
ecore_main_loop_begin();
restart = ui->restart;
evisum_ui_del(ui);
if (restart) ecore_exe_run("evisum", NULL);
}
elm_shutdown();

View File

@ -1098,7 +1098,7 @@ _menu_effects_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
evisum_ui_effects_enabled_set(!evisum_ui_effects_enabled_get());
_config_save(ui);
ui->restart = EINA_TRUE;
ecore_app_restart();
ecore_main_loop_quit();
}

View File

@ -90,7 +90,6 @@ typedef struct Ui
Eina_Bool sort_reverse;
Eina_Bool show_self;
Eina_Bool shutdown_now;
Eina_Bool restart;
Ecore_Animator *animator;
Eina_Bool zfs_mounted;