Enlightenment CVS committal Author : davemds Project : e17 Module : libs/etk
Dir : e17/libs/etk/src/lib Modified Files: etk_iconbox.c Log Message: Add the ability to load icon images from eet files example: etk_iconbox_append(iconbox, "eet_file_name", "eet_key", "label"); =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_iconbox.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- etk_iconbox.c 30 Sep 2007 02:22:55 -0000 1.33 +++ etk_iconbox.c 23 Jun 2008 00:45:52 -0000 1.34 @@ -1405,11 +1405,20 @@ { //if (!(icon_object->image = etk_cache_edje_object_find(evas, icon->filename, icon->edje_group))) { - icon_object->image = edje_object_add(evas); - edje_object_file_set(icon_object->image, icon->filename, icon->edje_group); + if (edje_file_group_exists(icon->filename, icon->edje_group)) + { + icon_object->image = edje_object_add(evas); + edje_object_file_set(icon_object->image, icon->filename, icon->edje_group); + icon_object->use_edje = ETK_TRUE; + edje_object_size_min_get(icon_object->image, &icon_w, &icon_h); + } + else + { + icon_object->image = evas_object_image_add(evas); + evas_object_image_file_set(icon_object->image, icon->filename, icon->edje_group); + icon_object->use_edje = ETK_FALSE; + } } - edje_object_size_min_get(icon_object->image, &icon_w, &icon_h); - icon_object->use_edje = ETK_TRUE; } if (icon_w <= 0 || icon_h <= 0) { @@ -1451,7 +1460,7 @@ evas_object_move(icon_object->image, icon_geometry.x, icon_geometry.y); evas_object_resize(icon_object->image, icon_geometry.w, icon_geometry.h); - if (!icon->edje_group) + if (!icon_object->use_edje) evas_object_image_fill_set(icon_object->image, 0, 0, icon_geometry.w, icon_geometry.h); evas_object_show(icon_object->image); } ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs