Enlightenment CVS committal Author : onefang Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_apps.c e_main.c e_menu.c Log Message: More icon tweaking. I have started to simplify and rationalise this as it was starting to get silly. Searching the icon class in the wm theme first, then searching fdo icon themes sometimes ends up with a less specific icon. Menus make life tricky, as things are deferred there, but not enough to avoid delays. Lots more tweaking to come, but this commit should result in more icons on menus. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v retrieving revision 1.162 retrieving revision 1.163 diff -u -3 -r1.162 -r1.163 --- e_apps.c 1 Sep 2006 15:06:30 -0000 1.162 +++ e_apps.c 2 Sep 2006 04:20:10 -0000 1.163 @@ -1170,15 +1170,6 @@ if (desktop->startup) a->startup_notify = *(desktop->startup); - if ((desktop->icon) && (!desktop->icon_path)) - { - /* FIXME: Should do this only when needed, is it can be expensive. */ - /* FIXME: Use a real icon size. */ - v = (char *) ecore_desktop_icon_find(desktop->icon, NULL, e_config->icon_theme); - if (v) - a->icon_path = evas_stringshare_add(v); - } - // if (desktop->type) a->type = evas_stringshare_add(desktop->type); // if (desktop->categories) a->categories = evas_stringshare_add(desktop->categories); } @@ -1557,7 +1548,17 @@ { ; /* It's a bit more obvious this way. */ } - else if (a->icon_path) /* If that fails, then this might be an FDO icon. */ + else if (a->icon_class) /* If that fails, then this might be an FDO icon. */ + { + char *v; + + /* FIXME: Use a real icon size. */ + v = (char *) ecore_desktop_icon_find(a->icon_class, NULL, e_config->icon_theme); + if (v) + a->icon_path = evas_stringshare_add(v); + } + + if (a->icon_path) { /* Free the aborted object first. */ if (o) evas_object_del(o); @@ -1565,33 +1566,39 @@ e_icon_file_set(o, a->icon_path); e_icon_fill_inside_set(o, 1); } - /* FIXME: if we still haven't found an icon, feed icon_class into the FDO lookup process. */ } + return o; } /* Search order? - - * + * * fixed path to icon - * an .edje icon in ~/.e/e/icons + * an .edj icon in ~/.e/e/icons * icon_class in theme * icon from a->path in theme - * FDO search * FDO search for icon_class */ EAPI void e_app_icon_add_to_menu_item(E_Menu_Item *mi, E_App *a) { - if (!e_util_menu_item_edje_icon_list_set(mi, a->icon_class)) + if ((!a->icon_path) && (a->icon_class)) { - /* e_menu_item_icon_edje_set() just tucks away the params, the actual call to edje_object_file_set() happens later. */ - /* e_menu_item_icon_file_set() just tucks away the params, the actual call to e_icon_add() happens later. */ - e_menu_item_icon_edje_set(mi, a->path, "icon"); - if (a->icon_path) /* If that fails, then this might be an FDO icon. */ - e_menu_item_icon_file_set(mi, a->icon_path); - /* FIXME: if we still haven't found an icon, feed icon_class into the FDO lookup process. */ + char *v; + + /* FIXME: Use a real icon size. */ + v = (char *) ecore_desktop_icon_find(a->icon_class, NULL, e_config->icon_theme); + if (v) + a->icon_path = evas_stringshare_add(v); } + + e_util_menu_item_edje_icon_list_set(mi, a->icon_class); + /* e_menu_item_icon_edje_set() just tucks away the params, the actual call to edje_object_file_set() happens later. */ + /* e_menu_item_icon_file_set() just tucks away the params, the actual call to e_icon_add() happens later. */ + e_menu_item_icon_edje_set(mi, a->path, "icon"); + if (a->icon_path) + e_menu_item_icon_file_set(mi, a->icon_path); return; } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_main.c,v retrieving revision 1.181 retrieving revision 1.182 diff -u -3 -r1.181 -r1.182 --- e_main.c 30 Aug 2006 18:20:50 -0000 1.181 +++ e_main.c 2 Sep 2006 04:20:10 -0000 1.182 @@ -887,6 +887,12 @@ { e_fdo_menu_to_order(); } + /* FIXME: Add another temporary hack to keep the users happy. + * Move ~/.e/e/applications/all/*.eap to ~/.e/e/icons/*.edje + * Read the non .edje info from them and construct a matching ~/.e/e/applications/all/*.desktop + * Add an icon path to these .desktop files that points to the ~/.e/e/icons/*.edje files. + * Add ~/.e/e/icons/ to the top of the icon search path. + */ /* FIXME: THIS is to get people started - shoudl be in a wizard */ snprintf(buf, sizeof(buf), "%s/.e/e/fileman/favorites", homedir); if (!ecore_file_exists(buf)) =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_menu.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -3 -r1.64 -r1.65 --- e_menu.c 1 Sep 2006 09:01:52 -0000 1.64 +++ e_menu.c 2 Sep 2006 04:20:10 -0000 1.65 @@ -1208,7 +1208,7 @@ if (mi->icon) { /* This is done this way to match up with how e_app_icon_add does it. */ - mi->icon_object = NULL; /* Just coz I'm paranoid, may not be needed. */ +// mi->icon_object = NULL; /* Just coz I'm paranoid, may not be needed. */ if (mi->icon_key) { Evas_Coord iww, ihh; ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs