Enlightenment CVS committal
Author : rephorm
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_utils.c e_utils.h
Log Message:
add function to add an icon given an icon path or theme name
use this for desktop_icon_add()
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- e_utils.c 25 Mar 2007 19:05:05 -0000 1.63
+++ e_utils.c 28 Mar 2007 05:52:33 -0000 1.64
@@ -839,11 +839,19 @@
{
if ((!desktop) || (!desktop->icon)) return NULL;
- if (desktop->icon[0] == '/') return e_util_icon_add(desktop->icon, evas);
+ return e_util_icon_theme_icon_add(desktop->icon, size, evas);
+}
+
+EAPI Evas_Object *
+e_util_icon_theme_icon_add(const char *icon_name, const char *size, Evas *evas)
+{
+ if (!icon_name) return NULL;
+ if (icon_name[0] == '/') return e_util_icon_add(icon_name, evas);
else
{
const char *path;
- path = efreet_icon_path_find(e_config->icon_theme, desktop->icon, size);
+ path = efreet_icon_path_find(e_config->icon_theme, icon_name, size);
+ printf("path: %s\n", path);
if (path) return e_util_icon_add(path, evas);
}
return NULL;
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- e_utils.h 25 Mar 2007 19:05:05 -0000 1.34
+++ e_utils.h 28 Mar 2007 05:52:33 -0000 1.35
@@ -49,6 +49,7 @@
EAPI void e_util_library_path_restore(void);
EAPI Evas_Object *e_util_icon_add(const char *path, Evas *evas);
EAPI Evas_Object *e_util_desktop_icon_add(Efreet_Desktop *desktop, const char
*size, Evas *evas);
+EAPI Evas_Object * e_util_icon_theme_icon_add(const char *icon_name, const
char *size, Evas *evas);
EAPI void e_util_desktop_menu_item_icon_add(Efreet_Desktop *desktop,
const char *size, E_Menu_Item *mi);
#endif
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs