src/Builder4/WindowLeftProps.bjs
authorAlan <alan@roojs.com>
Thu, 9 Jun 2022 06:33:15 +0000 (14:33 +0800)
committerAlan <alan@roojs.com>
Thu, 9 Jun 2022 06:33:15 +0000 (14:33 +0800)
src/Builder4/WindowLeftProps.vala

src/Builder4/WindowLeftProps.bjs
src/Builder4/WindowLeftProps.vala

index 611c295..dd0beba 100644 (file)
@@ -85,6 +85,7 @@
       {
        "$ xns" : "Gtk",
        "* pack" : "add",
+       "bool always_show_image" : true,
        "bool hexpand" : true,
        "items" : [
         {
            "label" : "String",
            "listeners" : {
             "activate" : [
-             "  (self) => {",
-             "  \tvar p = new JsRender.NodeProp.prop(\"\", \"string\", \"\") ;",
-             "     _this.view.popover.show(_this.view.el, _this.node, p ,   -1,  true);",
-             "//    _this.addProp( new JsRender.NodeProp.prop(\"\", \"string\", \"\") );",
+             "(self) => {",
+             "",
+             "\t_this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.prop(\"\", \"string\", \"\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t);",
+             "",
              "}"
             ]
            },
            "listeners" : {
             "activate" : [
              "  ( ) =>{",
-             "",
-             "       _this.addProp( new JsRender.NodeProp.prop(\"\", \"int\", \"0\") ); ",
+             "  _this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.prop(\"\", \"int\", \"0\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t);",
+             " ",
              "}"
             ]
            },
            "listeners" : {
             "activate" : [
              "  ( ) =>{",
-             "       _this.addProp( new JsRender.NodeProp.prop(\"\", \"bool\", \"true\") ); ",
+             "   _this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.prop(\"\", \"bool\", \"true\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t); ",
              " ",
              "}"
             ]
            "listeners" : {
             "activate" : [
              "  ( ) =>{",
-             "   _this.addProp( new JsRender.NodeProp.jsmethod(\"\") ); ",
+             "   ",
+             "   _this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.jsmethod(\"\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t);",
+             "   ",
+             " ",
              "}"
             ]
            },
             "activate" : [
              "  ( ) =>{",
              "",
-             "     _this.addProp( new JsRender.NodeProp.valamethod(\"\") ); ",
+             "    _this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.valamethod(\"\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t); ",
              "}"
             ]
            },
            "listeners" : {
             "activate" : [
              "  ( ) =>{",
-             "     _this.addProp( new JsRender.NodeProp.sig(\"\") ); ",
+             "  _this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.sig(\"\" ) ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t);    ",
              "}"
             ]
            },
            "listeners" : {
             "activate" : [
              "  ( ) =>{",
-             " \t_this.addProp( new JsRender.NodeProp.prop( \"flexy:if\", \"string\", \"value_or_condition\") );",
+             " \t_this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.prop(\"flexy:if\", \"string\", \"value_or_condition\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t);",
+             "",
              "",
              "}"
             ]
            "listeners" : {
             "activate" : [
              "  ( ) =>{",
-             " \t_this.addProp( new JsRender.NodeProp.prop( \"flexy:include\", \"string\", \"name_of_file.html\") );",
+             " \t_this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.prop(\"flexy:include\", \"string\", \"name_of_file.html\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t);",
+             "",
              "  ",
              "}"
             ]
            "listeners" : {
             "activate" : [
              "  ( ) =>{",
-             "\t_this.addProp( new JsRender.NodeProp.prop( \"flexy:foreach\", \"string\", \"array,key,value\") );",
+             "  ",
+             "   \t_this.view.popover.show(",
+             "\t\t_this.view.el, ",
+             "\t\t_this.node, ",
+             "\t\t new JsRender.NodeProp.prop(\"flexy:foreach\", \"string\", \"array,key,value\") ,",
+             "\t\t-1,  ",
+             "\t\ttrue",
+             "\t);",
+             "",
              "    ",
              "}"
             ]
index 9d4234c..d122344 100644 (file)
@@ -710,6 +710,7 @@ public class Xcls_LeftProps : Object
 
             // set gobject values
             this.el.hexpand = true;
+            this.el.always_show_image = true;
             this.el.label = "Other";
             var child_0 = new Xcls_AddPropertyPopup( _this );
             child_0.ref();
@@ -1002,9 +1003,15 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( (self) => {
-               var p = new JsRender.NodeProp.prop("", "string", "") ;
-                 _this.view.popover.show(_this.view.el, _this.node, p ,   -1,  true);
-            //    _this.addProp( new JsRender.NodeProp.prop("", "string", "") );
+            
+               _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.prop("", "string", "") ,
+                       -1,  
+                       true
+               );
+            
             });
         }
 
@@ -1033,8 +1040,14 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( ( ) =>{
-            
-                   _this.addProp( new JsRender.NodeProp.prop("", "int", "0") ); 
+              _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.prop("", "int", "0") ,
+                       -1,  
+                       true
+               );
+             
             });
         }
 
@@ -1063,7 +1076,13 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( ( ) =>{
-                   _this.addProp( new JsRender.NodeProp.prop("", "bool", "true") ); 
+               _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.prop("", "bool", "true") ,
+                       -1,  
+                       true
+               ); 
              
             });
         }
@@ -1115,7 +1134,16 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( ( ) =>{
-               _this.addProp( new JsRender.NodeProp.jsmethod("") ); 
+               
+               _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.jsmethod("") ,
+                       -1,  
+                       true
+               );
+               
+             
             });
         }
 
@@ -1145,7 +1173,13 @@ public class Xcls_LeftProps : Object
             //listeners
             this.el.activate.connect( ( ) =>{
             
-                 _this.addProp( new JsRender.NodeProp.valamethod("") ); 
+                _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.valamethod("") ,
+                       -1,  
+                       true
+               ); 
             });
         }
 
@@ -1174,7 +1208,13 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( ( ) =>{
-                 _this.addProp( new JsRender.NodeProp.sig("") ); 
+              _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.sig("" ) ,
+                       -1,  
+                       true
+               );    
             });
         }
 
@@ -1225,7 +1265,14 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( ( ) =>{
-               _this.addProp( new JsRender.NodeProp.prop( "flexy:if", "string", "value_or_condition") );
+               _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.prop("flexy:if", "string", "value_or_condition") ,
+                       -1,  
+                       true
+               );
+            
             
             });
         }
@@ -1255,7 +1302,14 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( ( ) =>{
-               _this.addProp( new JsRender.NodeProp.prop( "flexy:include", "string", "name_of_file.html") );
+               _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.prop("flexy:include", "string", "name_of_file.html") ,
+                       -1,  
+                       true
+               );
+            
               
             });
         }
@@ -1285,7 +1339,15 @@ public class Xcls_LeftProps : Object
 
             //listeners
             this.el.activate.connect( ( ) =>{
-               _this.addProp( new JsRender.NodeProp.prop( "flexy:foreach", "string", "array,key,value") );
+              
+                       _this.view.popover.show(
+                       _this.view.el, 
+                       _this.node, 
+                        new JsRender.NodeProp.prop("flexy:foreach", "string", "array,key,value") ,
+                       -1,  
+                       true
+               );
+            
                 
             });
         }