There is an event which is always triggered when cache is rebuilt. See e_init().
S. Den 27. sep. 2012 kl. 10:40 skrev "Enlightenment SVN" <no-re...@enlightenment.org>: > Log: > 1. wait for initial efreet desktop update before going ot first page > 2. wait again after new desktops instaleld and update comes in before > advancing > > > > Author: raster > Date: 2012-09-27 01:40:24 -0700 (Thu, 27 Sep 2012) > New Revision: 77135 > Trac: http://trac.enlightenment.org/e/changeset/77135 > > Modified: > trunk/e/src/modules/wizard/page_000.c trunk/e/src/modules/wizard/page_040.c > > Modified: trunk/e/src/modules/wizard/page_000.c > =================================================================== > --- trunk/e/src/modules/wizard/page_000.c 2012-09-27 08:23:53 UTC (rev > 77134) > +++ trunk/e/src/modules/wizard/page_000.c 2012-09-27 08:40:24 UTC (rev > 77135) > @@ -3,6 +3,9 @@ > #include "e.h" > #include "e_mod_main.h" > > +static Ecore_Event_Handler *_update_handler = NULL; > +static Ecore_Timer *_next_timer = NULL; > + > EAPI int > wizard_page_init(E_Wizard_Page *pg __UNUSED__) > { > @@ -12,17 +15,30 @@ > EAPI int > wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__) > { > + if (_update_handler) ecore_event_handler_del(_update_handler); > + _update_handler = NULL; > return 1; > } > > static Eina_Bool > _next_page(void *data __UNUSED__) > { > + _next_timer = NULL; > + if (_update_handler) ecore_event_handler_del(_update_handler); > + _update_handler = NULL; > e_wizard_button_next_enable_set(1); > e_wizard_next(); > return ECORE_CALLBACK_CANCEL; > } > > +static Eina_Bool > +_cb_desktops_update(void *data __UNUSED__, int ev_type __UNUSED__, void *ev > __UNUSED__) > +{ > + if (_next_timer) ecore_timer_del(_next_timer); > + _next_timer = ecore_timer_add(2.0, _next_page, NULL); > + return ECORE_CALLBACK_PASS_ON; > +} > + > EAPI int > wizard_page_show(E_Wizard_Page *pg __UNUSED__) > { > @@ -34,7 +50,12 @@ > e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/firstpage"); > e_wizard_page_show(o); > > - ecore_timer_add(2.0, _next_page, NULL); > + _update_handler = > + ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE, > + _cb_desktops_update, NULL); > + > + /* advance in 15 sec anyway if no efreet update comes */ > + _next_timer = ecore_timer_add(15.0, _next_page, NULL); > return 1; > } > > > Modified: trunk/e/src/modules/wizard/page_040.c > =================================================================== > --- trunk/e/src/modules/wizard/page_040.c 2012-09-27 08:23:53 UTC (rev > 77134) > +++ trunk/e/src/modules/wizard/page_040.c 2012-09-27 08:40:24 UTC (rev > 77135) > @@ -2,6 +2,9 @@ > #include "e.h" > #include "e_mod_main.h" > > +static Ecore_Event_Handler *_update_handler = NULL; > +static Ecore_Timer *_next_timer = NULL; > + > EAPI int > wizard_page_init(E_Wizard_Page *pg __UNUSED__) > { > @@ -11,9 +14,30 @@ > EAPI int > wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__) > { > + if (_update_handler) ecore_event_handler_del(_update_handler); > + _update_handler = NULL; > return 1; > } > > +static Eina_Bool > +_next_page(void *data __UNUSED__) > +{ > + _next_timer = NULL; > + if (_update_handler) ecore_event_handler_del(_update_handler); > + _update_handler = NULL; > + e_wizard_button_next_enable_set(1); > + e_wizard_next(); > + return ECORE_CALLBACK_CANCEL; > +} > + > +static Eina_Bool > +_cb_desktops_update(void *data __UNUSED__, int ev_type __UNUSED__, void *ev > __UNUSED__) > +{ > + if (_next_timer) ecore_timer_del(_next_timer); > + _next_timer = ecore_timer_add(1.0, _next_page, NULL); > + return ECORE_CALLBACK_PASS_ON; > +} > + > EAPI int > wizard_page_show(E_Wizard_Page *pg __UNUSED__) > { > @@ -25,6 +49,14 @@ > snprintf(buf, sizeof(buf), "%s/extra_desktops", e_wizard_dir_get()); > extra_desks = ecore_file_ls(buf); > if (!extra_desks) return 0; > + > + _update_handler = > + ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE, > + _cb_desktops_update, NULL); > + > + /* advance in 15 sec anyway if no efreet update comes */ > + _next_timer = ecore_timer_add(15.0, _next_page, NULL); > + > EINA_LIST_FREE(extra_desks, file) > { > snprintf(buf, sizeof(buf), "%s/extra_desktops/%s", > @@ -80,7 +112,7 @@ > } > free(file); > } > - return 0; /* 1 == show ui, and wait for user, 0 == just continue */ > + return 1; /* 1 == show ui, and wait for user, 0 == just continue */ > } > > EAPI int > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel