summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-10-22 22:14:40 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-10-22 22:14:40 +0530
commit55373e799a797ac48a94ff5ecf1e112924641eed (patch)
tree0cf86809398ce395c996145501d31346b5c249ca
parentb3cc2d73951831bfec3f5f7d30640db18ee70e66 (diff)
downloadelementary-55373e799a797ac48a94ff5ecf1e112924641eed.tar.gz
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
_elm_image_internal_sizing_eval(Evas_Object *obj, Elm_Image_Data *sd)
{
Evas_Coord x, y, w, h;
- const char *type;
if (!sd->img) return;
w = sd->img_w;
h = sd->img_h;
- type = evas_object_type_get(sd->img);
- if (!type) return;
-
- if (!strcmp(type, "edje"))
+ if (eo_isa(sd->img, EDJE_OBJECT_CLASS))
{
x = sd->img_x;
y = sd->img_y;
@@ -1268,15 +1264,11 @@ _elm_image_object_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int
{
int tw, th;
int cw = 0, ch = 0;
- const char *type;
if (w) *w = 0;
if (h) *h = 0;
- type = evas_object_type_get(sd->img);
- if (!type) return;
-
- if (!strcmp(type, "edje"))
+ if (eo_isa(sd->img, EDJE_OBJECT_CLASS))
edje_object_size_min_get(sd->img, &tw, &th);
else
evas_object_image_size_get(sd->img, &tw, &th);