fix merges
authorAlan Knowles <alan@roojs.com>
Sat, 20 Jan 2024 17:23:29 +0000 (01:23 +0800)
committerAlan Knowles <alan@roojs.com>
Sat, 20 Jan 2024 17:23:29 +0000 (01:23 +0800)
src/Builder4/DialogConfirm.bjs
src/Builder4/DialogConfirm.vala
src/Builder4/DialogFiles.bjs
src/Builder4/DialogFiles.vala
src/Builder4/Editor.bjs
src/Builder4/Editor.vala
src/JsRender/Node.vala
src/JsRender/NodeProp.vala
src/Palete/LanguageClientJavascript.vala
src/Spawn.vala

index ac02d27..045bf89 100644 (file)
@@ -15,6 +15,7 @@
      "   this.el.response(Gtk.ResponseType.CANCEL);",
      "    this.el.hide();",
      "    return true;",
+     " ",
      "}",
      ""
     ]
index 7a9bdb9..dfb48ad 100644 (file)
@@ -1,52 +1,53 @@
-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();
+           
+           
+        }
+    }
index bc2d297..83b43db 100644 (file)
@@ -1,4 +1,4 @@
-g{
+{
  "build_module" : "builder",
  "gen_extended" : false,
  "items" : [
@@ -1184,8 +1184,11 @@ g{
    "| 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);",
@@ -1196,6 +1199,8 @@ g{
     "    ",
     "    _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; ",
     "\t_this.btn_delfile.el.hide();",
+    " ",
+    "  ",
     "}",
     ""
    ],
@@ -1311,4 +1316,4 @@ g{
   }
  ],
  "name" : "DialogFiles"
-}
+}
\ No newline at end of file
index 5035a6b..346b64f 100644 (file)
@@ -177,9 +177,11 @@ 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);
@@ -190,6 +192,8 @@ public class DialogFiles : Object
            
            _this.projectselection.el.selected = Gtk.INVALID_LIST_POSITION; 
                _this.btn_delfile.el.hide();
+        
+         
        }
        public class Xcls_Box2 : Object
        {
index 16e7df7..b1a00f9 100644 (file)
           "\tvar oldcode  = _this.prop.val;",
           "\t",
           "\t_this.prop.val = str;",
-          "\t_this.node.updated_count++;",
           "    _this.file.getLanguageServer().document_change(_this.file);",
-          "    _this.node.updated_count++;",
           "    _this.prop.val = oldcode;",
           "    ",
           "    ",
index 2b47e91..845175e 100644 (file)
@@ -885,9 +885,7 @@ public class Editor : Object
                        var oldcode  = _this.prop.val;
                        
                        _this.prop.val = str;
-                       _this.node.updated_count++;
                    _this.file.getLanguageServer().document_change(_this.file);
-                   _this.node.updated_count++;
                    _this.prop.val = oldcode;
                    
                    
index de6cba3..497c435 100644 (file)
@@ -731,36 +731,32 @@ 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) +
                                                " <b>" + GLib.Markup.escape_text(i) +"</b> : " + 
-                                               GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]);
+                                               GLib.Markup.escape_text(val.split("\n")[0]);
                                                
                                        break;
                                        
                        
                                
                                case METHOD :
-                                        
                                        funcs += "\n\t" + GLib.Markup.escape_text(prop.rtype) +
                                                " <b>" + GLib.Markup.escape_text(i) +"</b> : "  +
-                                               GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]);
+                                               GLib.Markup.escape_text(val.split("\n")[0]);
                                        break;
                                        
                                 
                                case USER : // user defined.
-                                        
                                        uprops += "\n\t<b>" + 
                                                GLib.Markup.escape_text(i) +"</b> : " + 
-                                               GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]);
+                                               GLib.Markup.escape_text(val.split("\n")[0]);
                                        break;
                                        
                                case SPECIAL : // * prop| args | ctor | init
-                                        
-                                               
                                        spec += "\n\t<b>" + 
                                                GLib.Markup.escape_text(i) +"</b> : " + 
-                                               GLib.Markup.escape_text(val == "" ? "" : val.split("\n")[0]);
+                                               GLib.Markup.escape_text(val.split("\n")[0]);
                                        break;
                                        
                                case LISTENER : return  "";  // always raw...
index 1cf7d32..9350212 100644 (file)
@@ -215,7 +215,6 @@ public class JsRender.NodeProp : Object {
                this.rtype = rtype;
                this.val = val;
                this.childstore = new GLib.ListStore( typeof(NodeProp));
-                
        }
        
        
index 19371a4..87303aa 100644 (file)
@@ -16,7 +16,18 @@ namespace Palete {
                public override void startServer()
                {
                }
-                
+               string generateTempContents(JsRender.JsRender file, JsRender.NodeProp? prop, string alt_code) {
+               
+                       var oldcode  = "";
+                       var contents = alt_code;
+                       if (prop != null) {
+                               oldcode  = prop.val;
+                               prop.val = alt_code;
+                               contents = file.toSourceCode();
+                               prop.val = oldcode;
+                       }
+                       return contents;
+               }
                
                
                
index 7b63163..cac96f3 100644 (file)
@@ -164,7 +164,7 @@ public class Spawn : Object
                        Process.spawn_async (   
                                this.cwd,
                                this.args,
-                               this.env.length > 0 ? this.env : GLib.Environ.get (),
+                               this.env.length > 0 ? this.env : null,
                                SpawnFlags.SEARCH_PATH | SpawnFlags.DO_NOT_REAP_CHILD,
                                null,
                                out pid);
@@ -234,10 +234,6 @@ 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");