fix merge
authorAlan <alan@roojs.com>
Tue, 28 Jun 2022 09:27:27 +0000 (17:27 +0800)
committerAlan <alan@roojs.com>
Tue, 28 Jun 2022 09:27:27 +0000 (17:27 +0800)
src/Builder4/PopoverAddProp.bjs
src/Builder4/PopoverAddProp.vala
src/Palete/Roo.vala

index 9614074..cd44dc3 100644 (file)
     "",
     "        this.model.el.set(iter,",
     "                0,  prop, ",
-    "                1,  prop.to_property_option_markup(),",
-    "                2,  prop.to_property_option_tooltip(),                ",
-    "                3,  prop.name,                ",
+    "                1,  prop.to_property_option_markup(p.propertyof == xtype),",
+    "                2,  p.doctxt,                ",
+    "                3,  prop.name,",
+    "                4,  prop.rtype,",
+    "                5,  p.propertyof,",
     "                -1",
     "        );",
     "    }",
  "path" : "/home/alan/gitlive/roobuilder/src/Builder4/PopoverAddProp.bjs",
  "permname" : "",
  "title" : ""
-}
\ No newline at end of file
+}
index 78fd8b8..833a00e 100644 (file)
@@ -76,9 +76,11 @@ public class Xcls_PopoverAddProp : Object
     
             this.model.el.set(iter,
                     0,  prop, 
-                    1,  prop.to_property_option_markup(),
-                    2,  prop.to_property_option_tooltip(),                
-                    3,  prop.name,                
+                    1,  prop.to_property_option_markup(p.propertyof == xtype),
+                    2,  p.doctxt,                
+                    3,  prop.name,
+                    4,  prop.rtype,
+                    5,  p.propertyof,
                     -1
             );
         }
index 737501e..1298432 100644 (file)
@@ -248,7 +248,7 @@ namespace Palete {
                                
                                
                                case JsRender.NodePropType.PROP:
-                                       return cls.props;
+                                       return this.filterProps(cls.props);
                                case JsRender.NodePropType.LISTENER:
                                        return cls.signals;
                                case JsRender.NodePropType.METHOD:
@@ -268,6 +268,33 @@ namespace Palete {
 
                         
                }
+               
+               
+               // get rid of objecst from props list.. (assumed to be anything with 'dot' in the type.
+               public Gee.HashMap<string,GirObject>  filterProps(Gee.HashMap<string,GirObject> props)
+               {
+                       // we shold probably cache this??
+                       
+                       var outprops = new Gee.HashMap<string,GirObject>(); 
+                       
+                       foreach(var k in props.keys) {
+                               var val = props.get(k);
+                        
+                               if (!val.type.contains(".")) {
+                                       outprops.set(k,val);
+                               }
+                                
+                               // do nothing? - classes not allowed?
+                               
+                       }
+                       
+                       
+                       return outprops;
+               
+               
+               }
+               
                public string[] getInheritsFor(string ename)
                {
                        string[] ret = {};