keep hotfix for efl < 1.13

This commit is contained in:
Boris Faure 2014-11-29 21:59:00 +01:00
parent 709f3172c6
commit cc87372941
1 changed files with 25 additions and 0 deletions

View File

@ -1257,7 +1257,25 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
}
#endif
#if (ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 13)
if (!sd->url)
{
Efreet_Uri *uri;
const char *file_path = eina_stringshare_printf("file://%s", sd->src);
uri = efreet_uri_decode(file_path);
eina_stringshare_del(file_path);
if (!uri)
{
ERR("can not decode '%s'", sd->src);
goto err;
}
sd->realf = uri->path;
eina_stringshare_ref(sd->realf);
efreet_uri_free(uri);
}
#else
if (!sd->url) sd->realf = eina_stringshare_add(sd->src);
#endif
if ((mode & MEDIA_SIZE_MASK) == MEDIA_THUMB)
{
@ -1297,6 +1315,13 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
_mouse_up_cb, obj);
return obj;
#if (ELM_VERSION_MAJOR == 1) && (ELM_VERSION_MINOR < 13)
err:
if (obj)
evas_object_del(obj);
return NULL;
#endif
}
void