src/Builder4/ValaCompileErrors.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 11:18:05 +0000 (19:18 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 11:18:05 +0000 (19:18 +0800)
src/Builder4/ValaCompileErrors.vala

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

index defb5ac..08c4153 100644 (file)
@@ -12,7 +12,7 @@
    "id" : "ValaCompileErrors",
    "Xcls_MainWindow window" : "",
    "| void show" : "(Json.Object tree, Gtk.Widget onbtn) {\n\n        \n        this.file = null;\n        this.notices = tree;\n       \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(250, 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\n    if (this.el.relative_to == null) {\n        this.el.set_relative_to(onbtn);\n    }\n    this.el.show_all();\n   \n    while(Gtk.events_pending()) { \n            Gtk.main_iteration();\n    }       \n //   this.hpane.el.set_position( 0);\n}\n",
-   "bool hexpand" : true,
+   "bool hexpand" : false,
    "xtype" : "Popover",
    "Gtk.PositionType position" : "Gtk.PositionType.TOP",
    "bool active" : false,
@@ -24,7 +24,7 @@
    "items" : [
     {
      "id" : "compile_view",
-     "bool hexpand" : true,
+     "bool hexpand" : false,
      "* pack" : "add",
      "xtype" : "Box",
      "gboolean homogeneous" : false,
index 0d3a4ce..7ec41e7 100644 (file)
@@ -35,7 +35,7 @@ public class Xcls_ValaCompileErrors : Object
         // set gobject values
         this.el.width_request = 900;
         this.el.height_request = 800;
-        this.el.hexpand = true;
+        this.el.hexpand = false;
         this.el.modal = true;
         this.el.position = Gtk.PositionType.TOP;
         var child_0 = new Xcls_compile_view( _this );
@@ -134,7 +134,7 @@ public class Xcls_ValaCompileErrors : Object
 
             // set gobject values
             this.el.homogeneous = false;
-            this.el.hexpand = true;
+            this.el.hexpand = false;
             var child_0 = new Xcls_Box3( _this );
             child_0.ref();
             this.el.pack_start (  child_0.el , false,false,0 );