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

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

index adb7961..32dfa5b 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_occurences_count();\n\n\n\tvar s = new Gtk.SourceSearchSettings();\n\tvar buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();\n\tthis.sourcecontext = new Gtk.SourceSearchContext(buf,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",
+   "| 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",
    "# string key" : "\"\"",
    "* pack" : "add",
    "xtype" : "Box",
index 8243a30..a984fc2 100644 (file)
@@ -122,16 +122,9 @@ public class Editor : Object
        this.sourcecontext = new Gtk.SourceSearchContext(this.buffer.el,s);
        this.sourcecontext .set_highlight(true);
        s.set_search_text(txt);
-       return this.sourcecontext.get_occurences_count();
-    
-    
-       var s = new Gtk.SourceSearchSettings();
-       var buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();
-       this.sourcecontext = new Gtk.SourceSearchContext(buf,s);
-       this.sourcecontext.set_highlight(true);
-       s.set_search_text(txt);
        return this.sourcecontext.get_occurrences_count();
     
+     
        
     
     }