From f2b8b8e4632d503304406477e8911c27ad17ba82 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 2 Jun 2015 21:15:21 +0800 Subject: [PATCH] src/Builder4/Editor.bjs src/Builder4/Editor.vala --- src/Builder4/Editor.bjs | 2 +- src/Builder4/Editor.vala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Builder4/Editor.bjs b/src/Builder4/Editor.bjs index d30b77b2b..1b5f2cac8 100644 --- a/src/Builder4/Editor.bjs +++ b/src/Builder4/Editor.bjs @@ -9,7 +9,6 @@ "items" : [ { "# Xcls_MainWindow window" : "null", - "int XXX" : 0, "| bool saveContents" : " () {\n \n \n if (_this.file == null) {\n return true;\n }\n \n \n \n \n \n var str = _this.buffer.toString();\n \n _this.buffer.checkSyntax();\n \n \n \n // LeftPanel.model.changed( str , false);\n _this.dirty = false;\n _this.save_button.el.sensitive = false;\n \n // find the text for the node..\n if (_this.file.xtype != \"PlainFile\") {\n if (ptype == \"listener\") {\n this.node.listeners.set(key,str);\n \n } else {\n this.node.props.set(key,str);\n }\n } else {\n _this.file.setSource( str );\n }\n \n // call the signal..\n this.save();\n \n return true;\n\n} ", "# string activeEditor" : "\"\"", "| void scroll_to_line" : "(int line) {\n\n\tGLib.Timeout.add(500, () => {\n \n\t\tvar buf = this.view.el.get_buffer();\n\n\t\tvar sbuf = (Gtk.SourceBuffer) buf;\n\n\n\t\tGtk.TextIter iter; \n\t\tsbuf.get_iter_at_line(out iter, line);\n\t\tthis.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);\n\t\treturn false;\n\t}); \n}\n", @@ -18,6 +17,7 @@ "# string ptype" : "\"\"", "bool hexpand" : true, "| 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\tGtk.TextIter beg, st,en;\n\t \n\tthis.buffer.el.get_start_iter(out beg);\n\tthis.searchcontext.forward(beg, out st, out en);\n\t\n\t\n\treturn this.searchcontext.get_occurrences_count();\n\n \n \n\n}\n", + "int last_search_end" : 0, "# string key" : "\"\"", "* pack" : "add", "xtype" : "Box", diff --git a/src/Builder4/Editor.vala b/src/Builder4/Editor.vala index 1b9aa6167..7fe197124 100644 --- a/src/Builder4/Editor.vala +++ b/src/Builder4/Editor.vala @@ -20,11 +20,11 @@ public class Editor : Object // my vars (def) public Xcls_MainWindow window; - public int XXX; public string activeEditor; public int pos_root_x; public int pos_root_y; public string ptype; + public int last_search_end; public string key; public Gtk.SourceSearchContext searchcontext; public JsRender.JsRender file; @@ -41,9 +41,9 @@ public class Editor : Object // my vars (dec) this.window = null; - this.XXX = 0; this.activeEditor = ""; this.ptype = ""; + this.last_search_end = 0; this.key = ""; this.searchcontext = null; this.file = null; -- 2.39.2