From 3b165956d75bd5388fcf9809aa23b9238f572d20 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 7 Jun 2016 15:42:30 +0800 Subject: [PATCH] src/Builder4/WindowRooView.bjs src/Builder4/WindowRooView.vala --- src/Builder4/WindowRooView.bjs | 2 -- src/Builder4/WindowRooView.vala | 4 ---- 2 files changed, 6 deletions(-) diff --git a/src/Builder4/WindowRooView.bjs b/src/Builder4/WindowRooView.bjs index d9847bcdc..07ddd9225 100644 --- a/src/Builder4/WindowRooView.bjs +++ b/src/Builder4/WindowRooView.bjs @@ -180,7 +180,6 @@ "listeners" : { "changed" : " () => {\n // check syntax??\n // ??needed..??\n // _this.save_button.el.sensitive = true;\n ///?? has changed occured during loading?\n if (_this.sourceview.loading) {\n\t\treturn;\n\t}\n\t\n print(\"- PREVIEW EDITOR CHANGED--\");\n \n \n //this.checkSyntax();\n \n this.dirty = true;\n\n\n return ;\n}\n\n \n" }, - "bool check_queued" : false, "bool dirty" : false, "id" : "buffer", "int error_line" : "-1", @@ -188,7 +187,6 @@ "| bool checkSyntax" : " () {\n \n if (this.check_running) {\n print(\"Check is running\\n\");\n if (this.check_queued) { \n print(\"Check is already queued\");\n return true;\n }\n this.check_queued = true;\n print(\"Adding queued Check \");\n GLib.Timeout.add_seconds(1, () => {\n this.check_queued = false;\n \n this.checkSyntax();\n return false;\n });\n \n\n return true;\n }\n var str = this.toString();\n \n // needed???\n if (this.error_line > 0) {\n Gtk.TextIter start;\n Gtk.TextIter end; \n this.el.get_bounds (out start, out end);\n\n this.el.remove_source_marks (start, end, null);\n }\n if (str.length < 1) {\n print(\"checkSyntax - empty string?\\n\");\n return true;\n }\n \n if (_this.file.xtype == \"PlainFile\") {\n \n // assume it's gtk...\n this.check_running = true;\n /*\n if (!_this.window.windowstate.valasource.checkPlainFileSpawn(\n\t _this.file,\n\t str\n\t )) {\n this.check_running = false;\n }\n\t*/\n return true;\n \n }\n if (_this.file == null) {\n return true;\n }\n var p = Palete.factory(_this.file.xtype); \n \n\n \n this.check_running = true;\n \n \n if (_this.file.language == \"js\") {\n this.check_running = false;\n print(\"calling validate javascript\\n\"); \n /* return this.highlightErrors(p.validateJavascript(\n str, \n _this.key, \n _this.ptype,\n _this.file,\n _this.node\n )); \n */\n }\n \n \n print(\"calling validate vala\\n\"); \n // clear the buttons.\n \n /*\n if (! _this.window.windowstate.valasource.checkFileWithNodePropChange(\n _this.file,\n _this.node,\n _this.key, \n _this.ptype,\n str\n )) {\n this.check_running = false;\n } \n \n */\n \n //print(\"done mark line\\n\");\n \n return true; // at present allow saving - even if it's invalid..\n}\n", "* pack" : "set_buffer", "xtype" : "SourceBuffer", - "bool check_running" : false, "$ xns" : "Gtk" } ] diff --git a/src/Builder4/WindowRooView.vala b/src/Builder4/WindowRooView.vala index 49a0d208e..880316c3b 100644 --- a/src/Builder4/WindowRooView.vala +++ b/src/Builder4/WindowRooView.vala @@ -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 -- 2.39.2