int id;
const char *file;
const char *key;
+ Ethumb_Exists *exists;
} thumb;
Ecore_Event_Handler *eeh;
Elm_Thumb_Animation_Setting anim_setting;
if (wd->thumb.id >= 0)
ethumb_client_generate_cancel(_elm_ethumb_client, wd->thumb.id,
NULL, NULL, NULL);
+ if (wd->thumb.exists)
+ {
+ ethumb_client_thumb_exists_cancel(wd->thumb.exists);
+ wd->thumb.exists = NULL;
+ }
#endif
eina_stringshare_del(wd->file);
}
static void
-_thumb_apply(Widget_Data *wd)
+_thumb_exists(Ethumb_Client *client, Ethumb_Exists *thread,
+ Eina_Bool exists, void *data)
{
- if (wd->thumb.id > 0)
- {
- ethumb_client_generate_cancel
- (_elm_ethumb_client, wd->thumb.id, NULL, NULL, NULL);
- wd->thumb.id = -1;
- }
+ Widget_Data *wd = data;
- if (!wd->file) return;
+ if (ethumb_client_thumb_exists_check(thread))
+ return ;
- ethumb_client_file_set(_elm_ethumb_client, wd->file, wd->key);
- if (ethumb_client_thumb_exists(_elm_ethumb_client))
+ if (exists)
{
const char *thumb_path, *thumb_key;
edje_object_signal_emit(wd->frame, EDJE_SIGNAL_GENERATE_ERROR, "elm");
evas_object_smart_callback_call(wd->self, SIG_GENERATE_ERROR, NULL);
}
+
+}
+
+static void
+_thumb_apply(Widget_Data *wd)
+{
+ if (wd->thumb.id > 0)
+ {
+ ethumb_client_generate_cancel
+ (_elm_ethumb_client, wd->thumb.id, NULL, NULL, NULL);
+ wd->thumb.id = -1;
+ }
+
+ if (wd->thumb.exists)
+ {
+ ethumb_client_thumb_exists_cancel(wd->thumb.exists);
+ wd->thumb.exists = NULL;
+ }
+
+ if (!wd->file) return;
+
+ ethumb_client_file_set(_elm_ethumb_client, wd->file, wd->key);
+ ethumb_client_thumb_exists(_elm_ethumb_client, _thumb_exists, wd);
}
static Eina_Bool
evas_object_smart_callback_call(wd->self, SIG_GENERATE_STOP, NULL);
}
+ if (wd->thumb.exists)
+ {
+ ethumb_client_thumb_exists_cancel(wd->thumb.exists);
+ wd->thumb.exists = NULL;
+ }
+
if (wd->eeh)
{
ecore_event_handler_del(wd->eeh);
wd->key = NULL;
wd->eeh = NULL;
wd->thumb.id = -1;
+ wd->thumb.exists = NULL;
wd->on_hold = EINA_FALSE;
wd->is_video = EINA_FALSE;
wd->was_video = EINA_FALSE;