diff --git a/src/modules/wizard/e_mod_main.c b/src/modules/wizard/e_mod_main.c index 7b563549f..b56d07a25 100644 --- a/src/modules/wizard/e_mod_main.c +++ b/src/modules/wizard/e_mod_main.c @@ -77,7 +77,7 @@ e_modapi_init(E_Module *m) e_module_dir_get(m), MODULE_ARCH, file); handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL); if (handle) - e_wizard_page_add(handle, + e_wizard_page_add(handle, file, dlsym(handle, "wizard_page_init"), dlsym(handle, "wizard_page_shutdown"), dlsym(handle, "wizard_page_show"), diff --git a/src/modules/wizard/e_wizard.c b/src/modules/wizard/e_wizard.c index db078ffc7..3129bb85c 100644 --- a/src/modules/wizard/e_wizard.c +++ b/src/modules/wizard/e_wizard.c @@ -123,7 +123,7 @@ e_wizard_next(void) e_wizard_next(); return; } - + fprintf(stderr, "WIZARD PAGE: %s\n", curpage->name); e_wizard_button_next_enable_set(1); need_xdg_desktops = EINA_FALSE; need_xdg_icons = EINA_FALSE; @@ -152,7 +152,7 @@ e_wizard_page_show(Evas_Object *obj) } E_API E_Wizard_Page * -e_wizard_page_add(void *handle, +e_wizard_page_add(void *handle, const char *name, int (*init_cb)(E_Wizard_Page *pg, Eina_Bool *need_xdg_desktops, Eina_Bool *need_xdg_icons), int (*shutdown_cb)(E_Wizard_Page *pg), int (*show_cb)(E_Wizard_Page *pg), @@ -164,6 +164,7 @@ e_wizard_page_add(void *handle, pg = E_NEW(E_Wizard_Page, 1); if (!pg) return NULL; + pg->name = eina_stringshare_add(name); pg->handle = handle; pg->evas = evas_object_evas_get(pop); @@ -187,6 +188,7 @@ e_wizard_page_del(E_Wizard_Page *pg) // once only then e restarts itself with final wizard page // if (pg->handle) dlclose(pg->handle); if (pg->shutdown) pg->shutdown(pg); + eina_stringshare_del(pg->name); pages = (E_Wizard_Page*)eina_inlist_remove(EINA_INLIST_GET(pages), EINA_INLIST_GET(pg)); free(pg); } diff --git a/src/modules/wizard/e_wizard.h b/src/modules/wizard/e_wizard.h index dca4694ee..e647c8ef3 100644 --- a/src/modules/wizard/e_wizard.h +++ b/src/modules/wizard/e_wizard.h @@ -19,6 +19,7 @@ struct _E_Wizard_Page EINA_INLIST; void *handle; Evas *evas; + Eina_Stringshare *name; int (*init) (E_Wizard_Page *pg, Eina_Bool *need_xdg_desktops, Eina_Bool *need_xdg_icons); int (*shutdown) (E_Wizard_Page *pg); int (*show) (E_Wizard_Page *pg); @@ -33,7 +34,7 @@ E_API void e_wizard_go(void); E_API void e_wizard_apply(void); E_API void e_wizard_next(void); E_API void e_wizard_page_show(Evas_Object *obj); -E_API E_Wizard_Page *e_wizard_page_add(void *handle, +E_API E_Wizard_Page *e_wizard_page_add(void *handle, const char *name, int (*init) (E_Wizard_Page *pg, Eina_Bool *need_xdg_desktops, Eina_Bool *need_xdg_icons), int (*shutdown) (E_Wizard_Page *pg), int (*show) (E_Wizard_Page *pg),