wiz_module = m;
e_wizard_init();
+ e_config->scale.use_dpi = 0;
+ e_config->scale.use_custom = 1;
+ e_config->scale.factor = 1.2;
+ e_scale_update();
snprintf(buf, sizeof(buf), "%s/%s", e_module_dir_get(m), MODULE_ARCH);
files = ecore_file_ls(buf);
files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files);
if (curpage)
{
if (curpage->init) curpage->init(curpage, &need_xdg_desktops, &need_xdg_icons);
+ curpage->state++;
_e_wizard_next_eval();
if (_e_wizard_check_xdg())
{
if ((curpage->show) && (!curpage->show(curpage)))
{
+ curpage->state++;
e_wizard_next();
}
+ else
+ curpage->state++;
}
}
}
e_wizard_apply(void)
{
Eina_List *l;
+ E_Wizard_Page *pg;
- for (l = pages; l; l = l->next)
- {
- E_Wizard_Page *pg;
-
- pg = l->data;
- if (pg->apply) pg->apply(pg);
- }
+ EINA_LIST_FOREACH(pages, l, pg)
+ if (pg->apply) pg->apply(pg);
}
EAPI void
{
if (curpage->hide)
curpage->hide(curpage);
+ curpage->state++;
}
curpage = eina_list_data_get(eina_list_next(l));
+ e_wizard_button_next_enable_set(1);
need_xdg_desktops = EINA_FALSE;
need_xdg_icons = EINA_FALSE;
if (curpage->init)
curpage->init(curpage, &need_xdg_desktops, &need_xdg_icons);
+ curpage->state++;
if (!_e_wizard_check_xdg())
break;
_e_wizard_next_eval();
if ((curpage->show) && (curpage->show(curpage)))
- break;
+ {
+ curpage->state++;
+ break;
+ }
+ curpage->state++;
}
else
{
// ther page seq.. we cant REALLY dlclose... not a problem as wizard runs
// once only then e restarts itself with final wizard page
// if (pg->handle) dlclose(pg->handle);
+ if (pg->shutdown) pg->shutdown(pg);
pages = eina_list_remove(pages, pg);
free(pg);
}
{
/* Advance within 15 secs if no xdg event */
if (!next_timer)
- next_timer = ecore_timer_add(15.0, _e_wizard_cb_next_page, NULL);
+ next_timer = ecore_timer_add(7.0, _e_wizard_cb_next_page, NULL);
next_can = 0;
_e_wizard_next_eval();
return 0;
{
/* Advance within 15 secs if no xdg event */
if (!next_timer)
- next_timer = ecore_timer_add(15.0, _e_wizard_cb_next_page, NULL);
+ next_timer = ecore_timer_add(7.0, _e_wizard_cb_next_page, NULL);
next_can = 0;
_e_wizard_next_eval();
return 0;
if (next_timer) ecore_timer_del(next_timer);
next_timer = NULL;
- if ((curpage->show) && (!curpage->show(curpage)))
- e_wizard_next();
+ if (curpage->state != E_WIZARD_PAGE_STATE_SHOW)
+ {
+ if (next_ok) return; // waiting for user
+ e_wizard_next();
+ }
+ else if ((curpage->show) && (!curpage->show(curpage)))
+ {
+ curpage->state++;
+ e_wizard_next();
+ }
+ else
+ curpage->state++;
}
static Eina_Bool
#ifndef E_WIZARD_H
#define E_WIZARD_H
+typedef enum
+{
+ E_WIZARD_PAGE_STATE_INIT,
+ E_WIZARD_PAGE_STATE_SHOW,
+ E_WIZARD_PAGE_STATE_HIDE,
+ E_WIZARD_PAGE_STATE_SHUTDOWN
+} E_Wizard_Page_State;
+
struct _E_Wizard_Page
{
void *handle;
int (*show) (E_Wizard_Page *pg);
int (*hide) (E_Wizard_Page *pg);
int (*apply) (E_Wizard_Page *pg);
+ E_Wizard_Page_State state;
};
EAPI int e_wizard_init(void);
static Ecore_Timer *_next_timer = NULL;
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
- if (_next_timer) ecore_timer_del(_next_timer);
- _next_timer = NULL;
return 1;
}
-
+*/
static Eina_Bool
_next_page(void *data __UNUSED__)
{
e_wizard_page_show(o);
/* advance in 1 sec */
- _next_timer = ecore_timer_add(1.0, _next_page, NULL);
+ if (!_next_timer)
+ _next_timer = ecore_timer_add(1.0, _next_page, NULL);
return 1;
}
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
+ if (_next_timer) ecore_timer_del(_next_timer);
+ _next_timer = NULL;
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
}
return 1;
}
-
+/*
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
// FIXME: free blang_list
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
e_widget_ilist_selected_set(ob, sel);
e_widget_ilist_nth_show(ob, sel, 0);
}
+ else if (e_widget_ilist_count(ob) == 2) // default and one other
+ e_widget_ilist_selected_set(ob, 1);
+ else
+ e_widget_ilist_selected_set(ob, 0);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
parse_rules();
return 1;
}
-
+/*
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
// enable next once you choose a profile
e_wizard_button_next_enable_set(1);
}
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
e_config_save();
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
/* Menu setup */
#include "e.h"
#include "e_mod_main.h"
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
e_config->default_system_menu = eina_stringshare_add(buf);
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
-
+*/
*need_xdg_desktops = EINA_TRUE;
return 1;
}
-
+/*
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
- if (_next_timer) ecore_timer_del(_next_timer);
- _next_timer = NULL;
return 1;
}
-
+*/
static Eina_Bool
_next_page(void *data __UNUSED__)
{
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
+ if (_next_timer) ecore_timer_del(_next_timer);
+ _next_timer = NULL;
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
static double scale = 1.0;
static Eina_List *obs = NULL;
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
static void
_scale_preview_sel_set(Evas_Object *ob, int sel)
{
e_scale_update();
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
#include "e_mod_main.h"
static int focus_mode = 1;
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
// evas_object_del(pg->data);
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
*need_xdg_icons = EINA_TRUE;
return 1;
}
-
+/*
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
eina_list_free(themes);
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
+*/
*need_xdg_desktops = EINA_TRUE;
return 1;
}
-
+/*
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
fclose(fin);
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
+*/
fclose(f);
return strdup(buf);
}
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
}
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
-
+*/
return strdup(buf);
}
#endif
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
}
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
-
+*/
e_wizard_next();
}
#endif
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
return strdup(buf);
}
*/
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
}
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
-
+*/
/* Setup if we need backlight? */
#include "e.h"
#include "e_mod_main.h"
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
}
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
-
+*/
/* Setup if we need mixer? */
#include "e.h"
#include "e_mod_main.h"
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
}
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
-
+*/
}
return 0;
}
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
// if (pg->data) evas_object_del(pg->data);
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
/* Setup favorites and desktop links */
#include "e.h"
#include "e_mod_main.h"
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
{
return 1;
}
-
+*/
#include "e_mod_main.h"
static int do_up = 1;
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
e_config_save_queue();
return 1;
}
-
+/*
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
#include "e_mod_main.h"
static int do_tasks = 1;
-
+/*
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+*/
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
e_wizard_page_show(o);
return 1; /* 1 == show ui, and wait for user, 0 == just continue */
}
-
+/*
EAPI int
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
{
return 1;
}
-
+*/
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
#include "e.h"
#include "e_mod_main.h"
+#if 0
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons __UNUSED__)
{
{
return 1;
}
-
+#endif
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{