wizard bring back page 0 so you see it...

efreet finds things too fast so bring back page 0 so you see the logo
for at least 5 seconds.
This commit is contained in:
Carsten Haitzler 2019-07-04 15:20:38 +01:00
parent 933eb51e47
commit 2819f3b1dc
2 changed files with 18 additions and 21 deletions

View File

@ -21,7 +21,7 @@ static Evas_Object *o_box = NULL;
static E_Wizard_Page *pages = NULL;
static E_Wizard_Page *curpage = NULL;
static int next_ok = 1;
static int next_prev = 0;
static int next_prev = -1;
static int next_can = 0;
static Eina_List *handlers = NULL;
@ -32,6 +32,7 @@ static Eina_Bool need_xdg_desktops = EINA_FALSE;
static Eina_Bool need_xdg_icons = EINA_FALSE;
static Ecore_Timer *next_timer = NULL;
static Ecore_Timer *next_xdg_timer = NULL;
EINTERN int
wizard_init(void)
@ -77,7 +78,10 @@ EINTERN void
wizard_go(void)
{
if (!curpage)
curpage = pages;
{
wizard_button_next_enable_set(0);
curpage = pages;
}
if (curpage)
{
if (curpage->init) curpage->init(curpage, &need_xdg_desktops, &need_xdg_icons);
@ -353,6 +357,14 @@ _wizard_check_xdg(void)
return 1;
}
static Eina_Bool
_wizard_next_delay(void *data EINA_UNUSED)
{
next_xdg_timer = NULL;
wizard_next();
return EINA_FALSE;
}
static void
_wizard_next_xdg(void)
{
@ -364,12 +376,14 @@ _wizard_next_xdg(void)
if (curpage->state != E_WIZARD_PAGE_STATE_SHOW)
{
if (next_ok) return; // waiting for user
wizard_next();
if (next_xdg_timer) ecore_timer_del(next_xdg_timer);
next_xdg_timer = ecore_timer_add(5.0, _wizard_next_delay, NULL);
}
else if ((curpage->show) && (!curpage->show(curpage)))
{
curpage->state++;
wizard_next();
if (next_xdg_timer) ecore_timer_del(next_xdg_timer);
next_xdg_timer = ecore_timer_add(5.0, _wizard_next_delay, NULL);
}
else
curpage->state++;

View File

@ -3,8 +3,6 @@
#include "e_wizard.h"
#include "e_wizard_api.h"
static Ecore_Timer *_next_timer = NULL;
/*
E_API int
wizard_page_init(E_Wizard_Page *pg EINA_UNUSED, Eina_Bool *need_xdg_desktops EINA_UNUSED, Eina_Bool *need_xdg_icons EINA_UNUSED)
@ -18,14 +16,6 @@ wizard_page_shutdown(E_Wizard_Page *pg EINA_UNUSED)
return 1;
}
*/
static Eina_Bool
_next_page(void *data EINA_UNUSED)
{
_next_timer = NULL;
api->wizard_button_next_enable_set(1);
api->wizard_next();
return ECORE_CALLBACK_CANCEL;
}
E_API int
wizard_page_show(E_Wizard_Page *pg EINA_UNUSED)
@ -33,22 +23,15 @@ wizard_page_show(E_Wizard_Page *pg EINA_UNUSED)
Evas_Object *o;
api->wizard_title_set(_("Enlightenment"));
api->wizard_button_next_enable_set(0);
o = edje_object_add(pg->evas);
e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/firstpage");
api->wizard_page_show(o);
/* advance in 1 sec */
if (!_next_timer)
_next_timer = ecore_timer_loop_add(1.0, _next_page, NULL);
return 1;
}
E_API int
wizard_page_hide(E_Wizard_Page *pg EINA_UNUSED)
{
if (_next_timer) ecore_timer_del(_next_timer);
_next_timer = NULL;
return 1;
}
/*