only try to get resolution for thumbnails if the file is actually a loadable image

ticket #1582


SVN revision: 77301
This commit is contained in:
Mike Blumenkrantz 2012-10-02 10:57:12 +00:00
parent 744ec42648
commit 6cd52da692
1 changed files with 7 additions and 4 deletions

View File

@ -61,10 +61,13 @@ _e_wid_fprev_preview_update(void *data, Evas_Object *obj, void *event_info __UNU
int iw = 0, ih = 0;
wd = data;
o = evas_object_image_add(evas_object_evas_get(obj));
evas_object_image_file_set(o, wd->path, NULL);
evas_object_image_size_get(o, &iw, &ih);
evas_object_del(o);
if (evas_object_image_extension_can_load_get(wd->path))
{
o = evas_object_image_add(evas_object_evas_get(obj));
evas_object_image_file_set(o, wd->path, NULL);
evas_object_image_size_get(o, &iw, &ih);
evas_object_del(o);
}
if ((iw > 0) && (ih > 0))
{
e_widget_label_text_set(wd->o_preview_extra, _("Resolution:"));