Fix ticket #569: Setting the same icon file twice for elm_icon would

make the object disappear.



SVN revision: 51865
This commit is contained in:
Christopher Michael 2010-09-03 17:15:38 +00:00
parent 7de3bcd295
commit c9f2ef3ef0
1 changed files with 14 additions and 12 deletions

View File

@ -56,6 +56,7 @@ _els_smart_icon_file_key_set(Evas_Object *obj, const char *file, const char *key
evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
evas_object_image_file_set(sd->obj, file, key);
sd->preloading = 1;
sd->show = 1;
evas_object_image_preload(sd->obj, EINA_FALSE);
evas_object_hide(sd->obj);
if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
@ -97,6 +98,7 @@ Evas_Object *
_els_smart_icon_object_get(Evas_Object *obj)
{
Smart_Data *sd;
sd = evas_object_smart_data_get(obj);
if (!sd) return NULL;
return sd->obj;
@ -273,7 +275,6 @@ _els_smart_icon_orient_set(Evas_Object *obj, Elm_Image_Orient orient)
static void
_smart_reconfigure(Smart_Data *sd)
{
int iw, ih;
Evas_Coord x, y, w, h;
if (!sd->obj) return;
@ -288,8 +289,8 @@ _smart_reconfigure(Smart_Data *sd)
}
else
{
iw = 0;
ih = 0;
int iw = 0, ih = 0;
evas_object_image_size_get(sd->obj, &iw, &ih);
iw = ((double)iw) * sd->scale;
@ -402,7 +403,8 @@ _smart_add(Evas_Object *obj)
sd->scale = 1.0;
evas_object_smart_member_add(sd->obj, obj);
evas_object_smart_data_set(obj, sd);
evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED, _preloaded, sd);
evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED,
_preloaded, sd);
}
static void