src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 1 Feb 2024 06:12:03 +0000 (14:12 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 1 Feb 2024 06:12:03 +0000 (14:12 +0800)
src/Builder4/MainWindow.vala

src/Builder4/MainWindow.bjs
src/Builder4/MainWindow.vala

index 18fb162..b010627 100644 (file)
              "* prop" : "child",
              "bool hexpand" : true,
              "bool vexpand" : true,
+             "id" : "",
              "items" : [
               {
                "$ xns" : "Gtk",
                  "xtype" : "FilterListModel"
                 }
                ],
-               "listeners" : {
-                "notify[\"selected\"]" : [
-                 "() => {",
-                 "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
-                 "\t\t",
-                 "\t\treturn;",
-                 "\t}",
-                 "\t",
-                 "\tvar tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;",
-                 "\tGLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
-                 "\tvar f = (JsRender.JsRender) tr.item;",
-                 "\t ",
-                 " ",
-                 "",
-                 "}",
-                 " ",
-                 " ",
-                 " "
-                ]
-               },
-               "xtype" : "SingleSelection",
-               "| JsRender.JsRender? selectedFile" : [
-                "() {",
-                "",
-                "\tif (this.el.selected == Gtk.INVALID_LIST_POSITION) {",
-                "\t\treturn null;",
-                "\t}",
-                "\tvar tr = (Gtk.TreeListRow) this.el.selected_item;",
-                "",
-                "\treturn  (JsRender.JsRender) tr.item;",
-                "}"
-               ]
+               "xtype" : "SingleSelection"
               },
               {
                "$ xns" : "Gtk",
index 7735549..632fa00 100644 (file)
@@ -39,6 +39,7 @@ public class Xcls_MainWindow : Object
        public Xcls_winmodel winmodel;
        public Xcls_projcol projcol;
        public Xcls_filecol filecol;
+       public Xcls_ColumnView61 ColumnView61;
        public Xcls_treeselmodel treeselmodel;
        public Xcls_treelistsort treelistsort;
        public Xcls_treelistmodel treelistmodel;
@@ -2107,6 +2108,7 @@ public class Xcls_MainWindow : Object
                public Xcls_ColumnView61(Xcls_MainWindow _owner )
                {
                        _this = _owner;
+                       _this.ColumnView61 = this;
                        new Xcls_treeselmodel( _this );
                        this.el = new Gtk.ColumnView( _this.treeselmodel.el );
 
@@ -2142,33 +2144,9 @@ public class Xcls_MainWindow : Object
 
                        // set gobject values
                        this.el.can_unselect = true;
-
-                       //listeners
-                       this.el.notify["selected"].connect( () => {
-                               if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
-                                       
-                                       return;
-                               }
-                               
-                               var tr = (Gtk.TreeListRow)_this.treeselmodel.el.selected_item;
-                               GLib.debug("SELECTED = %s", tr.item.get_type().name());
-                               var f = (JsRender.JsRender) tr.item;
-                                
-                        
-                       
-                       });
                }
 
                // user defined functions
-               public JsRender.JsRender? selectedFile () {
-               
-                       if (this.el.selected == Gtk.INVALID_LIST_POSITION) {
-                               return null;
-                       }
-                       var tr = (Gtk.TreeListRow) this.el.selected_item;
-               
-                       return  (JsRender.JsRender) tr.item;
-               }
        }
        public class Xcls_FilterListModel63 : Object
        {