SVN revision: 62478devs/princeamd/enlightenment-0.17-elive
parent
25c30ef7a7
commit
7c9f1888df
50 changed files with 4657 additions and 4313 deletions
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 3.0 KiB |
File diff suppressed because it is too large
Load Diff
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. |
||||
|
@ -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.
@ -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 |
@ -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; |
@ -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 (! |