Fix #7959 - new project flow - use void func to callback after each step, tidy up...
[roobuilder] / src / Builder4 / ValaProjectSettingsPopover.bjs
index 907773c..df33c1b 100644 (file)
@@ -3,8 +3,8 @@
  "gen_extended" : false,
  "items" : [
   {
+   "$ Project.Callback doneObj" : "null",
    "$ xns" : "Gtk",
-   "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
    "Project.Gtk project" : "null",
    "Project.GtkValaSettings? selected_target" : "null",
    "Xcls_MainWindow window" : "null",
            "_this.project.save(); ",
            " ",
            "\t// what about .js ?",
-           "   _this.done = true;",
-           "\t_this.el.hide();",
-           "",
+           "_this.done = true;",
+           "_this.el.hide();",
+           "if (_this.doneObj != null) {",
+           "\t_this.doneObj.call(_this.project);",
+           "}",
            "// hopefull this will work with bjs files..",
            "\t",
            " ",
     "}"
    ],
    "| void show" : [
-    "(Gtk.Window pwin, Project.Gtk project) {",
+    "(Gtk.Window pwin, Project.Gtk project, Project.Callback doneObj) {",
     "     ",
     "    //print(\"ValaProjectSettings show\\n\");",
-    "    ",
+    "    this.doneObj = doneObj;",
     "    this.project=  project;",
     "\t ",
     "    this.compile_flags.el.buffer.set_text(",
     "//\tGtk.Allocation rect;",
     "\t//btn.get_allocation(out rect);",
     " //   this.el.set_pointing_to(rect);",
-    "\tthis.el.set_transient_for(pwin);",
+    " this.el.application = pwin.application; // ??? make it modal?",
+    "\t this.el.set_transient_for(pwin);",
+    "\t ",
     "\t// window + header?",
     "\t// print(\"SHOWALL - POPIP\\n\");",
     "\tthis.el.set_size_request(800,800);",