Enlightenment CVS committal Author : englebass Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_utils.h e_utils.c Log Message: =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- e_utils.h 29 Dec 2006 02:56:26 -0000 1.30 +++ e_utils.h 24 Mar 2007 09:25:32 -0000 1.31 @@ -49,6 +49,7 @@ EAPI char *e_util_file_time_get(time_t ftime); EAPI void e_util_library_path_strip(void); EAPI void e_util_library_path_restore(void); - +EAPI Evas_Object *e_util_icon_add(const char *path, Evas *evas); + #endif #endif =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -3 -r1.58 -r1.59 --- e_utils.c 10 Feb 2007 17:23:05 -0000 1.58 +++ e_utils.c 24 Mar 2007 09:25:32 -0000 1.59 @@ -821,6 +821,31 @@ E_FREE(prev_path); } +EAPI Evas_Object * +e_util_icon_add(const char *path, Evas *evas) +{ + Evas_Object *o = NULL; + const char *ext; + + if (!path) return NULL; + if (!ecore_file_exists(path)) return NULL; + + o = e_icon_add(evas); + ext = strrchr(path, '.'); + if (ext) + { + if (!strcmp(ext, ".edj")) + e_icon_file_edje_set(o, path, "icon"); + else + e_icon_file_set(o, path); + } + else + e_icon_file_set(o, path); + e_icon_fill_inside_set(o, 1); + + return o; +} + /* local subsystem functions */ static void _e_util_container_fake_mouse_up_cb(void *data) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs