From 6dddf8667000a553b007840bcc16e99218ed4e4d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 29 Apr 2015 21:32:34 +0800 Subject: [PATCH] src/Builder4/GtkView.bjs src/Builder4/GtkView.vala --- src/Builder4/GtkView.bjs | 2 +- src/Builder4/GtkView.vala | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Builder4/GtkView.bjs b/src/Builder4/GtkView.bjs index f70e2f566..6fe2bd771 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 print(\"err %s / %s:%d / %s\\n\", type,file,line,message);\n var cs = _this.compile_result_store; \n if (type ==\"START\") {\n // reset the tree;\n cs.el.clear(); \n cs.el.set_sort_column_id(0, Gtk.SortType.ASCENDING); \n return;\n }\n\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 break;\n \n default:\n title = type;\n top =3;\n break;\n }\n \n \n var tv = cs.nodeFindOrCreate(null, top.to_string(), title);\n tv = cs.nodeFindOrCreate(tv, \"%d:%s\".printf(top, file), GLib.Path.get_basename( file) );\n cs.nodeAppendOrCreate(tv, \"%d:%s:%d\".printf(top, file,line), file,line, message);\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 print(\"err %s / %s:%d / %s\\n\", type,file,line,message);\n var cs = _this.compile_result_store; \n if (type ==\"START\") {\n // reset the tree;\n cs.el.clear(); \n cs.el.set_sort_column_id(0, Gtk.SortType.ASCENDING); \n return;\n }\n\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 break;\n \n default:\n title = type;\n top =3;\n break;\n }\n \n \n var tv = cs.nodeFindOrCreate(null, top.to_string(), title);\n var ftv = cs.nodeFindOrCreate(tv, \"%d:%s\".printf(top, file), GLib.Path.get_basename( file) );\n \n cs.nodeAppendOrCreate(ftv, \"%d:%s:%d\".printf(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 76678d439..2cd1cd4c8 100644 --- a/src/Builder4/GtkView.vala +++ b/src/Builder4/GtkView.vala @@ -179,8 +179,9 @@ public class Xcls_GtkView : Object var tv = cs.nodeFindOrCreate(null, top.to_string(), title); - tv = cs.nodeFindOrCreate(tv, "%d:%s".printf(top, file), GLib.Path.get_basename( file) ); - cs.nodeAppendOrCreate(tv, "%d:%s:%d".printf(top, file,line), file,line, message); + var ftv = cs.nodeFindOrCreate(tv, "%d:%s".printf(top, file), GLib.Path.get_basename( file) ); + + cs.nodeAppendOrCreate(ftv, "%d:%s:%d".printf(top, file,line), file,line, message); } public class Xcls_ScrolledWindow2 : Object -- 2.39.2