Fix #7959 - new project flow - use void func to callback after each step, tidy up...
[roobuilder] / src / Builder4 / DialogFiles.bjs
index 1ecf130..d53a5a2 100644 (file)
          "   pe.el.application = _this.win.el.application;",
          "    pe.el.set_transient_for( _this.el );",
          " ",
-         "  ",
-         "    pe.selected.connect((pr) => {",
-         "     \t ",
-         "\t     _this.show(  pr, _this.new_window);",
-         "",
-         "    });",
-         "    ",
+         "    var cb = new Project.Callback();",
+         "    cb.call.connect((pr) => {",
+         "    \t_this.show(  pr , _this.new_window);",
+         "\t});",
          "      ",
-         "    pe.show();",
+         "    pe.show( cb);",
          "   ",
          "",
          "}"
         ]
        },
-       "xtype" : "Button"
+       "xtype" : "Button",
+       "| void onCreated" : [
+        "() {",
+        "\tvar pe =      EditProject.singleton();",
+        "",
+        "\t_this.show(  pe.result , _this.new_window);",
+        "}"
+       ]
       },
       {
        "$ xns" : "Gtk",
          "   if (_this.selectedProject == null) {",
          "\t   return;",
          "   }",
-         "\t_this.win.windowstate.projectPopoverShow(_this.el, _this.selectedProject);",
+         "\t_this.win.windowstate.projectPopoverShow(_this.el, _this.selectedProject, null);",
          " }"
         ]
        },
     " ",
     "\t",
     "\t this.el.show();",
-    "\t \tthis.load();",
+    " this.load();",
     "\tthis.selectProject(project);",
     "\tthis.onProjectSelected(project);   //?? twice?",
     "\t ",