seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=719867abbc9faac64ec450c457dbe983c62041ad

commit 719867abbc9faac64ec450c457dbe983c62041ad
Author: Daniel Juyung Seo <seojuyu...@gmail.com>
Date:   Tue Mar 10 22:52:29 2015 +0900

    elm: Use eo_isa() to check object types instead of manual string comparison.
---
 src/lib/elc_fileselector_button.c | 2 +-
 src/lib/elc_multibuttonentry.c    | 4 ++--
 src/lib/elm_cnp.c                 | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/elc_fileselector_button.c 
b/src/lib/elc_fileselector_button.c
index 985c430..daf1937 100644
--- a/src/lib/elc_fileselector_button.c
+++ b/src/lib/elc_fileselector_button.c
@@ -103,7 +103,7 @@ _new_window_add(Elm_Fileselector_Button_Data *sd)
 static Evas_Object *
 _parent_win_get(Evas_Object *obj)
 {
-   while ((obj) && (strcmp(evas_object_type_get(obj), "elm_win")))
+   while (eo_isa(obj, ELM_WIN_CLASS))
      obj = elm_object_parent_widget_get(obj);
 
    return obj;
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 91aad07..f1e5e63 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -1183,7 +1183,7 @@ _box_min_size_calculate(Evas_Object *box,
              l_next = eina_list_next(l);
              opt = eina_list_data_get(l_next);
              if (l_next && opt && opt->obj &&
-                 !strcmp(elm_widget_type_get(opt->obj), "elm_entry"))
+                 eo_isa(opt->obj, ELM_ENTRY_CLASS))
                {
                   linew = 0;
                   line_num++;
@@ -1277,7 +1277,7 @@ _box_layout_cb(Evas_Object *o,
         if (linew > w)
           {
              opt = eina_list_data_get(l_next);
-             if (opt && opt->obj && !strcmp(elm_widget_type_get(opt->obj), 
"elm_entry"))
+             if (opt && opt->obj && eo_isa(opt->obj, ELM_ENTRY_CLASS))
                {
                   xx = x;
                   yy += hh;
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 5096e4a..de90018 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -1315,7 +1315,7 @@ _dropable_coords_adjust(Dropable *dropable, Evas_Coord 
*x, Evas_Coord *y)
    if (elm_widget_is(dropable->obj))
      {
         win = elm_widget_top_get(dropable->obj);
-        if (win && !strcmp(evas_object_type_get(win), "elm_win"))
+        if (win && eo_isa(win, ELM_WIN_CLASS))
           {
              Evas_Coord x2, y2;
              int rot = elm_win_rotation_get(win);

-- 


Reply via email to