hermet pushed a commit to branch elementary-1.13.

http://git.enlightenment.org/core/elementary.git/commit/?id=38c0182a3892170a7a8d07a4e2087aec066022ef

commit 38c0182a3892170a7a8d07a4e2087aec066022ef
Author: woochan lee <[email protected]>
Date:   Tue Mar 17 15:42:36 2015 +0900

    conform: Use eo_isa() to check object types.
    
    Summary:
    The strcmp(line 738) has been failed since the eo applied.
    the widget type get API returned "Elm_Genlist" now.
    
    For fix it, using eo_isa() to check object types instead of string 
comparison.
    @fix
    
    Reviewers: seoz, woohyun, JackDanielZ, Hermet
    
    Reviewed By: Hermet
    
    Differential Revision: https://phab.enlightenment.org/D2148
---
 src/lib/elm_conform.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 13e95af..741a846 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -18,11 +18,6 @@ static char CONFORMANT_KEY[] = "_elm_conform_key";
 
 #define ELM_CONFORM_INDICATOR_TIME 1.0
 
-#ifdef HAVE_ELEMENTARY_X
-#define SUB_TYPE_COUNT 2
-static char *sub_type[SUB_TYPE_COUNT] = { "elm_scroller", "elm_genlist" };
-#endif
-
 static const char INDICATOR_PART[] = "elm.swallow.indicator";
 static const char VIRTUALKEYPAD_PART[] = "elm.swallow.virtualkeypad";
 static const char CLIPBOARD_PART[] = "elm.swallow.clipboard";
@@ -731,15 +726,11 @@ _autoscroll_objects_update(void *data)
 
    while (sub)
      {
-        type = elm_widget_type_get(sub);
-        if (!strcmp(type, MY_CLASS_NAME_LEGACY)) break;
+        if (eo_isa(sub, ELM_CONFORMANT_CLASS)) break;
+
+        if (eo_isa(sub, ELM_SCROLLER_CLASS) || eo_isa(sub, ELM_GENLIST_CLASS))
+          top_scroller = sub;
 
-        for (i = 0; i < SUB_TYPE_COUNT; i++)
-          if (!strcmp(type, sub_type[i]))
-            {
-               top_scroller = sub;
-               break;
-            }
         sub = elm_object_parent_widget_get(sub);
      }
 

-- 


Reply via email to