src/Builder4/MainWindow.bjs
authorAlan <alan@roojs.com>
Thu, 7 Jul 2022 07:34:41 +0000 (15:34 +0800)
committerAlan <alan@roojs.com>
Thu, 7 Jul 2022 07:34:41 +0000 (15:34 +0800)
src/Builder4/MainWindow.vala

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

index 36c996a..2390aeb 100644 (file)
@@ -90,8 +90,9 @@
            "\t \tthis.el.detach(m);",
            "\t }",
            "\t this.mitems.clear();",
-           "\t foreach(var wid in this.application.windows) {",
-           "\t \tvar w = this.applications.windows.get(wid);",
+           "\t var ",
+           "\t foreach(var w in this.application.windows) {",
+           "\t \tvar wid = this.applications.windows.index_of(w);",
            "\t \t// fixme find a better way to display this.",
            "\t \tvar m = new Gtk.MenuItem.with_label(w.windowstate.file.path);",
            "\t \tm.activate.connect(() => {",
index 99ea385..d7933fd 100644 (file)
@@ -257,8 +257,9 @@ public class Xcls_MainWindow : Object
                        this.el.detach(m);
                 }
                 this.mitems.clear();
-                foreach(var wid in this.application.windows) {
-                       var w = this.applications.windows.get(wid);
+                var 
+                foreach(var w in this.application.windows) {
+                       var wid = this.applications.windows.index_of(w);
                        // fixme find a better way to display this.
                        var m = new Gtk.MenuItem.with_label(w.windowstate.file.path);
                        m.activate.connect(() => {