summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-03-16 12:55:19 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-03-16 12:55:19 -0400
commit160fb71af0d379af9f966e0b52588a260c951b94 (patch)
tree4c0b7ebde16b10030f8b015874ab2a57be694a3c
parentc0f7e4cb4da627ee3da5fa5852b7fb65dc7a853b (diff)
downloadenlightenment-160fb71af0d379af9f966e0b52588a260c951b94.tar.gz
set wizard page names, print to stderr every time a page is advanced
-rw-r--r--src/modules/wizard/e_mod_main.c2
-rw-r--r--src/modules/wizard/e_wizard.c6
-rw-r--r--src/modules/wizard/e_wizard.h3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/wizard/e_mod_main.c b/src/modules/wizard/e_mod_main.c
index 7b563549fb..b56d07a25a 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 db078ffc7e..3129bb85cd 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 dca4694ee2..e647c8ef3e 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),