From 51b966c276b7f4cb3036ab8a970beee8132ea818 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 29 Apr 2015 19:59:23 +0800 Subject: [PATCH] src/Builder4/GtkView.bjs src/Builder4/GtkView.vala --- src/Builder4/GtkView.bjs | 2 +- src/Builder4/GtkView.vala | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/Builder4/GtkView.bjs b/src/Builder4/GtkView.bjs index 7a4ab3d89..a5de60cec 100644 --- a/src/Builder4/GtkView.bjs +++ b/src/Builder4/GtkView.bjs @@ -20,7 +20,7 @@ "xtype" : "VPaned", "# JsRender.JsRender file" : "null", "int height" : 0, - "| void compileNotice" : "( string type, string file, int line, string message) {\n // if type = \"START\"... then we reset the tree?\n // the issue is that the compiler is continually going..\n // so editing a file etc.. may change things.?\n // probably not an issue.\n if (type ==\"START\") {\n // reset the tree;\n return;\n }\n \n \n \n}\n", + "| void compileNotice" : "( string type, string file, int line, string message) {\n // if type = \"START\"... then we reset the tree?\n // the issue is that the compiler is continually going..\n // so editing a file etc.. may change things.?\n // probably not an issue.\n if (type ==\"START\") {\n // reset the tree;\n return;\n }\n var cs = _this.compile_result_store;\n \n var top = 0;\n var title = \"\";\n switch(type) {\n case \"ERR\":\n title = \"Errors\";\n top =0;\n break;\n \n case \"WARN\":\n title = \"Warnings\";\n top =1;\n break;\n \n case \"DEPR\":\n title = \"Depricated\";\n top=2;\n \n }\n \n \n var tv = cs.nodeFindOrCreate(null, top.to_string(), title);\n tv = cs.nodeFindOrCreate(tv, \"%d:%s\".print(top, file), file);\n// tv = cs.nodeAppendOrCreate(tv, \"%d:%s:%d\".print(top, file,line), file,line, message);\n \n}\n", "$ xns" : "Gtk", "items" : [ { diff --git a/src/Builder4/GtkView.vala b/src/Builder4/GtkView.vala index ffa9437bc..c2980f7be 100644 --- a/src/Builder4/GtkView.vala +++ b/src/Builder4/GtkView.vala @@ -146,8 +146,31 @@ public class Xcls_GtkView : Object // reset the tree; return; } + var cs = _this.compile_result_store; - + var top = 0; + var title = ""; + switch(type) { + case "ERR": + title = "Errors"; + top =0; + break; + + case "WARN": + title = "Warnings"; + top =1; + break; + + case "DEPR": + title = "Depricated"; + top=2; + + } + + + var tv = cs.nodeFindOrCreate(null, top.to_string(), title); + tv = cs.nodeFindOrCreate(tv, "%d:%s".print(top, file), file); + // tv = cs.nodeAppendOrCreate(tv, "%d:%s:%d".print(top, file,line), file,line, message); } public class Xcls_ScrolledWindow2 : Object -- 2.39.2