tasn pushed a commit to branch master.

http://git.enlightenment.org/tools/clouseau.git/commit/?id=896a0b2f5e3f3dc867900b43a3e46c7f8f1f0955

commit 896a0b2f5e3f3dc867900b43a3e46c7f8f1f0955
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Dec 13 12:00:01 2013 +0000

    App: Show legacy object types for old smart classes.
    
    Those kinds of classes return Evas_Smart as the Eo object type
    which is not really useful.
    This change makes the visible value nicer "Smart_Class (Eo_Class)".
    
    First step towards fixing T638.
---
 src/lib/clouseau_app.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/lib/clouseau_app.c b/src/lib/clouseau_app.c
index 513cfd0..fcc5ef1 100644
--- a/src/lib/clouseau_app.c
+++ b/src/lib/clouseau_app.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "clouseau_private.h"
 
 #include <Elementary.h>
@@ -23,6 +27,16 @@ libclouseau_item_add(Evas_Object *o, Clouseau_Tree_Item 
*parent)
    treeit->is_obj = EINA_TRUE;
 
    treeit->name = eina_stringshare_add(eo_class_name_get(o));
+
+   /* FIXME: Hack to work with old smart inheritance.
+    * Check if the class *is* (not just implements) Evas_Smart. */
+   if (eo_class_get(o) == EVAS_OBJ_SMART_CLASS)
+     {
+        char buf[1024];
+        snprintf(buf, sizeof(buf), "%s (%s)", evas_object_type_get(o), 
treeit->name);
+        eina_stringshare_replace(&treeit->name, buf);
+     }
+
    treeit->is_clipper = !!evas_object_clipees_get(o);
    treeit->is_visible = evas_object_visible_get(o);
    treeit->info = _clouseau_object_information_get(treeit);

-- 


Reply via email to