src/Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 12:55:25 +0000 (20:55 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 12:55:25 +0000 (20:55 +0800)
src/Builder4/Editor.vala

src/Builder4/Editor.bjs
src/Builder4/Editor.vala

index 32dfa5b..42a1227 100644 (file)
@@ -16,7 +16,7 @@
    "# int pos_root_y" : "",
    "# string ptype" : "\"\"",
    "bool hexpand" : true,
-   "| int search" : "(string txt) {\n\n\tvar s = new Gtk.SourceSearchSettings();\n\t\n\tthis.sourcecontext = new Gtk.SourceSearchContext(this.buffer.el,s);\n\tthis.sourcecontext .set_highlight(true);\n\ts.set_search_text(txt);\n\treturn this.sourcecontext.get_occurrences_count();\n\n \n   \n\n}\n",
+   "| int search" : "(string txt) {\n\n\tvar s = new Gtk.SourceSearchSettings();\n\t\n\tthis.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);\n\tthis.searchcontext .set_highlight(true);\n\ts.set_search_text(txt);\n\treturn this.searchcontext.get_occurrences_count();\n\n \n   \n\n}\n",
    "# string key" : "\"\"",
    "* pack" : "add",
    "xtype" : "Box",
index a984fc2..693a10a 100644 (file)
@@ -119,10 +119,10 @@ public class Editor : Object
     
        var s = new Gtk.SourceSearchSettings();
        
-       this.sourcecontext = new Gtk.SourceSearchContext(this.buffer.el,s);
-       this.sourcecontext .set_highlight(true);
+       this.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);
+       this.searchcontext .set_highlight(true);
        s.set_search_text(txt);
-       return this.sourcecontext.get_occurrences_count();
+       return this.searchcontext.get_occurrences_count();