From 0b20514dd81a727a344f431374c92af37db50867 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sun, 7 Aug 2022 15:26:10 +0200 Subject: [PATCH] move list image creation after window creation --- src/bin/entice_main.c | 78 +++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/bin/entice_main.c b/src/bin/entice_main.c index a569be6..4bd13c0 100644 --- a/src/bin/entice_main.c +++ b/src/bin/entice_main.c @@ -388,6 +388,45 @@ elm_main(int argc, char **argv) _entice_compare_default = _entice_compare_path; } + /* FIXME key binding */ + + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); + elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR); + elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); +#if ENABLE_NLS + elm_app_compile_locale_set(LOCALEDIR); +#endif + elm_app_name_set(PACKAGE_NAME); + elm_app_info_set(elm_main, PACKAGE_NAME, "themes/default.edj"); + +#if ENABLE_NLS + bindtextdomain(PACKAGE_NAME, elm_app_locale_dir_get()); + textdomain(PACKAGE_NAME); + _entice_translate_options(); +#else + options.copyright = ENTICE_COPYRIGHT; +#endif + + win = entice_win_add(); + if (!win) + { + ERR(_("could not create main window.")); + goto del_cfg; + } + + win_w = 960; + win_h = 540; + if (cfg) + { + win_w = cfg->cg_width; + win_h = cfg->cg_height; + } + + evas_object_resize(win, + win_w * elm_config_scale_get(), + win_h * elm_config_scale_get()); + list = NULL; if (args == argc) { @@ -434,45 +473,6 @@ elm_main(int argc, char **argv) if (!first) first = list; } - /* FIXME key binding */ - - elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); - elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); - elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR); - elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); -#if ENABLE_NLS - elm_app_compile_locale_set(LOCALEDIR); -#endif - elm_app_name_set(PACKAGE_NAME); - elm_app_info_set(elm_main, PACKAGE_NAME, "themes/default.edj"); - -#if ENABLE_NLS - bindtextdomain(PACKAGE_NAME, elm_app_locale_dir_get()); - textdomain(PACKAGE_NAME); - _entice_translate_options(); -#else - options.copyright = ENTICE_COPYRIGHT; -#endif - - win = entice_win_add(); - if (!win) - { - ERR(_("could not create main window.")); - goto del_cfg; - } - - win_w = 960; - win_h = 540; - if (cfg) - { - win_w = cfg->cg_width; - win_h = cfg->cg_height; - } - - evas_object_resize(win, - win_w * elm_config_scale_get(), - win_h * elm_config_scale_get()); - /* * store the image list in the Entice struct * set the first image that will be displayed