discomfitor pushed a commit to branch master.
commit b781e4caa45af9a3c8ecb5ca8f35d2226d45c6a4
Author: Mike Blumenkrantz <[email protected]>
Date: Tue Jun 11 09:25:13 2013 +0100
set efm icon thumb failure when icon generates at 0x0
---
src/bin/e_fm.c | 42 ++++++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 2be5402..03318a6 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -7741,6 +7741,7 @@ _e_fm2_cb_icon_thumb_dnd_gen(void *data, Evas_Object
*obj, void *event_info __UN
o = data;
e_icon_size_get(obj, &w, &h);
+ if (w + h == 0) return;
have_alpha = e_icon_alpha_get(obj);
// if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST)
{
@@ -7763,33 +7764,34 @@ _e_fm2_cb_icon_thumb_gen(void *data, Evas_Object *obj,
void *event_info __UNUSED
if (e_icon_file_get(obj, &file, NULL))
{
- Evas_Coord w = 0, h = 0;
- int have_alpha;
+ int w = 0, h = 0;
if (!ic->realized)
return;
e_icon_size_get(obj, &w, &h);
- have_alpha = e_icon_alpha_get(obj);
-// if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST)
- {
- edje_extern_object_aspect_set(obj,
- EDJE_ASPECT_CONTROL_BOTH, w, h);
- }
- edje_object_part_swallow(ic->obj, "e.swallow.icon", obj);
- if (have_alpha)
- edje_object_signal_emit(ic->obj, "e,action,thumb,gen,alpha", "e");
- else
- edje_object_signal_emit(ic->obj, "e,action,thumb,gen", "e");
+ if (w && h)
+ {
+ Eina_Bool have_alpha;
+ have_alpha = e_icon_alpha_get(obj);
+ // if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST)
+ {
+ edje_extern_object_aspect_set(obj,
+ EDJE_ASPECT_CONTROL_BOTH, w, h);
+ }
+ edje_object_part_swallow(ic->obj, "e.swallow.icon", obj);
+ if (have_alpha)
+ edje_object_signal_emit(ic->obj, "e,action,thumb,gen,alpha",
"e");
+ else
+ edje_object_signal_emit(ic->obj, "e,action,thumb,gen", "e");
+ return;
+ }
}
- else
- {
- ic->thumb_failed = EINA_TRUE;
- evas_object_del(obj);
+ ic->thumb_failed = EINA_TRUE;
+ evas_object_del(obj);
- if (ic->realized)
- _e_fm2_icon_icon_set(ic);
- }
+ if (ic->realized)
+ _e_fm2_icon_icon_set(ic);
}
static void
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev