summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-09-04 20:30:29 +0200
committerBoris Faure <billiob@gmail.com>2015-09-04 20:30:29 +0200
commit6f898d5ebe3c32797f77b85b4742996cc7e6922a (patch)
tree9c73229b67a24eb52c7d2a9f5ac21cd5f8c695c8
parent4c00bec4d6495b90a266a7786d5290d54294919a (diff)
fix typop no longer working for still images. Add some error messages
Thanks to dassify for noticing
-rw-r--r--src/bin/media.c33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/bin/media.c b/src/bin/media.c
index 7cb4d6c..da7d2c1 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -320,7 +320,7 @@ _type_img_anim_handle(Evas_Object *obj)
320 EINA_SAFETY_ON_NULL_RETURN_VAL(sd, -1); 320 EINA_SAFETY_ON_NULL_RETURN_VAL(sd, -1);
321 321
322 if (!evas_object_image_animated_get(sd->o_img)) 322 if (!evas_object_image_animated_get(sd->o_img))
323 return -1; 323 return 0;
324 324
325 sd->fr = 1; 325 sd->fr = 1;
326 sd->frnum = evas_object_image_animated_frame_count_get(sd->o_img); 326 sd->frnum = evas_object_image_animated_frame_count_get(sd->o_img);
@@ -1171,7 +1171,11 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
1171 1171
1172 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1172 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1173 e = evas_object_evas_get(parent); 1173 e = evas_object_evas_get(parent);
1174 if (!e) return NULL; 1174 if (!e)
1175 {
1176 ERR("can not get evas");
1177 return NULL;
1178 }
1175 1179
1176 if (!_smart) _smart_init(); 1180 if (!_smart) _smart_init();
1177 obj = evas_object_smart_add(e, _smart); 1181 obj = evas_object_smart_add(e, _smart);
@@ -1304,7 +1308,10 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
1304 { 1308 {
1305 // XXX: handle sd->url being true? 1309 // XXX: handle sd->url being true?
1306 if (_type_thumb_init(obj) < 0) 1310 if (_type_thumb_init(obj) < 0)
1307 goto err; 1311 {
1312 ERR("failed to init '%s'", src);
1313 goto err;
1314 }
1308 } 1315 }
1309 else 1316 else
1310 { 1317 {
@@ -1312,19 +1319,31 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
1312 { 1319 {
1313 case MEDIA_TYPE_IMG: 1320 case MEDIA_TYPE_IMG:
1314 if (!sd->url && (_type_img_init(obj) < 0)) 1321 if (!sd->url && (_type_img_init(obj) < 0))
1315 goto err; 1322 {
1323 ERR("failed to init '%s'", src);
1324 goto err;
1325 }
1316 break; 1326 break;
1317 case MEDIA_TYPE_SCALE: 1327 case MEDIA_TYPE_SCALE:
1318 if (!sd->url && (_type_scale_init(obj) < 0)) 1328 if (!sd->url && (_type_scale_init(obj) < 0))
1319 goto err; 1329 {
1330 ERR("failed to init '%s'", src);
1331 goto err;
1332 }
1320 break; 1333 break;
1321 case MEDIA_TYPE_EDJE: 1334 case MEDIA_TYPE_EDJE:
1322 if (!sd->url && (_type_edje_init(obj) < 0)) 1335 if (!sd->url && (_type_edje_init(obj) < 0))
1323 goto err; 1336 {
1337 ERR("failed to init '%s'", src);
1338 goto err;
1339 }
1324 break; 1340 break;
1325 case MEDIA_TYPE_MOV: 1341 case MEDIA_TYPE_MOV:
1326 if (!sd->url && (_type_mov_init(obj) < 0)) 1342 if (!sd->url && (_type_mov_init(obj) < 0))
1327 goto err; 1343 {
1344 ERR("failed to init '%s'", src);
1345 goto err;
1346 }
1328 break; 1347 break;
1329 default: 1348 default:
1330 break; 1349 break;