2 "build_module" : "builder",
3 "gen_extended" : false,
6 "# GLib.ListStore notices" : "",
7 "# Xcls_MainWindow window" : "",
9 "* ctor" : "new Gtk.Popover()",
10 "Gtk.PositionType position" : "Gtk.PositionType.TOP",
11 "bool autohide" : true,
12 "id" : "ValaCompileErrors",
13 "int height_request" : 800,
14 "int width_request" : 900,
18 "* pack" : "set_child",
19 "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
20 "bool hexpand" : false,
21 "gboolean homogeneous" : false,
22 "id" : "compile_view",
28 " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
37 "* pack" : "set_child",
38 "bool hexpand" : true,
39 "bool vexpand" : true,
55 "new Gtk.TreeListModel(",
56 " new GLib.ListStore(typeof(Palete.CompileError)), //..... << that's our store..",
57 " false, // passthru",
58 " false, // autexpand",
62 " \t return ((Palete.CompileError)item).lines;",
71 "xtype" : "TreeListModel"
74 "xtype" : "SortListModel",
75 "| Json.Object getNodeAt" : [
78 " var tr = (Gtk.TreeListRow)this.el.get_item(row);",
81 " // GLib.debug(\"get_item (2) = %s\", a.get_type().name());",
84 " return (Json.Object)tr.get_item();",
90 "xtype" : "SingleSelection",
91 "| Json.Object getNodeAt" : [
94 " var tr = (Gtk.TreeListRow)this.el.get_item(row);",
96 " var a = tr.get_item();; ",
97 " GLib.debug(\"get_item (2) = %s\", a.get_type().name());",
99 " return (Json.Object)tr.get_item();",
106 "* pack" : "append_column",
107 "bool expand" : true,
108 "bool resizable" : true,
112 "* prop" : "factory",
116 "\t //GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
120 "\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
121 "\tvar expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
124 "\tvar lbl = (Gtk.Label) expand.child;",
126 "\t if (lbl.label != \"\") { // do not update",
131 "\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
132 "\tvar np = (Palete.CompileError) lr.get_item();",
135 "\t//GLib.debug(\"change %s to %s\", lbl.label, np.name);",
136 "\tlbl.label = np.line_msg;",
137 "\t//lbl.tooltip_markup = np.to_property_option_tooltip();",
139 " expand.set_hide_expander( np.lines.n_items < 1);",
140 "\texpand.set_list_row(lr);",
142 " \t// expand current file.",
143 " \tif (_this.window.windowstate.file.path == np.file.path) {",
144 " \t\tlr.expanded = true;",
147 " \t// bind image...",
155 "\tvar expand = new Gtk.TreeExpander();",
157 "\texpand.set_indent_for_depth(true);",
158 "\texpand.set_indent_for_icon(true);",
160 "\tvar lbl = new Gtk.Label(\"\");",
161 "\tlbl.use_markup = true;",
164 " \tlbl.justify = Gtk.Justification.LEFT;",
165 " \tlbl.xalign = 0;",
168 "\texpand.set_child(lbl);",
169 "\t((Gtk.ListItem)listitem).set_child(expand);",
170 "\t((Gtk.ListItem)listitem).activatable = false;",
175 "xtype" : "SignalListItemFactory"
178 "string title" : "Compile Result",
179 "xtype" : "ColumnViewColumn"
185 "(n_press, x, y) => {",
187 "\tif (n_press < 2) { /// doubleclick?",
193 "\t// use selection?!",
194 "\tvar tr = (Gtk.TreeListRow)_this.selmodel.el.selected_item;",
195 "\t//GLib.debug(\"SELECTED = %s\", tr.item.get_type().name());",
196 "\tvar ce = (Palete.CompileError) tr.item;",
198 "\tif (ce.line < 0) {",
199 "\t\t// did not click on a line.",
204 " var fname = ce.parent.file;",
205 " \tvar line = ce.line; ",
206 " GLib.debug(\"open %s @ %d\\n\", ce.parent.file.path, ce.line);",
211 " var regex = new Regex(\"\\\\.vala$\");",
214 " bjsf = regex.replace(fname.path,fname.path.length , 0 , \".bjs\");",
215 " } catch (GLib.RegexError e) {",
218 " var p = _this.window.project;",
222 " var jsr = p.getByPath(bjsf);",
223 " if (jsr != null) {",
224 " _this.window.windowstate.fileViewOpen(jsr, true, line);",
226 " if (jsr.path == _this.window.windowstate.file.path) {",
227 " \t_this.el.hide();",
235 "\t\tvar pf = JsRender.JsRender.factory(\"PlainFile\", p, fname.path);",
236 "\t\t_this.window.windowstate.fileViewOpen(pf, true, line);",
237 " } catch (JsRender.Error e) {}",
238 " // try hiding the left nav..",
247 "xtype" : "GestureClick"
250 "xtype" : "ColumnView"
253 "xtype" : "ScrolledWindow"
261 "( GLib.ListStore ls , Gtk.Widget onbtn) {",
264 " \t//this.el.present();",
265 " //this.el.popup();",
266 " this.notices = ls;",
268 " //print(\"looking for %s\\n\", id);",
269 " // loop through parent childnre",
272 " this.tree.el.hide(); //<< very important!!!",
274 " // store.set_sort_column_id(0,Gtk.SortType.ASCENDING);",
276 " var win = this.window.el;",
277 " var w = win.get_width();",
278 " var h = win.get_height();",
282 " // left tree = 250, editor area = 500?",
285 " var new_w = int.min(650, w-100);",
286 " if (new_w > (w-100)) {",
289 " this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));",
292 " // this.el.set_relative_to(onbtn);",
293 "\t//Gtk.Allocation rect;",
294 "\t//onbtn.get_allocation(out rect);",
295 " //this.el.set_pointing_to(rect);",
296 "\tthis.el.present();",
300 "\tvar tm = new Gtk.TreeListModel(",
301 "\t\tls, //..... << that's our store..",
302 "\t\tfalse, // passthru",
303 "\t\tfalse, // autexpand",
306 "\t\t\t return ((Palete.CompileError)item).lines;",
311 " _this.model.el = tm;",
312 " _this.sortmodel.el.set_model(tm);",
314 " this.tree.el.show(); ",
316 " \t//if (expand != null) {",
317 " //\t_this.compile_tree.el.expand_row( store.get_path(expand) , true);",
320 " // this.hpane.el.set_position( 0);",
326 "name" : "ValaCompileErrors"