discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=160fb71af0d379af9f966e0b52588a260c951b94

commit 160fb71af0d379af9f966e0b52588a260c951b94
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Mar 16 12:55:19 2016 -0400

    set wizard page names, print to stderr every time a page is advanced
---
 src/modules/wizard/e_mod_main.c | 2 +-
 src/modules/wizard/e_wizard.c   | 6 ++++--
 src/modules/wizard/e_wizard.h   | 3 ++-
 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 7b56354..b56d07a 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 db078ff..3129bb8 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 dca4694..e647c8e 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),

-- 


Reply via email to