big big big wizard revamp. as per todo list.

SVN revision: 62478
devs/princeamd/enlightenment-0.17-elive
Carsten Haitzler 12 years ago
parent 25c30ef7a7
commit 7c9f1888df
  1. 2388
      config/illume/e.src
  2. BIN
      config/illume/icon.png
  3. 3910
      config/standard/e.src
  4. BIN
      config/standard/icon.png
  5. 4
      config/standard/profile.desktop
  6. 1
      configure.ac
  7. 1
      data/Makefile.am
  8. 9
      data/other/Makefile.am
  9. BIN
      data/other/desktop_files.tar.gz
  10. BIN
      data/other/desktop_order.tar.gz
  11. BIN
      data/other/efm_favorites.tar.gz
  12. BIN
      data/other/icon_example.tar.gz
  13. 4
      src/modules/comp/Makefile.am
  14. 171
      src/modules/comp/e_mod_comp_cfdata.c
  15. 66
      src/modules/comp/e_mod_comp_cfdata.h
  16. 156
      src/modules/comp/e_mod_main.c
  17. 60
      src/modules/comp/e_mod_main.h
  18. 137
      src/modules/wizard/Makefile.am
  19. 12
      src/modules/wizard/data/def-ibar.txt
  20. 11
      src/modules/wizard/data/desktop/home.desktop
  21. 11
      src/modules/wizard/data/desktop/root.desktop
  22. 11
      src/modules/wizard/data/desktop/tmp.desktop
  23. 11
      src/modules/wizard/data/extra_desktops/mplayer.desktop
  24. 10
      src/modules/wizard/data/extra_desktops/xterm.desktop
  25. 4
      src/modules/wizard/data/favorites/.order
  26. 12
      src/modules/wizard/data/favorites/desktop.desktop
  27. 11
      src/modules/wizard/data/favorites/home.desktop
  28. 11
      src/modules/wizard/data/favorites/root.desktop
  29. 11
      src/modules/wizard/data/favorites/tmp.desktop
  30. 49
      src/modules/wizard/e_mod_main.c
  31. 2
      src/modules/wizard/e_mod_main.h
  32. 11
      src/modules/wizard/e_wizard.c
  33. 18
      src/modules/wizard/e_wizard.h
  34. 9
      src/modules/wizard/page_010.c
  35. 15
      src/modules/wizard/page_020.c
  36. 204
      src/modules/wizard/page_030.c
  37. 104
      src/modules/wizard/page_040.c
  38. 173
      src/modules/wizard/page_050.c
  39. 46
      src/modules/wizard/page_060.c
  40. 266
      src/modules/wizard/page_070.c
  41. 147
      src/modules/wizard/page_080.c
  42. 130
      src/modules/wizard/page_090.c
  43. 104
      src/modules/wizard/page_100.c
  44. 163
      src/modules/wizard/page_110.c
  45. 87
      src/modules/wizard/page_120.c
  46. 55
      src/modules/wizard/page_130.c
  47. 56
      src/modules/wizard/page_140.c
  48. 203
      src/modules/wizard/page_150.c
  49. 67
      src/modules/wizard/page_160.c
  50. 39
      src/modules/wizard/page_200.c

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -1,5 +1,5 @@
[Desktop Entry]
Type=Link
Name=Computer
Name=Computer (Standard Enlightenment)
Icon=icon.png
Comment=Configuration for devices with keyboards and mice<br>like your average PC Desktop, Laptop or Netbook.
Comment=Configuration for devices with keyboards and mice<br>like your average PC Desktop, Laptop or Netbook<br>with Enlightenment's traditional keyboard bindings<br>and mouse controls.

@ -875,7 +875,6 @@ data/images/Makefile
data/input_methods/Makefile
data/themes/Makefile
data/themes/images/Makefile
data/other/Makefile
data/xsession/Makefile
data/xsession/enlightenment.desktop
data/tools/Makefile

@ -2,7 +2,6 @@ MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = \
images \
themes \
other \
tools \
xsession \
input_methods \

@ -1,9 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
filesdir = $(datadir)/enlightenment/data/other
files_DATA = \
desktop_files.tar.gz \
desktop_order.tar.gz \
efm_favorites.tar.gz \
icon_example.tar.gz
EXTRA_DIST = $(files_DATA)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -26,7 +26,9 @@ module_la_SOURCES = e_mod_main.c \
e_mod_comp.c \
e_mod_comp.h \
e_mod_comp_update.c \
e_mod_comp_update.h
e_mod_comp_update.h \
e_mod_comp_cfdata.c \
e_mod_comp_cfdata.h
module_la_LIBADD = @e_libs@ @dlopen_libs@
module_la_LDFLAGS = -module -avoid-version

@ -0,0 +1,171 @@
#include "e.h"
#include "e_mod_comp_cfdata.h"
EAPI void
e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
{
*match_edd = E_CONFIG_DD_NEW("Comp_Match", Match);
#undef T
#undef D
#define T Match
#define D *match_edd
E_CONFIG_VAL(D, T, title, STR);
E_CONFIG_VAL(D, T, name, STR);
E_CONFIG_VAL(D, T, clas, STR);
E_CONFIG_VAL(D, T, role, STR);
E_CONFIG_VAL(D, T, primary_type, INT);
E_CONFIG_VAL(D, T, borderless, CHAR);
E_CONFIG_VAL(D, T, dialog, CHAR);
E_CONFIG_VAL(D, T, accepts_focus, CHAR);
E_CONFIG_VAL(D, T, vkbd, CHAR);
E_CONFIG_VAL(D, T, quickpanel, CHAR);
E_CONFIG_VAL(D, T, argb, CHAR);
E_CONFIG_VAL(D, T, fullscreen, CHAR);
E_CONFIG_VAL(D, T, modal, CHAR);
E_CONFIG_VAL(D, T, shadow_style, STR);
*conf_edd = E_CONFIG_DD_NEW("Comp_Config", Config);
#undef T
#undef D
#define T Config
#define D *conf_edd
E_CONFIG_VAL(D, T, shadow_file, STR);
E_CONFIG_VAL(D, T, shadow_style, STR);
E_CONFIG_VAL(D, T, engine, INT);
E_CONFIG_VAL(D, T, max_unmapped_pixels, INT);
E_CONFIG_VAL(D, T, max_unmapped_time, INT);
E_CONFIG_VAL(D, T, min_unmapped_time, INT);
E_CONFIG_VAL(D, T, fps_average_range, INT);
E_CONFIG_VAL(D, T, fps_corner, UCHAR);
E_CONFIG_VAL(D, T, fps_show, UCHAR);
E_CONFIG_VAL(D, T, use_shadow, UCHAR);
E_CONFIG_VAL(D, T, indirect, UCHAR);
E_CONFIG_VAL(D, T, texture_from_pixmap, UCHAR);
E_CONFIG_VAL(D, T, lock_fps, UCHAR);
E_CONFIG_VAL(D, T, efl_sync, UCHAR);
E_CONFIG_VAL(D, T, loose_sync, UCHAR);
E_CONFIG_VAL(D, T, grab, UCHAR);
E_CONFIG_VAL(D, T, vsync, UCHAR);
E_CONFIG_VAL(D, T, keep_unmapped, UCHAR);
E_CONFIG_VAL(D, T, send_flush, UCHAR);
E_CONFIG_VAL(D, T, send_dump, UCHAR);
E_CONFIG_VAL(D, T, nocomp_fs, UCHAR);
E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
E_CONFIG_LIST(D, T, match.popups, *match_edd);
E_CONFIG_LIST(D, T, match.borders, *match_edd);
E_CONFIG_LIST(D, T, match.overrides, *match_edd);
E_CONFIG_LIST(D, T, match.menus, *match_edd);
}
EAPI Config *
e_mod_comp_cfdata_config_new(void)
{
Config *cfg;
Match *mat;
cfg = E_NEW(Config, 1);
cfg->shadow_file = NULL;
cfg->shadow_style = eina_stringshare_add("default");
cfg->engine = E_EVAS_ENGINE_SOFTWARE_X11;
cfg->max_unmapped_pixels = 32 * 1024; // implement
cfg->max_unmapped_time = 10 * 3600; // implement
cfg->min_unmapped_time = 5 * 60; // implement
cfg->fps_average_range = 30;
cfg->fps_corner = 0;
cfg->fps_show = 0;
cfg->use_shadow = 1;
cfg->indirect = 0;
cfg->texture_from_pixmap = 1;
cfg->lock_fps = 1;
cfg->efl_sync = 1;
cfg->loose_sync = 1;
cfg->grab = 0;
cfg->vsync = 1;
cfg->keep_unmapped = 1;
cfg->send_flush = 1; // implement
cfg->send_dump = 1; // implement
cfg->nocomp_fs = 1; // buggy
cfg->smooth_windows = 0; // 1 if gl, 0 if not
cfg->first_draw_delay = 0.15;
cfg->match.popups = NULL;
mat = E_NEW(Match, 1);
cfg->match.popups = eina_list_append(cfg->match.popups, mat);
mat->name = eina_stringshare_add("shelf");
mat->shadow_style = eina_stringshare_add("popup");
mat = E_NEW(Match, 1);
cfg->match.popups = eina_list_append(cfg->match.popups, mat);
mat->shadow_style = eina_stringshare_add("popup");
cfg->match.borders = NULL;
cfg->match.overrides = NULL;
mat = E_NEW(Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->name = eina_stringshare_add("E");
mat->clas = eina_stringshare_add("Background_Window");
mat->shadow_style = eina_stringshare_add("none");
mat = E_NEW(Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->name = eina_stringshare_add("E");
mat->clas = eina_stringshare_add("everything");
mat->shadow_style = eina_stringshare_add("everything");
mat = E_NEW(Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_POPUP_MENU;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_COMBO;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_TOOLTIP;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
mat->shadow_style = eina_stringshare_add("popup");
cfg->match.menus = NULL;
mat = E_NEW(Match, 1);
cfg->match.menus = eina_list_append(cfg->match.menus, mat);
mat->shadow_style = eina_stringshare_add("menu");
return cfg;
}
static void
_match_list_free(Eina_List *list)
{
Match *m;
EINA_LIST_FREE(list, m)
{
if (m->title) eina_stringshare_del(m->title);
if (m->name) eina_stringshare_del(m->name);
if (m->clas) eina_stringshare_del(m->clas);
if (m->role) eina_stringshare_del(m->role);
if (m->shadow_style) eina_stringshare_del(m->shadow_style);
free(m);
}
}
EAPI void
e_mod_cfdata_config_free(Config *cfg)
{
if (cfg->shadow_file) eina_stringshare_del(cfg->shadow_file);
if (cfg->shadow_style) eina_stringshare_del(cfg->shadow_style);
_match_list_free(cfg->match.popups);
_match_list_free(cfg->match.borders);
_match_list_free(cfg->match.overrides);
_match_list_free(cfg->match.menus);
free(cfg);
}

@ -0,0 +1,66 @@
#ifndef E_MOD_COMP_CFDATA_H
#define E_MOD_COMP_CFDATA_H
typedef struct _Config Config;
typedef struct _Match Match;
struct _Config
{
const char *shadow_file;
const char *shadow_style;
int engine;
int max_unmapped_pixels;
int max_unmapped_time;
int min_unmapped_time;
int fps_average_range;
unsigned char fps_corner;
unsigned char fps_show;
unsigned char use_shadow;
unsigned char indirect;
unsigned char texture_from_pixmap;
unsigned char lock_fps;
unsigned char loose_sync;
unsigned char efl_sync;
unsigned char grab;
unsigned char vsync;
unsigned char keep_unmapped;
unsigned char send_flush;
unsigned char send_dump;
unsigned char nocomp_fs;
unsigned char smooth_windows;
double first_draw_delay;
struct
{
Eina_List *popups; // used for e popups
Eina_List *borders; // used for borders
Eina_List *overrides; // used for client menus, tooltips etc.
Eina_List *menus; // used for e menus
} match;
};
struct _Match
{
const char *title; // glob - used for borders, NULL if not to be used
const char *name; // glob - used for borders, overrides, popups, NULL if not to be used
const char *clas; // glob - used for borders, overrides, NULL if not to be used
const char *role; // glob - used for borders
const char *shadow_style; // shadow style to use
int primary_type; // Ecore_X_Window_Type - used for borders, overrides, first one found - ECORE_X_WINDOW_TYPE_UNKNOWN if not to be used
char borderless; // used for borders, 0 == dont use, 1 == borderless, -1 == not borderless
char dialog; // used for borders, 0 == don't use, 1 == dialog, -1 == not dialog
char accepts_focus; // used for borders, 0 == don't use, 1 == accepts focus, -1 == does not accept focus
char vkbd; // used for borders, 0 == don't use, 1 == is vkbd, -1 == not vkbd
char quickpanel; // used for borders, 0 == don't use, 1 == is quickpanel, -1 == not quickpanel
char argb; // used for borders, overrides, popups, menus, 0 == don't use, 1 == is argb, -1 == not argb
char fullscreen; // used for borders, 0 == don't use, 1 == is fullscreen, -1 == not fullscreen
char modal; // used for borders, 0 == don't use, 1 == is modal, -1 == not modal
};
EAPI void e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd);
EAPI Config *e_mod_comp_cfdata_config_new(void);
EAPI void e_mod_cfdata_config_free(Config *cfg);
#endif

@ -43,58 +43,9 @@ e_modapi_init(E_Module *m)
e_configure_registry_item_add("appearance/comp", 120, _("Composite"), NULL,
buf, e_int_config_comp_module);
mod->conf_match_edd = E_CONFIG_DD_NEW("Comp_Match", Match);
#undef T
#undef D
#define T Match
#define D mod->conf_match_edd
E_CONFIG_VAL(D, T, title, STR);
E_CONFIG_VAL(D, T, name, STR);
E_CONFIG_VAL(D, T, clas, STR);
E_CONFIG_VAL(D, T, role, STR);
E_CONFIG_VAL(D, T, primary_type, INT);
E_CONFIG_VAL(D, T, borderless, CHAR);
E_CONFIG_VAL(D, T, dialog, CHAR);
E_CONFIG_VAL(D, T, accepts_focus, CHAR);
E_CONFIG_VAL(D, T, vkbd, CHAR);
E_CONFIG_VAL(D, T, quickpanel, CHAR);
E_CONFIG_VAL(D, T, argb, CHAR);
E_CONFIG_VAL(D, T, fullscreen, CHAR);
E_CONFIG_VAL(D, T, modal, CHAR);
E_CONFIG_VAL(D, T, shadow_style, STR);
mod->conf_edd = E_CONFIG_DD_NEW("Comp_Config", Config);
#undef T
#undef D
#define T Config
#define D mod->conf_edd
E_CONFIG_VAL(D, T, shadow_file, STR);
E_CONFIG_VAL(D, T, shadow_style, STR);
E_CONFIG_VAL(D, T, engine, INT);
E_CONFIG_VAL(D, T, max_unmapped_pixels, INT);
E_CONFIG_VAL(D, T, max_unmapped_time, INT);
E_CONFIG_VAL(D, T, min_unmapped_time, INT);
E_CONFIG_VAL(D, T, fps_average_range, INT);
E_CONFIG_VAL(D, T, fps_corner, UCHAR);
E_CONFIG_VAL(D, T, fps_show, UCHAR);
E_CONFIG_VAL(D, T, use_shadow, UCHAR);
E_CONFIG_VAL(D, T, indirect, UCHAR);
E_CONFIG_VAL(D, T, texture_from_pixmap, UCHAR);
E_CONFIG_VAL(D, T, lock_fps, UCHAR);
E_CONFIG_VAL(D, T, efl_sync, UCHAR);
E_CONFIG_VAL(D, T, loose_sync, UCHAR);
E_CONFIG_VAL(D, T, grab, UCHAR);
E_CONFIG_VAL(D, T, vsync, UCHAR);
E_CONFIG_VAL(D, T, keep_unmapped, UCHAR);
E_CONFIG_VAL(D, T, send_flush, UCHAR);
E_CONFIG_VAL(D, T, send_dump, UCHAR);
E_CONFIG_VAL(D, T, nocomp_fs, UCHAR);
E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
E_CONFIG_LIST(D, T, match.popups, mod->conf_match_edd);
E_CONFIG_LIST(D, T, match.borders, mod->conf_match_edd);
E_CONFIG_LIST(D, T, match.overrides, mod->conf_match_edd);
E_CONFIG_LIST(D, T, match.menus, mod->conf_match_edd);
e_mod_comp_cfdata_edd_init(&(mod->conf_edd),
&(mod->conf_match_edd));
mod->conf = e_config_domain_load("module.comp", mod->conf_edd);
if (!mod->conf) _e_mod_config_new(m);
@ -118,7 +69,7 @@ e_modapi_init(E_Module *m)
/* XXX: update old configs. add config versioning */
if (mod->conf->first_draw_delay == 0)
mod->conf->first_draw_delay = 0.05;
mod->conf->first_draw_delay = 0.20;
_comp_mod = mod;
@ -136,95 +87,8 @@ void
_e_mod_config_new(E_Module *m)
{
Mod *mod = m->data;
Match *mat;
mod->conf = E_NEW(Config, 1);
mod->conf->shadow_file = NULL;
mod->conf->shadow_style = eina_stringshare_add("default");
mod->conf->engine = E_EVAS_ENGINE_SOFTWARE_X11;
mod->conf->max_unmapped_pixels = 32 * 1024; // implement
mod->conf->max_unmapped_time = 10 * 3600; // implement
mod->conf->min_unmapped_time = 5 * 60; // implement
mod->conf->fps_average_range = 30;
mod->conf->fps_corner = 0;
mod->conf->fps_show = 0;
mod->conf->use_shadow = 1;
mod->conf->indirect = 0;
mod->conf->texture_from_pixmap = 0;
mod->conf->lock_fps = 0;
mod->conf->efl_sync = 1;
mod->conf->loose_sync = 1;
mod->conf->grab = 0;
mod->conf->vsync = 1;
mod->conf->keep_unmapped = 1;
mod->conf->send_flush = 1; // implement
mod->conf->send_dump = 0; // implement
mod->conf->nocomp_fs = 0; // buggy
mod->conf->smooth_windows = 0;
mod->conf->first_draw_delay = 0.05;
mod->conf->match.popups = NULL;
mat = E_NEW(Match, 1);
mod->conf->match.popups = eina_list_append(mod->conf->match.popups, mat);
mat->name = eina_stringshare_add("shelf");
mat->shadow_style = eina_stringshare_add("still");
mat = E_NEW(Match, 1);
mod->conf->match.popups = eina_list_append(mod->conf->match.popups, mat);
mat->shadow_style = eina_stringshare_add("popup");
mod->conf->match.borders = NULL;
mod->conf->match.overrides = NULL;
mat = E_NEW(Match, 1);
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
mat->name = eina_stringshare_add("E");
mat->clas = eina_stringshare_add("Background_Window");
mat->shadow_style = eina_stringshare_add("none");
mat = E_NEW(Match, 1);
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
mat->name = eina_stringshare_add("E");
mat->clas = eina_stringshare_add("everything");
mat->shadow_style = eina_stringshare_add("everything");
mat = E_NEW(Match, 1);
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_POPUP_MENU;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_COMBO;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
mat->primary_type = ECORE_X_WINDOW_TYPE_TOOLTIP;
mat->shadow_style = eina_stringshare_add("menu");
mat = E_NEW(Match, 1);
mod->conf->match.overrides = eina_list_append(mod->conf->match.overrides, mat);
mat->shadow_style = eina_stringshare_add("popup");
mod->conf->match.menus = NULL;
mat = E_NEW(Match, 1);
mod->conf->match.menus = eina_list_append(mod->conf->match.menus, mat);
mat->shadow_style = eina_stringshare_add("menu");
}
static void
_match_list_free(Eina_List *list)
{
Match *m;
EINA_LIST_FREE(list, m)
{
if (m->title) eina_stringshare_del(m->title);
if (m->name) eina_stringshare_del(m->name);
if (m->clas) eina_stringshare_del(m->clas);
if (m->role) eina_stringshare_del(m->role);
if (m->shadow_style) eina_stringshare_del(m->shadow_style);
free(m);
}
mod->conf = e_mod_comp_cfdata_config_new();
}
void
@ -232,15 +96,7 @@ _e_mod_config_free(E_Module *m)
{
Mod *mod = m->data;
if (mod->conf->shadow_file) eina_stringshare_del(mod->conf->shadow_file);
if (mod->conf->shadow_style) eina_stringshare_del(mod->conf->shadow_style);
_match_list_free(mod->conf->match.popups);
_match_list_free(mod->conf->match.borders);
_match_list_free(mod->conf->match.overrides);
_match_list_free(mod->conf->match.menus);
free(mod->conf);
e_mod_cfdata_config_free(mod->conf);
mod->conf = NULL;
}

@ -1,45 +1,9 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
typedef struct _Config Config;
typedef struct _Mod Mod;
typedef struct _Match Match;
struct _Config
{
const char *shadow_file;
const char *shadow_style;
int engine;
int max_unmapped_pixels;
int max_unmapped_time;
int min_unmapped_time;
int fps_average_range;
unsigned char fps_corner;
unsigned char fps_show;
unsigned char use_shadow;
unsigned char indirect;
unsigned char texture_from_pixmap;
unsigned char lock_fps;
unsigned char loose_sync;
unsigned char efl_sync;
unsigned char grab;
unsigned char vsync;
unsigned char keep_unmapped;
unsigned char send_flush;
unsigned char send_dump;
unsigned char nocomp_fs;
unsigned char smooth_windows;
double first_draw_delay;
#include "e_mod_comp_cfdata.h"
struct
{
Eina_List *popups; // used for e popups
Eina_List *borders; // used for borders
Eina_List *overrides; // used for client menus, tooltips etc.
Eina_List *menus; // used for e menus
} match;
};
typedef struct _Mod Mod;
struct _Mod
{
@ -52,26 +16,6 @@ struct _Mod
E_Config_Dialog *config_dialog;
};
struct _Match
{
const char *title; // glob - used for borders, NULL if not to be used
const char *name; // glob - used for borders, overrides, popups, NULL if not to be used
const char *clas; // glob - used for borders, overrides, NULL if not to be used
const char *role; // glob - used for borders
const char *shadow_style; // shadow style to use
int primary_type; // Ecore_X_Window_Type - used for borders, overrides, first one found - ECORE_X_WINDOW_TYPE_UNKNOWN if not to be used
char borderless; // used for borders, 0 == dont use, 1 == borderless, -1 == not borderless
char dialog; // used for borders, 0 == don't use, 1 == dialog, -1 == not dialog
char accepts_focus; // used for borders, 0 == don't use, 1 == accepts focus, -1 == does not accept focus
char vkbd; // used for borders, 0 == don't use, 1 == is vkbd, -1 == not vkbd
char quickpanel; // used for borders, 0 == don't use, 1 == is quickpanel, -1 == not quickpanel
char argb; // used for borders, overrides, popups, menus, 0 == don't use, 1 == is argb, -1 == not argb
char fullscreen; // used for borders, 0 == don't use, 1 == is fullscreen, -1 == not fullscreen
char modal; // used for borders, 0 == don't use, 1 == is modal, -1 == not modal
};
extern Mod *_comp_mod;
EAPI extern E_Module_Api e_modapi;

@ -3,11 +3,35 @@ MODULE = wizard
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
data/def-ibar.txt
desksdir = $(libdir)/enlightenment/modules/$(MODULE)/extra_desktops
desks_DATA = \
data/extra_desktops/mplayer.desktop \
data/extra_desktops/xterm.desktop
favsdir = $(libdir)/enlightenment/modules/$(MODULE)/favorites
favs_DATA = \
data/favorites/.order \
data/favorites/desktop.desktop \
data/favorites/home.desktop \
data/favorites/root.desktop \
data/favorites/tmp.desktop
desktopdir = $(libdir)/enlightenment/modules/$(MODULE)/desktop
desktop_DATA = \
data/desktop/home.desktop \
data/desktop/root.desktop \
data/desktop/tmp.desktop
### dont install these - this way e wont list the module for people to
# accidentally load
#files_DATA = \
# e-module-$(MODULE).edj
# module.desktop
EXTRA_DIST = $(files_DATA) page_040.c page_050.c page_060.c
EXTRA_DIST = $(files_DATA) $(desks_DATA)
# the module .so file
INCLUDES = -I. \
@ -16,23 +40,30 @@ INCLUDES = -I. \
-I$(top_srcdir)/src/bin \
-I$(top_builddir)/src/bin \
-I$(top_srcdir)/src/modules \
@e_cflags@
@ECONNMAN_CFLAGS@ \
@e_cflags@ \
-I$(top_srcdir)/src/modules/comp
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la \
page_000.la \
page_010.la \
page_020.la \
page_030.la \
page_040.la \
page_050.la \
page_060.la \
page_070.la \
page_080.la \
page_090.la \
page_100.la \
page_110.la \
page_120.la \
page_130.la \
page_140.la \
page_150.la \
page_160.la \
page_200.la
### disabled because profile selector really does the job. code here just for
### informational purposes on how to make wizard pages
# page_040.la
# page_050.la
# page_060.la
module_la_SOURCES = e_mod_main.c \
e_mod_main.h \
e_wizard.c \
@ -42,7 +73,7 @@ module_la_LIBADD = @e_libs@ @dlopen_libs@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h
#Splash screen
#Auto - Splash screen
page_000_la_SOURCES = page_000.c
page_000_la_LIBADD = @e_libs@ @dlopen_libs@
page_000_la_LDFLAGS = -module -avoid-version
@ -60,39 +91,91 @@ page_020_la_LIBADD = @e_libs@ @dlopen_libs@
page_020_la_LDFLAGS = -module -avoid-version
page_020_la_DEPENDENCIES = $(top_builddir)/config.h
#Choose Menus
#Auto - set up menu
page_030_la_SOURCES = page_030.c
page_030_la_LIBADD = @e_libs@ @dlopen_libs@
page_030_la_LDFLAGS = -module -avoid-version
page_030_la_DEPENDENCIES = $(top_builddir)/config.h
#page_040_la_SOURCES = page_040.c
#page_040_la_LIBADD = @e_libs@ @dlopen_libs@
#page_040_la_LDFLAGS = -module -avoid-version
#page_040_la_DEPENDENCIES = $(top_builddir)/config.h
#page_050_la_SOURCES = page_050.c
#page_050_la_LIBADD = @e_libs@ @dlopen_libs@
#page_050_la_LDFLAGS = -module -avoid-version
#page_050_la_DEPENDENCIES = $(top_builddir)/config.h
#page_060_la_SOURCES = page_060.c
#page_060_la_LIBADD = @e_libs@ @dlopen_libs@
#page_060_la_LDFLAGS = -module -avoid-version
#page_060_la_DEPENDENCIES = $(top_builddir)/config.h
#Choose appliactions
#Auto - add new app icons
page_040_la_SOURCES = page_040.c
page_040_la_LIBADD = @e_libs@ @dlopen_libs@
page_040_la_LDFLAGS = -module -avoid-version
page_040_la_DEPENDENCIES = $(top_builddir)/config.h
#Request what scaling to use
page_050_la_SOURCES = page_050.c
page_050_la_LIBADD = @e_libs@ @dlopen_libs@
page_050_la_LDFLAGS = -module -avoid-version
page_050_la_DEPENDENCIES = $(top_builddir)/config.h
#Request which focus style to use
page_060_la_SOURCES = page_060.c
page_060_la_LIBADD = @e_libs@ @dlopen_libs@
page_060_la_LDFLAGS = -module -avoid-version
page_060_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - Figure out icon theme to use
page_070_la_SOURCES = page_070.c
page_070_la_LIBADD = @e_libs@ @dlopen_libs@
page_070_la_LDFLAGS = -module -avoid-version
page_070_la_DEPENDENCIES = $(top_builddir)/config.h
#Choose quick launch
#Auto - fill ibar
page_080_la_SOURCES = page_080.c
page_080_la_LIBADD = @e_libs@ @dlopen_libs@
page_080_la_LDFLAGS = -module -avoid-version
page_080_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - do we need battery?
page_090_la_SOURCES = page_090.c
page_090_la_LIBADD = @e_libs@ @dlopen_libs@
page_090_la_LDFLAGS = -module -avoid-version
page_090_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - do we need cpufreq?
page_100_la_SOURCES = page_100.c
page_100_la_LIBADD = @e_libs@ @dlopen_libs@
page_100_la_LDFLAGS = -module -avoid-version
page_100_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto+feedback - do we need connman?
page_110_la_SOURCES = page_110.c
page_110_la_LIBADD = @e_libs@ @dlopen_libs@ @ECONNMAN_LIBS@
page_110_la_LDFLAGS = -module -avoid-version
page_110_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - do we need temperature?
page_120_la_SOURCES = page_120.c
page_120_la_LIBADD = @e_libs@ @dlopen_libs@
page_120_la_LDFLAGS = -module -avoid-version
page_120_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - do we need backlight?
page_130_la_SOURCES = page_130.c
page_130_la_LIBADD = @e_libs@ @dlopen_libs@
page_130_la_LDFLAGS = -module -avoid-version
page_130_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - do we need temperature?
page_140_la_SOURCES = page_140.c
page_140_la_LIBADD = @e_libs@ @dlopen_libs@
page_140_la_LDFLAGS = -module -avoid-version
page_140_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - do we need temperature?
page_150_la_SOURCES = page_150.c $(top_srcdir)/src/modules/comp/e_mod_comp_cfdata.c
page_150_la_LIBADD = @e_libs@ @dlopen_libs@
page_150_la_LDFLAGS = -module -avoid-version
page_150_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - install favorites and ~/Desktop and entries
page_160_la_SOURCES = page_160.c
page_160_la_LIBADD = @e_libs@ @dlopen_libs@
page_160_la_LDFLAGS = -module -avoid-version
page_160_la_DEPENDENCIES = $(top_builddir)/config.h
#Auto - finish up applying
page_200_la_SOURCES = page_200.c
page_200_la_LIBADD = @e_libs@ @dlopen_libs@
page_200_la_LDFLAGS = -module -avoid-version

@ -0,0 +1,12 @@
# list of desktop files to put in ibar by default minus the .desktop extension
# each line is 1 entry in ibar and it is a list of desktop files to
# look for in order of preference - first found is put in to ibar
xterm rxvt urxvt gnome-terminal konsole xfce4-terminal exo-terminal-emulator lxde-x-terminal-emulator lxterminal mlterm roxterm Terminal terminator vala-terminal
sylpheed claws-mail thunderbird evolution KMail
firefox iceweasel chromium-browser eve epiphany midori konqueror opera rekonq dooble
xchat pidgin konversation kvirc loqui lostirc quassel qutim
enjoy banshee rhythmbox amarok listen audacious xmms2
gimp
inkscape
libreoffice-startcenter openoffice.org-startcenter koffice

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=Home
Comment=The Directory containing all your personal files
Comment[it]=La directory contenente i vostri file personali
Comment[fr]=Le dossier contenant vos fichiers personnels
Type=Link
X-Enlightenment-Type=Mount
URL=file:$HOME
Icon=user-home
NotShowIn=GNOME;KDE;LXDE;ROX;XFCE;

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=Root
Comment=The Root Filesystem base
Comment[it]=Il filesystem principale
Comment[fr]=Le systรจme de fichiers ร  la base
Type=Link
X-Enlightenment-Type=Mount
URL=file:/
Icon=computer
NotShowIn=GNOME;KDE;LXDE;ROX;XFCE;

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=Temp
Comment=Temporary files
Comment[it]=File temporanei
Comment[fr]=Les fichiers temporaires
Type=Link
X-Enlightenment-Type=Mount
URL=file:/tmp
Icon=user-temp
NotShowIn=GNOME;KDE;LXDE;ROX;XFCE;

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=MPlayer
GenericName=Movie Player
Comment=Watch movies and videos
Exec=mplayer %U
Icon=video_player.png
StartupWMClass=MPlayer
Categories=Application;AudioVideo;Player;
MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/smil;application/smil+xml;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flac;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktime-media-link;application/x-quicktimeplayer;application/x-shorten;application/x-smil;application/xspf+xml;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-scpls;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/google-video-pointer;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;x-content/video-dvd;x-content/video-vcd;x-content/video-svcd;

@ -0,0 +1,10 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=XTerm
GenericName=Terminal
Comment=Run commands in a shell
Exec=xterm
Icon=xterm.png
StartupWMClass=XTerm
Categories=Utility;TerminalEmulator;

@ -0,0 +1,4 @@
home.desktop
desktop.desktop
root.desktop
tmp.desktop

@ -0,0 +1,12 @@
[Desktop Entry]
Encoding=UTF-8
Name=Desktop
Name[fr]=Bureau
Comment=Files on your Desktop
Comment[it]=I file sul vostro desktop
Comment[fr]=Les fichiers sur votre bureau
Type=Link
X-Enlightenment-Type=Mount
URL=file:$HOME/Desktop
Icon=user-desktop
NotShowIn=GNOME;KDE;LXDE;ROX;XFCE;

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=Home
Comment=The Directory containing all your personal files
Comment[it]=La directory contenente i vostri file personali
Comment[fr]=Le dossier contenant vos fichiers personnels
Type=Link
X-Enlightenment-Type=Mount
URL=file:$HOME
Icon=user-home
NotShowIn=GNOME;KDE;LXDE;ROX;XFCE;

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=Root
Comment=The Root Filesystem base
Comment[it]=Il filesystem principale
Comment[fr]=Le systรจme de fichiers ร  la base
Type=Link
X-Enlightenment-Type=Mount
URL=file:/
Icon=computer
NotShowIn=GNOME;KDE;LXDE;ROX;XFCE;

@ -0,0 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Name=Temp
Comment=Temporary files
Comment[it]=File temporanei
Comment[fr]=Les fichiers temporaires
Type=Link
X-Enlightenment-Type=Mount
URL=file:/tmp
Icon=user-temp
NotShowIn=GNOME;KDE;LXDE;ROX;XFCE;

@ -2,7 +2,7 @@
#include "e_mod_main.h"
/* actual module specifics */
static E_Module *conf_module = NULL;
E_Module *wiz_module = NULL;
/*
* These are the currently planned wizard pages:
@ -50,33 +50,36 @@ e_modapi_init(E_Module *m)
char buf[PATH_MAX];
char *file;
conf_module = m;
wiz_module = m;
e_wizard_init();
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);
EINA_LIST_FREE(files, file)
{
if (!strncmp(file, "page_", 5))
{
void *handle;
snprintf(buf, sizeof(buf), "%s/%s/%s",
e_module_dir_get(m), MODULE_ARCH, file);
handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
if (handle)
{
e_wizard_page_add(handle,
dlsym(handle, "wizard_page_init"),
dlsym(handle, "wizard_page_shutdown"),
dlsym(handle, "wizard_page_show"),
dlsym(handle, "wizard_page_hide"),
dlsym(handle, "wizard_page_apply"));
}
else
printf("%s\n", dlerror());
}
{
if (!strncmp(file, "page_", 5))
{
void *handle;
snprintf(buf, sizeof(buf), "%s/%s/%s",
e_module_dir_get(m), MODULE_ARCH, file);
handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL);
if (handle)
e_wizard_page_add(handle,
dlsym(handle, "wizard_page_init"),
dlsym(handle, "wizard_page_shutdown"),
dlsym(handle, "wizard_page_show"),
dlsym(handle, "wizard_page_hide"),
dlsym(handle, "wizard_page_apply"));
else
{
// if its an executable...
// XXX
// else...
printf("%s\n", dlerror());
}
}
free(file);
}
e_wizard_go();
@ -88,7 +91,7 @@ EAPI int
e_modapi_shutdown(E_Module *m __UNUSED__)
{
e_wizard_shutdown();
conf_module = NULL;
wiz_module = NULL;
// FIXME: wrong place
// e_module_disable(m); /* disable - on restart this won't be loaded now */
// e_sys_action_do(E_SYS_RESTART, NULL); /* restart e - cleanly try settings */

@ -14,4 +14,6 @@ EAPI void *e_modapi_init (E_Module *m);
EAPI int e_modapi_shutdown (E_Module *m);
EAPI int e_modapi_save (E_Module *m);
extern E_Module *wiz_module;
#endif

@ -194,7 +194,10 @@ e_wizard_page_add(void *handle,
EAPI void
e_wizard_page_del(E_Wizard_Page *pg)
{
if (pg->handle) dlclose(pg->handle);
// rare thing.. if we do e_wizard_next() from a page and we end up finishing
// 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);
pages = eina_list_remove(pages, pg);
free(pg);
}
@ -218,6 +221,12 @@ e_wizard_labels_update(void)
edje_object_part_text_set(o_bg, "e.text.label", _("Next"));
}
EAPI const char *
e_wizard_dir_get(void)
{
return e_module_dir_get(wiz_module);
}
static void
_e_wizard_next_eval(void)
{

@ -24,18 +24,18 @@ EAPI void e_wizard_go(void);
EAPI void e_wizard_apply(void);
EAPI void e_wizard_next(void);
EAPI void e_wizard_page_show(Evas_Object *obj);
EAPI E_Wizard_Page *
e_wizard_page_add(void *handle,
int (*init) (E_Wizard_Page *pg),
int (*shutdown) (E_Wizard_Page *pg),
int (*show) (E_Wizard_Page *pg),
int (*hide) (E_Wizard_Page *pg),
int (*apply) (E_Wizard_Page *pg)
);
EAPI E_Wizard_Page *e_wizard_page_add(void *handle,
int (*init) (E_Wizard_Page *pg),
int (*shutdown) (E_Wizard_Page *pg),
int (*show) (E_Wizard_Page *pg),
int (*hide) (E_Wizard_Page *pg),
int (*apply) (E_Wizard_Page *pg)
);
EAPI void e_wizard_page_del(E_Wizard_Page *pg);
EAPI void e_wizard_button_next_enable_set(int enable);
EAPI void e_wizard_title_set(const char *title);
EAPI void e_wizard_labels_update(void);
EAPI const char *e_wizard_dir_get(void);
#endif
#endif

@ -131,9 +131,10 @@ wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
EAPI int
wizard_page_show(E_Wizard_Page *pg)
{
Evas_Object *o, *of, *ob;
Evas_Object *o, *of, *ob, *ic;
Eina_List *l;
int i, sel = -1;
char buf[PATH_MAX];
o = e_widget_list_add(pg->evas, 1, 0);
e_wizard_title_set(_("Language"));
@ -143,13 +144,13 @@ wizard_page_show(E_Wizard_Page *pg)
e_widget_ilist_freeze(ob);
e_widget_ilist_append(ob, NULL, _("System Default"),
e_prefix_data_snprintf(buf, sizeof(buf), "data/images/%s", "lang-system.png");
ic = e_util_icon_add(buf, pg->evas);
e_widget_ilist_append(ob, ic, _("System Default"),
NULL, NULL, NULL);
for (i = 1, l = blang_list; l; l = l->next, i++)
{
E_Intl_Pair *pair;
Evas_Object *ic;
char buf[PATH_MAX];
pair = l->data;
e_prefix_data_snprintf(buf, sizeof(buf), "data/images/%s", pair->locale_icon);

@ -92,6 +92,7 @@ wizard_page_show(E_Wizard_Page *pg)
free(prof);
continue;
}
if (!strcmp(prof, "standard")) sel = i;
snprintf(buf, sizeof(buf), "%s/profile.desktop", dir);
desk = efreet_desktop_new(buf);
label = prof;
@ -135,24 +136,20 @@ wizard_page_show(E_Wizard_Page *pg)
EAPI int
wizard_page_hide(E_Wizard_Page *pg)
{
char buf[PATH_MAX];
evas_object_del(pg->data);
// actually apply profile
if (e_config_profile_get())
{
char buf[PATH_MAX];
if (e_user_dir_snprintf(buf, sizeof(buf), "config/%s",
e_config_profile_get()) >= sizeof(buf))
return 1;
ecore_file_recursive_rm(buf);
}
if (!profile) profile = "standard";
e_config_profile_set(profile);
e_config_profile_del(e_config_profile_get());
e_config_load();
e_config_save();
return 1;
}
EAPI int
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
{
// no need. done in page_070's wizard_page_show()
return 1;
}

@ -1,224 +1,38 @@
/* Menu chooser */
/* Menu setup */
#include "e.h"
#include "e_mod_main.h"
static const char *xdg_sel = NULL;
static Eina_List *menus = NULL;
static void
check_menu_dir(const char *dir)
{
char buf[PATH_MAX], *file;
Eina_List *files;
snprintf(buf, sizeof(buf), "%s/menus", dir);
files = ecore_file_ls(buf);
EINA_LIST_FREE(files, file)
{
if (e_util_glob_match(file, "*.menu"))
{
snprintf(buf, sizeof(buf), "%s/menus/%s", dir, file);
menus = eina_list_append(menus, strdup(buf));
}
free(file);
}
}
EAPI int
wizard_page_init(E_Wizard_Page *pg __UNUSED__)
{
char buf[PATH_MAX];
const char *dirs[] =
{
"/etc/xdg",
"/usr/etc/xdg",
"/usr/local/etc/xdg",
"/usr/opt/etc/xdg",
"/usr/opt/xdg",
"/usr/local/opt/etc/xdg",
"/usr/local/opt/xdg",
"/opt/etc/xdg",
"/opt/xdg",
// FIXME: add more "known locations"
NULL
};
int i, newdir;
e_user_homedir_concat(buf, sizeof(buf), ".config");
check_menu_dir(buf);
for (i = 0; dirs[i]; i++) check_menu_dir(dirs[i]);
newdir = 1;
snprintf(buf, sizeof(buf), "%s/etc/xdg", e_prefix_get());
for (i = 0; dirs[i]; i++)
{
if (!strcmp(dirs[i], buf))
{
newdir = 0;
break;
}
}
if (newdir) check_menu_dir(buf);
return 1;
}
EAPI int
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
{
// FIXME: free menus
return 1;
}
EAPI int
wizard_page_show(E_Wizard_Page *pg)
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
{
Evas_Object *o, *of, *ob;
char *file;
int sel = -1, i = 0;
o = e_widget_list_add(pg->evas, 1, 0);
e_wizard_title_set(_("Menus"));
if (!menus)
{
of = e_widget_framelist_add(pg->evas, _("Error"), 0);
ob = e_widget_textblock_add(pg->evas);
e_widget_size_min_set(ob, 140 * e_scale, 140 * e_scale);
e_widget_textblock_markup_set
(ob,
_("No menu files were<br>"
"found on your system.<br>"
"Please see the<br>"
"documentation on<br>"
"www.enlightenment.org<br>"
"for more details on<br>"
"how to get your<br>"
"application menus<br>"
"working."));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
evas_object_show(ob);
evas_object_show(of);
}
else
{
of = e_widget_framelist_add(pg->evas, _("Select application menu"), 0);
ob = e_widget_ilist_add(pg->evas, 32 * e_scale, 32 * e_scale, &xdg_sel);
e_widget_size_min_set(ob, 140 * e_scale, 140 * e_scale);
e_widget_ilist_freeze(ob);
EINA_LIST_FREE(menus, file)
{
char buf[PATH_MAX], buf2[PATH_MAX], *p, *p2, *tlabel, *tdesc;
const char *label;
label = file;
tlabel = NULL;
tdesc = NULL;
e_user_homedir_concat(buf, sizeof(buf),
".config/menus/applications.menu");
snprintf(buf2, sizeof(buf2),
"%s/etc/xdg/menus/enlightenment.menu",
e_prefix_get());
if (!strcmp("/etc/xdg/menus/applications.menu", file))
{
label = _("System Default");
sel = i;
}
else if (!strcmp(buf2, file))
{
label = _("Enlightenment Default");
sel = i;
}
else if (!strcmp(buf, file))
{
label = _("Personal Default");
}
else
{
p = strrchr(file, '/');
if (p)
{
p++;
p2 = strchr(p, '-');
if (!