From: Alan Knowles Date: Sat, 20 Jan 2024 16:57:40 +0000 (+0800) Subject: fix merge X-Git-Tag: release-5.0.1~14 X-Git-Url: http://git.roojs.org/?p=roobuilder;a=commitdiff_plain;h=6acc1bf9b9a671ed7ac6e5f70fb1762a3a4cdc4c fix merge --- diff --git a/src/Builder4/DialogConfirm.bjs b/src/Builder4/DialogConfirm.bjs index 045bf892d..ac02d27dd 100644 --- a/src/Builder4/DialogConfirm.bjs +++ b/src/Builder4/DialogConfirm.bjs @@ -15,7 +15,6 @@ " this.el.response(Gtk.ResponseType.CANCEL);", " this.el.hide();", " return true;", - " ", "}", "" ] diff --git a/src/Builder4/DialogConfirm.vala b/src/Builder4/DialogConfirm.vala index dfb48adfd..7a9bdb956 100644 --- a/src/Builder4/DialogConfirm.vala +++ b/src/Builder4/DialogConfirm.vala @@ -1,53 +1,52 @@ - static DialogConfirm _DialogConfirm; - - public class DialogConfirm : Object - { - public Gtk.MessageDialog el; - private DialogConfirm _this; - - public static DialogConfirm singleton() - { - if (_DialogConfirm == null) { - _DialogConfirm= new DialogConfirm(); - } - return _DialogConfirm; - } - - // my vars (def) - - // ctor - public DialogConfirm() - { - _this = this; - this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Test" ); - - // my vars (dec) - - // set gobject values - this.el.title = "Please Confirm "; - this.el.name = "DialogConfirm"; - this.el.modal = true; - this.el.use_markup = true; - - //listeners - this.el.close_request.connect( (event) => { - this.el.response(Gtk.ResponseType.CANCEL); - this.el.hide(); - return true; - - }); - } - - // user defined functions - public void showIt // caller needs to connect to the response - to get the result. - - (string title, string msg) { - //if (!this.el) { this.init(); } - //this.success = success; - this.el.title = title; - this.el.text = msg; - this.el.show(); - - - } - } +static DialogConfirm _DialogConfirm; + +public class DialogConfirm : Object +{ + public Gtk.MessageDialog el; + private DialogConfirm _this; + + public static DialogConfirm singleton() + { + if (_DialogConfirm == null) { + _DialogConfirm= new DialogConfirm(); + } + return _DialogConfirm; + } + + // my vars (def) + + // ctor + public DialogConfirm() + { + _this = this; + this.el = new Gtk.MessageDialog( null, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Test" ); + + // my vars (dec) + + // set gobject values + this.el.title = "Please Confirm "; + this.el.name = "DialogConfirm"; + this.el.modal = true; + this.el.use_markup = true; + + //listeners + this.el.close_request.connect( (event) => { + this.el.response(Gtk.ResponseType.CANCEL); + this.el.hide(); + return true; + }); + } + + // user defined functions + public void showIt // caller needs to connect to the response - to get the result. + + (string title, string msg) { + //if (!this.el) { this.init(); } + //this.success = success; + this.el.title = title; + this.el.text = msg; + this.el.show(); + + + } +} diff --git a/src/Builder4/DialogFiles.bjs b/src/Builder4/DialogFiles.bjs index 224aafb84..c7412a0fd 100644 --- a/src/Builder4/DialogFiles.bjs +++ b/src/Builder4/DialogFiles.bjs @@ -1184,11 +1184,9 @@ "| void load" : [ "() {", " // cl list...", - " ", - " ", + " ", " _this.is_loading = true;", " ", - "", " Project.Project.loadAll();", " _this.project_list.el.set_model(new Gtk.SingleSelection(null));", " Project.Project.loadIntoStore(this.projectmodel.el);", @@ -1199,8 +1197,6 @@ " ", " _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; ", "\t_this.btn_delfile.el.hide();", - " ", - " ", "}", "" ], @@ -1316,4 +1312,4 @@ } ], "name" : "DialogFiles" -} \ No newline at end of file +} diff --git a/src/Builder4/DialogFiles.vala b/src/Builder4/DialogFiles.vala index ede09f447..34294b267 100644 --- a/src/Builder4/DialogFiles.vala +++ b/src/Builder4/DialogFiles.vala @@ -177,11 +177,9 @@ public class DialogFiles : Object }// public void load () { // cl list... - - + _this.is_loading = true; - Project.Project.loadAll(); _this.project_list.el.set_model(new Gtk.SingleSelection(null)); Project.Project.loadIntoStore(this.projectmodel.el); @@ -192,8 +190,6 @@ public class DialogFiles : Object _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; _this.btn_delfile.el.hide(); - - } public class Xcls_Box2 : Object { diff --git a/src/JsRender/Node.vala b/src/JsRender/Node.vala index 324f048d4..0f91ab8c8 100644 --- a/src/JsRender/Node.vala +++ b/src/JsRender/Node.vala @@ -728,32 +728,36 @@ public class JsRender.Node : GLib.Object { switch(prop.ptype) { case PROP: case RAW: // should they be the same? - + props += "\n\t" + GLib.Markup.escape_text(prop.rtype) + " " + GLib.Markup.escape_text(i) +" : " + - GLib.Markup.escape_text(val.split("\n")[0]); + GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]); break; case METHOD : + funcs += "\n\t" + GLib.Markup.escape_text(prop.rtype) + " " + GLib.Markup.escape_text(i) +" : " + - GLib.Markup.escape_text(val.split("\n")[0]); + GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]); break; case USER : // user defined. + uprops += "\n\t" + GLib.Markup.escape_text(i) +" : " + - GLib.Markup.escape_text(val.split("\n")[0]); + GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]); break; case SPECIAL : // * prop| args | ctor | init + + spec += "\n\t" + GLib.Markup.escape_text(i) +" : " + - GLib.Markup.escape_text(val.split("\n")[0]); + GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]); break; case LISTENER : return ""; // always raw... diff --git a/src/Spawn.vala b/src/Spawn.vala index dac287751..b4c4c2099 100644 --- a/src/Spawn.vala +++ b/src/Spawn.vala @@ -164,7 +164,7 @@ public class Spawn : Object Process.spawn_async ( this.cwd, this.args, - this.env.length > 0 ? this.env : null, + this.env.length > 0 ? this.env : GLib.Environ.get (), SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD, null, out pid); @@ -234,6 +234,10 @@ public class Spawn : Object this.ctx.quit(); this.ctx = null; } + // since it's closed - we might not need to remove the watches? + + this.err_src = -1; + this.out_src = -1; this.tidyup(); GLib.debug("DONE TIDYUP - calling complete");