set wizard page names, print to stderr every time a page is advanced

This commit is contained in:
Mike Blumenkrantz 2016-03-16 12:55:19 -04:00
parent c0f7e4cb4d
commit 160fb71af0
3 changed files with 7 additions and 4 deletions

View File

@ -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"),

View File

@ -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);
}

View File

@ -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),