src/Builder4/WindowRooView.bjs
[app.Builder.js] / src / Builder4 / WindowRooView.vala
index 69068e6..d363723 100644 (file)
@@ -1145,7 +1145,7 @@ public class Xcls_WindowRooView : Object
             
             //} else {
             if (scroll) {
-                        
+                       print("scrolling to node -- should occur on node picking.\n");
                this.el.scroll_to_iter(iter,  0.1f, true, 0.0f, 0.5f);
                }
             
@@ -1262,7 +1262,7 @@ public class Xcls_WindowRooView : Object
                });
                        
             this.loading = false; 
-            _this.buffer.dirty = false
+            _this.buffer.dirty = false;
         }
         public void highlightErrorsJson (string type, Json.Object obj) {
               Gtk.TextIter start;
@@ -1345,10 +1345,8 @@ public class Xcls_WindowRooView : Object
 
 
             // my vars (def)
-        public bool check_queued;
         public bool dirty;
         public int error_line;
-        public bool check_running;
 
         // ctor
         public Xcls_buffer(Xcls_WindowRooView _owner )
@@ -1358,10 +1356,8 @@ public class Xcls_WindowRooView : Object
             this.el = new Gtk.SourceBuffer( null );
 
             // my vars (dec)
-            this.check_queued = false;
             this.dirty = false;
             this.error_line = -1;
-            this.check_running = false;
 
             // set gobject values
 
@@ -1371,6 +1367,10 @@ public class Xcls_WindowRooView : Object
                 // ??needed..??
                // _this.save_button.el.sensitive = true;
                 ///?? has changed occured during loading?
+                if (_this.sourceview.loading) {
+                       return;
+               }
+               
                 print("- PREVIEW EDITOR CHANGED--");
                 
                 
@@ -1396,24 +1396,7 @@ public class Xcls_WindowRooView : Object
         }
         public   bool checkSyntax () {
          
-            if (this.check_running) {
-                print("Check is running\n");
-                if (this.check_queued) { 
-                    print("Check is already queued");
-                    return true;
-                }
-                this.check_queued = true;
-                print("Adding queued Check ");
-                GLib.Timeout.add_seconds(1, () => {
-                    this.check_queued = false;
-                    
-                    this.checkSyntax();
-                    return false;
-                });
-            
-        
-                return true;
-            }
+           
             var str = this.toString();
             
             // needed???
@@ -1424,26 +1407,12 @@ public class Xcls_WindowRooView : Object
         
                 this.el.remove_source_marks (start, end, null);
             }
+            
             if (str.length < 1) {
                 print("checkSyntax - empty string?\n");
                 return true;
             }
             
-            if (_this.file.xtype == "PlainFile") {
-            
-                // assume it's gtk...
-                   this.check_running = true;
-         /*
-                 if (!_this.window.windowstate.valasource.checkPlainFileSpawn(
-                  _this.file,
-                   str
-                )) {
-                    this.check_running = false;
-                }
-               */
-                return true;
-            
-            }
            if (_this.file == null) {
                return true;
            }
@@ -1455,16 +1424,16 @@ public class Xcls_WindowRooView : Object
             
             
             if (_this.file.language == "js") {
-                this.check_running = false;
+                
                 print("calling validate javascript\n"); 
-              /*  return this.highlightErrors(p.validateJavascript(
+                       return this.highlightErrors(p.validateJavascript(
                     str, 
                      _this.key, 
                     _this.ptype,
                     _this.file,
                     _this.node
                 ));    
-                */
+                
             }