src/Builder4/GtkView.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 03:14:55 +0000 (11:14 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 03:14:55 +0000 (11:14 +0800)
src/Builder4/GtkView.vala

src/Builder4/GtkView.bjs
src/Builder4/GtkView.vala

index 97a7ac1..8aaa621 100644 (file)
@@ -27,7 +27,7 @@
    "$ xns" : "Gtk",
    "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
    "# Xcls_MainWindow main_window" : "",
-   "| void forwardSearch" : "() {\n\n\tif (this.searchcontext == null) {\n\t\treturn;\n\t}\n\t\n\tGtk.TextIter beg, st,en, stl;\n\t\n\tvar buf = this.sourceview.el.get_buffer();\n\tbuf.get_iter_at_offset(out beg, this.last_search_end);\n\tif (!this.searchcontext.forward(beg, out st, out en)) {\n\t\tthis.last_search_end = 0;\n\t} else { \n\t\tthis.last_search_end = en.get_offset();\n\t\n\t\tthis.sourceview.el.grab_focus();\n\t \n\t\tbuf.place_cursor(st);\n\t\tvar ln = st.get_line();\n\t\tbuf.get_iter_at_line(out stl,ln);\n\t\t \n\t\tthis.sourceview.el.scroll_to_iter(stl,  0.0f, true, 0.0f, 0.5f);\n\t}\n\n}\n",
+   "| void forwardSearch" : "() {\n\n\tif (this.searchcontext == null) {\n\t\treturn;\n\t}\n\tthis.notebook.el.page = 1;\n\tGtk.TextIter beg, st,en, stl;\n\t\n\tvar buf = this.sourceview.el.get_buffer();\n\tbuf.get_iter_at_offset(out beg, this.last_search_end);\n\tif (!this.searchcontext.forward(beg, out st, out en)) {\n\t\tthis.last_search_end = 0;\n\t} else { \n\t\tthis.last_search_end = en.get_offset();\n\t\n\t\tthis.sourceview.el.grab_focus();\n\t \n\t\tbuf.place_cursor(st);\n\t\tvar ln = st.get_line();\n\t\tbuf.get_iter_at_line(out stl,ln);\n\t\t \n\t\tthis.sourceview.el.scroll_to_iter(stl,  0.0f, true, 0.0f, 0.5f);\n\t}\n\n}\n",
    "items" : [
     {
      "id" : "notebook",
index f808698..2c16f8e 100644 (file)
@@ -196,7 +196,7 @@ public class Xcls_GtkView : Object
        if (this.searchcontext == null) {
                return;
        }
-       
+       this.notebook.el.page = 1;
        Gtk.TextIter beg, st,en, stl;
        
        var buf = this.sourceview.el.get_buffer();