src/Builder4/ValaCompileResults.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 28 May 2015 08:53:21 +0000 (16:53 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 28 May 2015 08:53:21 +0000 (16:53 +0800)
src/Builder4/ValaCompileResults.vala

src/Builder4/ValaCompileResults.bjs
src/Builder4/ValaCompileResults.vala

index 06c516f..dd82e2b 100644 (file)
@@ -17,7 +17,7 @@
    "bool active" : false,
    "int width_request" : 600,
    "$ xns" : "Gtk",
-   "| void addLine" : "(string str) {\n\tvar buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();\n\tTextIter iter;\n\tbuf.get_end_iter (out  iter);\n\tbuf.insert(ref iter, str, str.length);\n\t/// scroll..\n\t\n\n}\n",
+   "| void addLine" : "(string str) {\n\tvar buf = (Gtk.SourceBuffer)this.sourceview.get_buffer();\n\tTextIter iter;\n\tbuf.get_end_iter (out  iter);\n\tbuf.insert(ref iter, str, str.length);\n\t/// scroll..\n\tbuf.get_end_iter (out  iter);\n\tthis.sourceview.el.scroll_to_iter(iter, 0.0f, true, 0.0f, 1.0f);\n\t\n\n}\n",
    "bool modal" : true,
    "items" : [
     {
index 2089379..c96d957 100644 (file)
@@ -70,11 +70,13 @@ public class Xcls_ValaCompileResults : Object
         
     }
     public void addLine (string str) {
-       var buf = (Gtk.SourceBuffer)this.sourceview.el.get_buffer();
+       var buf = (Gtk.SourceBuffer)this.sourceview.get_buffer();
        TextIter iter;
        buf.get_end_iter (out  iter);
        buf.insert(ref iter, str, str.length);
        /// scroll..
+       buf.get_end_iter (out  iter);
+       this.sourceview.el.scroll_to_iter(iter, 0.0f, true, 0.0f, 1.0f);
        
     
     }