From: Enlightenment C. <no...@cv...> - 2006-09-17 21:29:26
|
Enlightenment CVS committal Author : onefang Project : e17 Module : apps/e Dir : e17/apps/e/src/bin Modified Files: e_fm.c e_thumb_main.c e_widget_preview.c Log Message: .edj files can hold more than just backgrounds, and sometimes we want to browse them. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -3 -r1.62 -r1.63 --- e_fm.c 17 Sep 2006 00:13:52 -0000 1.62 +++ e_fm.c 17 Sep 2006 21:29:23 -0000 1.63 @@ -1665,7 +1665,15 @@ if (ic->sd->config->icon.key_hint) e_thumb_icon_file_set(ic->obj_icon, buf, ic->sd->config->icon.key_hint); else - e_thumb_icon_file_set(ic->obj_icon, buf, "e/desktop/background"); + { + /* FIXME: There is probably a quicker way of doing this. */ + if (edje_file_group_exists(buf, "icon")) + e_thumb_icon_file_set(ic->obj_icon, buf, "icon"); + else if (edje_file_group_exists(buf, "e/desktop/background")) + e_thumb_icon_file_set(ic->obj_icon, buf, "e/desktop/background"); + else if (edje_file_group_exists(buf, "e/init/splash")) + e_thumb_icon_file_set(ic->obj_icon, buf, "e/init/splash"); + } e_thumb_icon_size_set(ic->obj_icon, 128, 96); evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", _e_fm2_cb_icon_thumb_gen, ic); _e_fm2_icon_thumb(ic); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb_main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_thumb_main.c 3 Sep 2006 15:23:02 -0000 1.14 +++ e_thumb_main.c 17 Sep 2006 21:29:24 -0000 1.15 @@ -340,8 +340,8 @@ evas_object_image_fill_set(im, 0, 0, ww, hh); edje = edje_object_add(evas_im); if ((eth->key) && - ((!strcmp(eth->key, "e/desktop/background")) || - (!strcmp(eth->key, "e/init/splash")))) + ( (!strcmp(eth->key, "e/desktop/background")) || + (!strcmp(eth->key, "e/init/splash")) )) alpha = 0; if (edje_object_file_set(edje, eth->file, eth->key)) { =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_preview.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- e_widget_preview.c 26 Aug 2006 08:32:56 -0000 1.6 +++ e_widget_preview.c 17 Sep 2006 21:29:24 -0000 1.7 @@ -81,7 +81,15 @@ wd->img = e_thumb_icon_add(evas_object_evas_get(obj)); if (e_util_glob_case_match(file, "*.edj")) - e_thumb_icon_file_set(wd->img, file, "e/desktop/background"); + { + /* FIXME: There is probably a quicker way of doing this. */ + if (edje_file_group_exists(file, "icon")) + e_thumb_icon_file_set(wd->img, file, "icon"); + else if (edje_file_group_exists(file, "e/desktop/background")) + e_thumb_icon_file_set(wd->img, file, "e/desktop/background"); + else if (edje_file_group_exists(file, "e/init/splash")) + e_thumb_icon_file_set(wd->img, file, "e/init/splash"); + } else e_thumb_icon_file_set(wd->img, file, NULL); e_thumb_icon_size_set(wd->img, w, h); |