Enlightenment CVS committal Author : onefang Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_apps.c e_menu.c e_menu.h Log Message: Icons back in menus again. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v retrieving revision 1.165 retrieving revision 1.166 diff -u -3 -r1.165 -r1.166 --- e_apps.c 2 Sep 2006 13:29:59 -0000 1.165 +++ e_apps.c 3 Sep 2006 11:32:13 -0000 1.166 @@ -1609,8 +1609,7 @@ EAPI void e_app_icon_add_to_menu_item(E_Menu_Item *mi, E_App *a) { - if (a->icon_path) - e_menu_item_icon_file_set(mi, a->icon_path); + mi->app = a; if ((!a->icon_path) && (a->icon_class)) { char *v; @@ -1625,7 +1624,8 @@ /* 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"); - return; + if (a->icon_path) + e_menu_item_icon_file_set(mi, a->icon_path); } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_menu.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -3 -r1.65 -r1.66 --- e_menu.c 2 Sep 2006 04:20:10 -0000 1.65 +++ e_menu.c 3 Sep 2006 11:32:13 -0000 1.66 @@ -1205,10 +1205,19 @@ else evas_object_del(o); - if (mi->icon) + /* FIXME: Not sure why there are two different tries to get the icon size, surely only the last one si needed. */ + /* FIXME: Do it this way later, when e_app_icon_add() just registers a request for an icon to be filled in when it's ready. + if (mi->app) + { + o = e_app_icon_add(mi->menu->evas, mi->app); + mi->icon_object = o; + e_icon_size_get(mi->icon_object, &icon_w, &icon_h); + } + else + */ + 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. */ if (mi->icon_key) { Evas_Coord iww, ihh; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_menu.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- e_menu.h 1 Sep 2006 09:01:52 -0000 1.23 +++ e_menu.h 3 Sep 2006 11:32:13 -0000 1.24 @@ -100,6 +100,8 @@ Evas_Object *submenu_object; Evas_Object *event_object; + + E_App *app; /* For when this item is used for an app. Experimental, if this makes it into cvs, kill onefang. */ int label_w, label_h; int icon_w, icon_h; ------------------------------------------------------------------------- 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