forked from enlightenment/enlightenment
set wizard page names, print to stderr every time a page is advanced
This commit is contained in:
parent
c0f7e4cb4d
commit
160fb71af0
|
@ -77,7 +77,7 @@ e_modapi_init(E_Module *m)
|
||||||
e_module_dir_get(m), MODULE_ARCH, file);
|
e_module_dir_get(m), MODULE_ARCH, file);
|
||||||
handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
|
handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
|
||||||
if (handle)
|
if (handle)
|
||||||
e_wizard_page_add(handle,
|
e_wizard_page_add(handle, file,
|
||||||
dlsym(handle, "wizard_page_init"),
|
dlsym(handle, "wizard_page_init"),
|
||||||
dlsym(handle, "wizard_page_shutdown"),
|
dlsym(handle, "wizard_page_shutdown"),
|
||||||
dlsym(handle, "wizard_page_show"),
|
dlsym(handle, "wizard_page_show"),
|
||||||
|
|
|
@ -123,7 +123,7 @@ e_wizard_next(void)
|
||||||
e_wizard_next();
|
e_wizard_next();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
fprintf(stderr, "WIZARD PAGE: %s\n", curpage->name);
|
||||||
e_wizard_button_next_enable_set(1);
|
e_wizard_button_next_enable_set(1);
|
||||||
need_xdg_desktops = EINA_FALSE;
|
need_xdg_desktops = EINA_FALSE;
|
||||||
need_xdg_icons = EINA_FALSE;
|
need_xdg_icons = EINA_FALSE;
|
||||||
|
@ -152,7 +152,7 @@ e_wizard_page_show(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
E_API E_Wizard_Page *
|
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 (*init_cb)(E_Wizard_Page *pg, Eina_Bool *need_xdg_desktops, Eina_Bool *need_xdg_icons),
|
||||||
int (*shutdown_cb)(E_Wizard_Page *pg),
|
int (*shutdown_cb)(E_Wizard_Page *pg),
|
||||||
int (*show_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);
|
pg = E_NEW(E_Wizard_Page, 1);
|
||||||
if (!pg) return NULL;
|
if (!pg) return NULL;
|
||||||
|
pg->name = eina_stringshare_add(name);
|
||||||
|
|
||||||
pg->handle = handle;
|
pg->handle = handle;
|
||||||
pg->evas = evas_object_evas_get(pop);
|
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
|
// once only then e restarts itself with final wizard page
|
||||||
// if (pg->handle) dlclose(pg->handle);
|
// if (pg->handle) dlclose(pg->handle);
|
||||||
if (pg->shutdown) pg->shutdown(pg);
|
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));
|
pages = (E_Wizard_Page*)eina_inlist_remove(EINA_INLIST_GET(pages), EINA_INLIST_GET(pg));
|
||||||
free(pg);
|
free(pg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ struct _E_Wizard_Page
|
||||||
EINA_INLIST;
|
EINA_INLIST;
|
||||||
void *handle;
|
void *handle;
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
|
Eina_Stringshare *name;
|
||||||
int (*init) (E_Wizard_Page *pg, Eina_Bool *need_xdg_desktops, Eina_Bool *need_xdg_icons);
|
int (*init) (E_Wizard_Page *pg, Eina_Bool *need_xdg_desktops, Eina_Bool *need_xdg_icons);
|
||||||
int (*shutdown) (E_Wizard_Page *pg);
|
int (*shutdown) (E_Wizard_Page *pg);
|
||||||
int (*show) (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_apply(void);
|
||||||
E_API void e_wizard_next(void);
|
E_API void e_wizard_next(void);
|
||||||
E_API void e_wizard_page_show(Evas_Object *obj);
|
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 (*init) (E_Wizard_Page *pg, Eina_Bool *need_xdg_desktops, Eina_Bool *need_xdg_icons),
|
||||||
int (*shutdown) (E_Wizard_Page *pg),
|
int (*shutdown) (E_Wizard_Page *pg),
|
||||||
int (*show) (E_Wizard_Page *pg),
|
int (*show) (E_Wizard_Page *pg),
|
||||||
|
|
Loading…
Reference in New Issue