icons are now part of the theme and themable from the theme (always


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 18 years ago
parent 4ef7d70c26
commit 29ebbfd6d5
  1. 2
      TODO
  2. 2
      configure.in
  3. 2
      data/Makefile.am
  4. 3
      data/icons/.cvsignore
  5. 24
      data/icons/Makefile.am
  6. 396
      data/icons/default.edc
  7. 2
      data/icons/images/.cvsignore
  8. 17
      data/icons/images/Makefile.am
  9. BIN
      data/icons/images/run.png
  10. BIN
      data/icons/images/theme_0.png
  11. BIN
      data/icons/images/theme_glow_0.png
  12. 3
      data/themes/Makefile.am
  13. 1
      data/themes/default.edc
  14. 17
      data/themes/images/Makefile.am
  15. BIN
      data/themes/images/e17_icon_configuration.png
  16. 0
      data/themes/images/e17_icon_desktop.png
  17. 0
      data/themes/images/e17_icon_e_0.png
  18. 0
      data/themes/images/e17_icon_e_glow_0.png
  19. 0
      data/themes/images/e17_icon_favorites.png
  20. 0
      data/themes/images/e17_icon_gadget.png
  21. 0
      data/themes/images/e17_icon_module.png
  22. 0
      data/themes/images/e17_icon_power_button_0.png
  23. 0
      data/themes/images/e17_icon_power_button_glow_0.png
  24. 0
      data/themes/images/e17_icon_reset_button_0.png
  25. 0
      data/themes/images/e17_icon_reset_button_glow_0.png
  26. BIN
      data/themes/images/e17_icon_run.png
  27. BIN
      data/themes/images/e17_icon_theme_0.png
  28. BIN
      data/themes/images/e17_icon_theme_glow_0.png
  29. 0
      data/themes/images/e17_icon_windows.png
  30. 51
      src/bin/e_apps.c
  31. 3
      src/bin/e_apps.h
  32. 3
      src/bin/e_border.c
  33. 2
      src/bin/e_dnd.c
  34. 61
      src/bin/e_eapp_main.c
  35. 2
      src/bin/e_hints.c
  36. 49
      src/bin/e_int_menus.c
  37. 1
      src/bin/e_theme.c
  38. 27
      src/bin/e_utils.c
  39. 2
      src/bin/e_utils.h

@ -167,8 +167,6 @@ Some of the things (in very short form) that need to be done to E17...
locale+encoding)
* add input method selector stuff to eapp - same as locale
* "run command" typebuffer thing
* icons should be able to be overidden from the theme (eapp and menu stuff
etc.)
* setup configs for gnome and kde (as options) if they are installed (eg
run gnome-settings-daemon).
* check evas has eet support early on.

@ -258,8 +258,6 @@ data/init/Makefile
data/init/images/Makefile
data/themes/Makefile
data/themes/images/Makefile
data/icons/Makefile
data/icons/images/Makefile
data/other/Makefile
data/xsession/Makefile
data/xsession/enlightenment.desktop

@ -1,3 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = fonts images init themes icons other xsession
SUBDIRS = fonts images init themes other xsession

@ -1,3 +0,0 @@
Makefile.in
Makefile
default.edj

@ -1,24 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = images
EDJE_CC = @edje_cc@
EDJE_FLAGS = \
-v \
-id $(top_srcdir)/data/icons/images \
-fd $(top_srcdir)/data/fonts \
@EDJE_DEF@
filesdir = $(datadir)/enlightenment/data/icons
files_DATA = \
default.edj
EXTRA_DIST = default.edc
default.edj: Makefile default.edc
$(EDJE_CC) $(EDJE_FLAGS) \
$(top_srcdir)/data/icons/default.edc \
$(top_builddir)/data/icons/default.edj
clean-local:
rm -f *.edj

@ -1,396 +0,0 @@
images {
image: "e_0.png" LOSSY 90;
image: "e_glow_0.png" LOSSY 90;
image: "power_button_0.png" LOSSY 90;
image: "power_button_glow_0.png" LOSSY 90;
image: "reset_button_0.png" LOSSY 90;
image: "reset_button_glow_0.png" LOSSY 90;
image: "theme_0.png" LOSSY 90;
image: "theme_glow_0.png" LOSSY 90;
image: "windows.png" LOSSY 90;
image: "module.png" LOSSY 90;
image: "favorites.png" LOSSY 90;
image: "desktop.png" LOSSY 90;
image: "gadget.png" LOSSY 90;
image: "configuration.png" LOSSY 90;
image: "run.png" LOSSY 90;
}
collections {
group {
name: "e";
max: 64 64;
parts {
part {
name: "e";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "e_0.png";
}
}
}
part {
name: "e_glow";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
rel1 {
to: "e";
}
rel2 {
to: "e";
}
color: 255 255 255 0;
image {
normal: "e_glow_0.png";
}
}
description {
state: "hilited" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
}
programs {
program {
name: "e_in";
signal: "active";
source: "";
action: STATE_SET "hilited" 0.0;
transition: LINEAR 0.5;
target: "e_glow";
}
program {
name: "e_out";
signal: "passive";
source: "";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.5;
target: "e_glow";
}
}
}
group {
name: "power";
max: 64 64;
parts {
part {
name: "power_button";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "power_button_0.png";
}
}
}
part {
name: "power_button_glow";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
rel1 {
to: "power_button";
}
rel2 {
to: "power_button";
}
color: 255 255 255 0;
image {
normal: "power_button_glow_0.png";
}
}
description {
state: "hilited" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
}
programs {
program {
name: "power_button_in";
signal: "active";
source: "";
action: STATE_SET "hilited" 0.0;
transition: LINEAR 0.5;
target: "power_button_glow";
}
program {
name: "power_button_out";
signal: "passive";
source: "";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.5;
target: "power_button_glow";
}
}
}
group {
name: "reset";
max: 64 64;
parts {
part {
name: "reset_button";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "reset_button_0.png";
}
}
}
part {
name: "reset_button_glow";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
rel1 {
to: "reset_button";
}
rel2 {
to: "reset_button";
}
color: 255 255 255 0;
image {
normal: "reset_button_glow_0.png";
}
}
description {
state: "hilited" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
}
programs {
program {
name: "reset_button_in";
signal: "active";
source: "";
action: STATE_SET "hilited" 0.0;
transition: LINEAR 0.5;
target: "reset_button_glow";
}
program {
name: "reset_button_out";
signal: "passive";
source: "";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.5;
target: "reset_button_glow";
}
}
}
group {
name: "theme";
max: 64 64;
parts {
part {
name: "theme_button";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "theme_0.png";
}
}
}
part {
name: "theme_button_glow";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
rel1 {
to: "theme_button";
}
rel2 {
to: "theme_button";
}
color: 255 255 255 0;
image {
normal: "theme_glow_0.png";
}
}
description {
state: "hilited" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
}
programs {
program {
name: "theme_button_in";
signal: "active";
source: "";
action: STATE_SET "hilited" 0.0;
transition: LINEAR 0.5;
target: "theme_button_glow";
}
program {
name: "theme_button_out";
signal: "passive";
source: "";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.5;
target: "theme_button_glow";
}
}
}
group {
name: "windows";
max: 64 64;
parts {
part {
name: "icon";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "windows.png";
}
}
}
}
}
group {
name: "module";
max: 64 64;
parts {
part {
name: "icon";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "module.png";
}
}
}
}
}
group {
name: "favorites";
max: 64 64;
parts {
part {
name: "icon";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "favorites.png";
}
}
}
}
}
group {
name: "desktops";
max: 64 64;
parts {
part {
name: "icon";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "desktop.png";
}
}
}
}
}
group {
name: "gadgets";
max: 64 64;
parts {
part {
name: "icon";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "gadget.png";
}
}
}
}
}
group {
name: "configuration";
max: 64 64;
parts {
part {
name: "icon";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "configuration.png";
}
}
}
}
}
group {
name: "run";
max: 64 64;
parts {
part {
name: "icon";
mouse_events: 0;
description {
state: "default" 0.0;
aspect: 1.0 1.0;
max: 64 64;
image {
normal: "run.png";
}
}
}
}
}
}

@ -1,2 +0,0 @@
Makefile.in
Makefile

@ -1,17 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = \
e_0.png \
e_glow_0.png \
power_button_0.png \
power_button_glow_0.png \
reset_button_0.png \
reset_button_glow_0.png \
theme_0.png \
theme_glow_0.png \
windows.png \
module.png \
favorites.png \
desktop.png \
gadget.png \
configuration.png \
run.png

Binary file not shown.

Binary file not shown.

@ -32,7 +32,8 @@ default_start.edc \
default_winlist.edc \
default_transitions.edc \
default_dialog.edc \
default_desktopname.edc
default_desktopname.edc \
default_icons.edc
default.edj: Makefile $(EXTRA_DIST)
$(EDJE_CC) $(EDJE_FLAGS) \

@ -41,5 +41,6 @@ collections {
#include "default_transitions.edc"
#include "default_dialog.edc"
#include "default_desktopname.edc"
#include "default_icons.edc"
}

@ -290,5 +290,20 @@ e17_cpufreq_cpu2.png \
e17_winlist_top.png \
e17_winlist_bottom.png \
e17_pager_window_shaded.png \
e17_transition_vswipe_gap.png
e17_transition_vswipe_gap.png \
e17_icon_configuration.png \
e17_icon_desktop.png \
e17_icon_e_0.png \
e17_icon_e_glow_0.png \
e17_icon_favorites.png \
e17_icon_gadget.png \
e17_icon_module.png \
e17_icon_power_button_0.png \
e17_icon_power_button_glow_0.png \
e17_icon_reset_button_0.png \
e17_icon_reset_button_glow_0.png \
e17_icon_run.png \
e17_icon_theme_0.png \
e17_icon_theme_glow_0.png \
e17_icon_windows.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -720,8 +720,7 @@ _e_app_free(E_App *a)
_e_apps = evas_hash_del(_e_apps, a->path, a);
_e_apps_list = evas_list_remove(_e_apps_list, a);
_e_app_fields_empty(a);
if (a->path)
free(a->path);
IF_FREE(a->path);
free(a);
}
}
@ -806,6 +805,15 @@ _e_app_fields_fill(E_App *a, const char *path)
a->exe = str;
free(v);
}
v = eet_read(ef, "app/icon/class", &size);
if (v)
{
str = malloc(size + 1);
memcpy(str, v, size);
str[size] = 0;
a->icon_class = str;
free(v);
}
v = eet_read(ef, "app/window/name", &size);
if (v)
{
@ -860,36 +868,15 @@ _e_app_fields_fill(E_App *a, const char *path)
static void
_e_app_fields_empty(E_App *a)
{
if (a->name)
{
free(a->name);
a->name = NULL;
}
if (a->generic)
{
free(a->generic);
a->generic = NULL;
}
if (a->comment)
{
free(a->comment);
a->comment = NULL;
}
if (a->exe)
{
free(a->exe);
a->exe = NULL;
}
if (a->win_name)
{
free(a->win_name);
a->win_name = NULL;
}
if (a->win_class)
{
free(a->win_class);
a->win_class = NULL;
}
IF_FREE(a->name);
IF_FREE(a->generic);
IF_FREE(a->comment);
IF_FREE(a->exe);
IF_FREE(a->icon_class);
IF_FREE(a->win_name);
IF_FREE(a->win_class);
IF_FREE(a->win_title);
IF_FREE(a->win_role);
}
static Ecore_List *

@ -33,12 +33,15 @@ struct _E_App
char *generic; /* generic app name */
char *comment; /* a longer description */
char *exe; /* command to execute, NULL if directory */
char *path; /* path to .eet containing icons etc. etc. */
char *win_name; /* window name */
char *win_class; /* window class */
char *win_title; /* window title */
char *win_role; /* window role */
char *icon_class; /* icon_class */
Evas_List *subapps; /* if this a directory, a list of more E_App's */

@ -1748,7 +1748,8 @@ e_border_icon_add(E_Border *bd, Evas *evas)
if (a)
{
o = edje_object_add(evas);
edje_object_file_set(o, a->path, "icon");
if (!e_util_edje_icon_set(o, a->icon_class))
edje_object_file_set(o, a->path, "icon");
}
}
else if (bd->client.netwm.icon.data)

@ -811,7 +811,7 @@ _e_dnd_cb_event_dnd_selection(void *data, int type, void *event)
int i, size;
data = ev->data;
text = data->data;
text = (char *)data->data;
size = MIN(data->length, PATH_MAX - 1);
/* A moz url _shall_ contain a space */
/* FIXME: The data is two-byte unicode. Somewhere it

@ -26,6 +26,7 @@ main(int argc, char **argv)
int del_win_class = 0;
int del_win_title = 0;
int del_win_role = 0;
int del_icon_class = 0;
int del_startup_notify = 0;
int del_wait_exit = 0;
char *file = NULL;
@ -37,6 +38,7 @@ main(int argc, char **argv)
char *set_win_class = NULL;
char *set_win_title = NULL;
char *set_win_role = NULL;
char *set_icon_class = NULL;
int set_startup_notify = -1;
int set_wait_exit = -1;
int get_name = 0;
@ -47,6 +49,7 @@ main(int argc, char **argv)
int get_win_class = 0;
int get_win_title = 0;
int get_win_role = 0;
int get_icon_class = 0;
int get_startup_notify = 0;
int get_wait_exit = 0;
@ -116,6 +119,13 @@ main(int argc, char **argv)
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-icon-class")) && (i < (argc - 1)))
{
i++;
set_icon_class = argv[i];
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-set-startup-notify")) && (i < (argc - 1)))
{
i++;
@ -140,6 +150,7 @@ main(int argc, char **argv)
del_win_class = 1;
del_win_title = 1;
del_win_role = 1;
del_icon_class = 1;
del_startup_notify = 1;
del_wait_exit = 1;
valid_args++;
@ -193,6 +204,12 @@ main(int argc, char **argv)
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-del-icon-class")))
{
del_icon_class = 1;
valid_args++;
write_ops++;
}
else if ((!strcmp(argv[i], "-del-startup-notify")))
{
del_startup_notify = 1;
@ -216,52 +233,57 @@ main(int argc, char **argv)
else if ((!strcmp(argv[i], "-get-name")))
{
get_name = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-generic")))
{
get_generic = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-comment")))
{
get_comment = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-exe")))
{
get_exe = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-win-name")))
{
get_win_name = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-win-class")))
{
get_win_class = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-win-title")))
{
get_win_title = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-win-role")))
{
get_win_role = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-icon-class")))
{
get_icon_class = 1;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-startup-notify")))
{
get_startup_notify = 1;
valid_args++;
valid_args++;
}
else if ((!strcmp(argv[i], "-get-wait-exit")))
{
get_wait_exit = 1;
valid_args++;
valid_args++;
}
else
file = argv[i];
@ -321,6 +343,8 @@ main(int argc, char **argv)
eet_write(ef, "app/window/title", set_win_title, strlen(set_win_title), 0);
if (set_win_role)
eet_write(ef, "app/window/role", set_win_role, strlen(set_win_role), 0);
if (set_icon_class)
eet_write(ef, "app/icon/class", set_icon_class, strlen(set_icon_class), 0);
if (set_startup_notify >= 0)
{
unsigned char tmp[1];
@ -387,6 +411,8 @@ main(int argc, char **argv)
eet_delete(ef, "app/window/title");
if (del_win_role)
eet_delete(ef, "app/window/role");
if (del_icon_class)
eet_delete(ef, "app/icon/class");
if (del_startup_notify)
eet_delete(ef, "app/info/startup_notify");
if (del_wait_exit)
@ -511,6 +537,18 @@ main(int argc, char **argv)
printf("%s\n", str);
}
}
if (get_icon_class)
{
v = eet_read(ef, "app/icon/class", &size);
if (v)
{
str = malloc(size + 1);
memcpy(str, v, size);
str[size] = 0;
free(v);
printf("%s\n", str);
}
}
if (get_startup_notify)
{
v = eet_read(ef, "app/info/startup_notify", &size);
@ -571,6 +609,7 @@ _e_help(void)
" -set-win-class WIN_CLASS Set the application window class glob\n"
" -set-win-title WIN_TITLE Set the application window title glob\n"
" -set-win-role WIN_ROLE Set the application window role glob\n"
" -set-icon-class CLASS_NAME Set the application icon class for themes\n"
" -set-startup-notify [1/0] Set the application startup notify flag\n"
" -set-wait-exit [1/0] Set the application wait exit flag\n"
" -get-name Get the application name\n"
@ -581,6 +620,7 @@ _e_help(void)
" -get-win-class Get the application window class glob\n"
" -get-win-title Get the application window title glob\n"
" -get-win-role Get the application window role glob\n"
" -get-icon-class Get the application icon class for themes\n"
" -get-startup-notify Get the application startup notify flag\n"
" -get-wait-exit Get the application wait exit flag\n"
" -del-name Delete the application name\n"
@ -591,6 +631,7 @@ _e_help(void)
" -del-win-class Delete the application window class\n"
" -del-win-title Delete the application window title glob\n"
" -del-win-role Delete the application window role glob\n"
" -del-icon-class Delete the application icon class for themes\n"
" -del-startup-notify Delete the application startup notify flag\n"
" -del-wait-exit Delete the application wait exit flag\n"
);

@ -921,7 +921,7 @@ int
e_hints_window_saved_size_get(E_Border *bd)
{
int ret;
int sizes[4];
unsigned int sizes[4];
memset(sizes, 0, sizeof(sizes));
ret = ecore_x_window_prop_card32_get(bd->client.win, E_ATOM_SAVED_SIZE,

@ -54,7 +54,6 @@ e_int_menus_main_new(void)
E_Menu *m, *subm;
E_Menu_Item *mi;
Main_Data *dat;
char *s;
dat = calloc(1, sizeof(Main_Data));
m = e_menu_new();
@ -66,9 +65,7 @@ e_int_menus_main_new(void)
dat->apps = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Favorite Applications"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "favorites");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/favorites");
e_menu_item_submenu_set(mi, subm);
mi = e_menu_item_new(m);
@ -78,54 +75,42 @@ e_int_menus_main_new(void)
dat->modules = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Modules"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "module");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/modules");
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_desktops_new();
dat->desktops = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Desktops"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "desktops");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/desktops");
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_clients_new();
dat->clients = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Windows"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "windows");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/windows");
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_lost_clients_new();
dat->lost_clients = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Lost Windows"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "lost_windows");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/lost_windows");
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_gadgets_new();
dat->gadgets = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Gadgets"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "gadgets");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/gadgets");
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_themes_new();
dat->themes = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Themes"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "theme");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/themes");
e_menu_item_submenu_set(mi, subm);
mi = e_menu_item_new(m);
@ -133,18 +118,14 @@ e_int_menus_main_new(void)
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("About Enlightenment"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "e");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/e");
e_menu_item_callback_set(mi, _e_int_menus_main_about, NULL);
if (ecore_file_app_installed("exige"))
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Run Command"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "run");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/run");
e_menu_item_callback_set(mi, _e_int_menus_main_run, NULL);
}
@ -152,9 +133,7 @@ e_int_menus_main_new(void)
dat->config = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Configuration"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "configuration");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/configuration");
e_menu_item_submenu_set(mi, subm);
mi = e_menu_item_new(m);
@ -162,16 +141,12 @@ e_int_menus_main_new(void)
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Restart Enlightenment"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "reset");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/reset");
e_menu_item_callback_set(mi, _e_int_menus_main_restart, NULL);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Exit Enlightenment"));
s = e_path_find(path_icons, "default.edj");
e_menu_item_icon_edje_set(mi, s, "power");
IF_FREE(s);
e_util_menu_item_edje_icon_set(mi, "enlightenment/exit");
e_menu_item_callback_set(mi, _e_int_menus_main_exit, NULL);
return m;
}

@ -54,6 +54,7 @@ e_theme_init(void)
* e_theme_file_set("base/theme/error", "default.edj");
* e_theme_file_set("base/theme/gadman", "default.edj");
* e_theme_file_set("base/theme/dnd", "default.edj");
* e_theme_file_set("base/theme/icons", "default.edj");
* e_theme_file_set("base/theme/modules", "default.edj");
* e_theme_file_set("base/theme/modules/pager", "default.edj");
* e_theme_file_set("base/theme/modules/ibar", "default.edj");

@ -255,3 +255,30 @@ e_util_immortal_check(void)
}
return 0;
}
int
e_util_edje_icon_set(Evas_Object *obj, char *name)
{
char *file;
char buf[4096];
if (!name) return 0;
snprintf(buf, sizeof(buf), "icons/%s", name);
file = (char *)e_theme_edje_file_get("base/theme/icons", buf);
if (!file[0]) return;
edje_object_file_set(obj, file, buf);
return 1;
}
void
e_util_menu_item_edje_icon_set(E_Menu_Item *mi, char *name)
{
char *file;
char buf[4096];
if (!name) return;
snprintf(buf, sizeof(buf), "icons/%s", name);
file = (char *)e_theme_edje_file_get("base/theme/icons", buf);
if (!file[0]) return;
e_menu_item_icon_edje_set(mi, file, buf);
}

@ -20,6 +20,8 @@ EAPI int e_util_head_exec(int head, char *cmd);
EAPI int e_util_strcmp(char *s1, char *s2);
EAPI int e_util_both_str_empty(char *s1, char *s2);
EAPI int e_util_immortal_check(void);
EAPI int e_util_edje_icon_set(Evas_Object *obj, char *name);
EAPI void e_util_menu_item_edje_icon_set(E_Menu_Item *mi, char *name);
#endif
#endif

Loading…
Cancel
Save