summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-10-22 22:14:40 +0530
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-12 10:15:03 +0100
commit98fbd41cc299438c4f5112ee56fc7aef1532d553 (patch)
tree0cf86809398ce395c996145501d31346b5c249ca
parent40b6c9c3073dbef9574021b9ce95c386911c5c52 (diff)
image: use eo_isa for checking object types instead of string comparison
-rw-r--r--src/lib/elm_image.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index c6d985036..f76eb9ac8 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -122,17 +122,13 @@ static void
122_elm_image_internal_sizing_eval(Evas_Object *obj, Elm_Image_Data *sd) 122_elm_image_internal_sizing_eval(Evas_Object *obj, Elm_Image_Data *sd)
123{ 123{
124 Evas_Coord x, y, w, h; 124 Evas_Coord x, y, w, h;
125 const char *type;
126 125
127 if (!sd->img) return; 126 if (!sd->img) return;
128 127
129 w = sd->img_w; 128 w = sd->img_w;
130 h = sd->img_h; 129 h = sd->img_h;
131 130
132 type = evas_object_type_get(sd->img); 131 if (eo_isa(sd->img, EDJE_OBJECT_CLASS))
133 if (!type) return;
134
135 if (!strcmp(type, "edje"))
136 { 132 {
137 x = sd->img_x; 133 x = sd->img_x;
138 y = sd->img_y; 134 y = sd->img_y;
@@ -1268,15 +1264,11 @@ _elm_image_object_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int
1268{ 1264{
1269 int tw, th; 1265 int tw, th;
1270 int cw = 0, ch = 0; 1266 int cw = 0, ch = 0;
1271 const char *type;
1272 1267
1273 if (w) *w = 0; 1268 if (w) *w = 0;
1274 if (h) *h = 0; 1269 if (h) *h = 0;
1275 1270
1276 type = evas_object_type_get(sd->img); 1271 if (eo_isa(sd->img, EDJE_OBJECT_CLASS))
1277 if (!type) return;
1278
1279 if (!strcmp(type, "edje"))
1280 edje_object_size_min_get(sd->img, &tw, &th); 1272 edje_object_size_min_get(sd->img, &tw, &th);
1281 else 1273 else
1282 evas_object_image_size_get(sd->img, &tw, &th); 1274 evas_object_image_size_get(sd->img, &tw, &th);