src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 31 Jan 2024 10:33:13 +0000 (18:33 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 31 Jan 2024 10:33:13 +0000 (18:33 +0800)
src/Builder4/MainWindow.vala

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

index f7a399f..d65cadd 100644 (file)
                "| void selectCurrent" : [
                 "() {",
                 "\t_this.winloading = true;",
-                "\t_this.winsel.el.selected = Gtk.INVALID_LIST_POSITION;",
-                "  \t\tfor(var i = 0;i < this.el.get_n_items(); i++) {",
-                "\t\t\tvar ws = this.el.get_item(i) as WindowState;",
-                "\t\t\tif (ws.file.path == _this.windowstate.file.path) {",
-                "\t\t\t  \tthis.winsel.el.selected = i;",
-                "\t\t\t  \tbreak;",
-                "\t\t  \t}",
-                "\t\t}",
+                "\tthis.el.selected = Gtk.INVALID_LIST_POSITION;",
+                "\tfor(var i = 0;i < this.el.get_n_items(); i++) {",
+                "\t\tvar ws = this.el.get_item(i) as WindowState;",
+                "\t\tif (ws.file.path == _this.windowstate.file.path) {",
+                "\t\t  \tthis.el.selected = i;",
+                "\t\t  \tbreak;",
+                "\t  \t}",
+                "\t}",
                 "\t_this.winloading = false;",
                 "",
                 "}"
index 9441c72..0e0f06d 100644 (file)
@@ -1889,14 +1889,14 @@ public class Xcls_MainWindow : Object
                // user defined functions
                public void selectCurrent () {
                        _this.winloading = true;
-                       _this.winsel.el.selected = Gtk.INVALID_LIST_POSITION;
-                               for(var i = 0;i < this.el.get_n_items(); i++) {
-                                       var ws = this.el.get_item(i) as WindowState;
-                                       if (ws.file.path == _this.windowstate.file.path) {
-                                               this.winsel.el.selected = i;
-                                               break;
-                                       }
-                               }
+                       this.el.selected = Gtk.INVALID_LIST_POSITION;
+                       for(var i = 0;i < this.el.get_n_items(); i++) {
+                               var ws = this.el.get_item(i) as WindowState;
+                               if (ws.file.path == _this.windowstate.file.path) {
+                                       this.el.selected = i;
+                                       break;
+                               }
+                       }
                        _this.winloading = false;
                
                }