src/Builder4/ValaCompileErrors.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 18 May 2015 08:56:50 +0000 (16:56 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 18 May 2015 08:56:50 +0000 (16:56 +0800)
src/Builder4/ValaCompileErrors.vala

src/Builder4/ValaCompileErrors.bjs
src/Builder4/ValaCompileErrors.vala

index 4a73fee..0ac3b2d 100644 (file)
@@ -9,14 +9,13 @@
  "items" : [
   {
    "listeners" : {
-    "button_press_event" : "",
     "closed" : "() => {\n    if (this.close) {\n        return;\n    }\n    this.el.show();\n}"
    },
    "int height_request" : 800,
    "id" : "ValaCompileErrors",
    "Xcls_MainWindow window" : "",
    "| void show" : "(Json.Object tree, Gtk.Widget onbtn) {\n\n        this.notices = tree;\n         //print(\"looking for %s\\n\", id);\n        // loop through parent childnre\n          \n        \n        var store = this.compile_result_store.el;    \n        \n        store.clear();\n     \n        \n        tree.foreach_member((obj, file, node) => {\n            // id line \"display text\", file\n            \n            var title = GLib.Path.get_basename(GLib.Path.get_dirname( file)) + \"/\" +  GLib.Path.get_basename( file) ;\n            Gtk.TreeIter iter;\n            print(\"Add file %s\", title);\n            store.append(out iter, null);\n            var lines = tree.get_object_member(file);\n            title += \" (\" + lines.get_size().to_string() + \")\";\n            store.set(iter, 0, file, 1, 0, 2, title, 3, file,-1);\n            \n            lines.foreach_member((obja, line, nodea) => {\n                var msg  = \"\";\n                var ar = lines.get_array_member(line);\n                for (var i = 0 ; i < ar.get_length(); i++) {\n    \t\t    msg += (msg.length > 0) ? \"\\n\" : \"\";\n    \t\t    msg += ar.get_string_element(i);\n\t        }\n                Gtk.TreeIter citer;  \n                print(\"Add line %s\", line);\n                store.append(out citer, iter);\n                store.set(citer, \n                    0, file + \":\" + line, \n                    1, int.parse(line), \n                    2, GLib.Markup.escape_text(line + \": \" + msg), \n                    3, file,-1);\n            \n            });\n            \n            \n        \n        });\n        \n    int w,h;\n    this.window.el.get_size(out w, out h);\n    \n    // left tree = 250, editor area = 500?\n    \n    var new_w = int.min(750, w-100);\n    if (new_w > (w-100)) {\n        new_w = w-100;\n    }\n    this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));\n\n    \n    this.hpane.el.set_position(250);\n   if (this.el.relative_to == null) {\n        this.el.set_relative_to(onbtn);\n    }\n    this.el.show_all();\n    this.save_btn.el.hide();          \n\n}\n",
-   "bool close" : true,
+   "bool close" : false,
    "xtype" : "Popover",
    "Gtk.PositionType position" : "Gtk.PositionType.TOP",
    "int width_request" : 900,
index 1c776ab..506cc4a 100644 (file)
@@ -32,7 +32,7 @@ public class Xcls_ValaCompileErrors : Object
         this.el = new Gtk.Popover( null );
 
         // my vars (dec)
-        this.close = true;
+        this.close = false;
 
         // set gobject values
         this.el.width_request = 900;
@@ -44,7 +44,6 @@ public class Xcls_ValaCompileErrors : Object
         this.el.add (  child_0.el  );
 
         // listeners 
-        this.el.button_press_event.connect( );
         this.el.closed.connect( () => {
             if (this.close) {
                 return;