set efm icon thumb failure when icon generates at 0x0

This commit is contained in:
Mike Blumenkrantz 2013-06-11 09:25:13 +01:00
parent 5e7fe56024
commit b781e4caa4
1 changed files with 22 additions and 20 deletions

View File

@ -7741,6 +7741,7 @@ _e_fm2_cb_icon_thumb_dnd_gen(void *data, Evas_Object *obj, void *event_info __UN
o = data; o = data;
e_icon_size_get(obj, &w, &h); e_icon_size_get(obj, &w, &h);
if (w + h == 0) return;
have_alpha = e_icon_alpha_get(obj); have_alpha = e_icon_alpha_get(obj);
// if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST) // 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)) if (e_icon_file_get(obj, &file, NULL))
{ {
Evas_Coord w = 0, h = 0; int w = 0, h = 0;
int have_alpha;
if (!ic->realized) if (!ic->realized)
return; return;
e_icon_size_get(obj, &w, &h); e_icon_size_get(obj, &w, &h);
have_alpha = e_icon_alpha_get(obj); if (w && h)
// if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST) {
{ Eina_Bool have_alpha;
edje_extern_object_aspect_set(obj, have_alpha = e_icon_alpha_get(obj);
EDJE_ASPECT_CONTROL_BOTH, w, h); // if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST)
} {
edje_object_part_swallow(ic->obj, "e.swallow.icon", obj); edje_extern_object_aspect_set(obj,
if (have_alpha) EDJE_ASPECT_CONTROL_BOTH, w, h);
edje_object_signal_emit(ic->obj, "e,action,thumb,gen,alpha", "e"); }
else edje_object_part_swallow(ic->obj, "e.swallow.icon", obj);
edje_object_signal_emit(ic->obj, "e,action,thumb,gen", "e"); 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) if (ic->realized)
_e_fm2_icon_icon_set(ic); _e_fm2_icon_icon_set(ic);
}
} }
static void static void