],
"string id" : "Editor",
"xtype" : "Box",
- "| bool saveContents" : [
- " () {",
- " ",
- " ",
- " if (_this.file == null) {",
- " return true;",
- " }",
- " ",
- " ",
- " ",
- " ",
- " ",
- " var str = _this.buffer.toString();",
- " ",
- " _this.buffer.checkSyntax();",
- " ",
- " ",
- " ",
- " // LeftPanel.model.changed( str , false);",
- " _this.dirty = false;",
- " _this.save_button.el.sensitive = false;",
- " ",
- " // find the text for the node..",
- " if (_this.file.xtype != \"PlainFile\") {",
- " if (ptype == \"listener\") {",
- " this.node.listeners.set(key,str);",
- " ",
- " } else {",
- " this.node.props.set(key,str);",
- " }",
- " } else {",
- " _this.file.setSource( str );",
- " }",
- " ",
- " // call the signal..",
- " this.save();",
- " ",
- " return true;",
- "",
- "} "
- ],
"| void scroll_to_line" : [
"(int line) {",
"",
}
// user defined functions
- public bool saveContents () {
-
-
- if (_this.file == null) {
- return true;
- }
-
-
-
-
-
- var str = _this.buffer.toString();
-
- _this.buffer.checkSyntax();
-
-
-
- // LeftPanel.model.changed( str , false);
- _this.dirty = false;
- _this.save_button.el.sensitive = false;
-
- // find the text for the node..
- if (_this.file.xtype != "PlainFile") {
- if (ptype == "listener") {
- this.node.listeners.set(key,str);
-
- } else {
- this.node.props.set(key,str);
- }
- } else {
- _this.file.setSource( str );
- }
-
- // call the signal..
- this.save();
-
- return true;
-
- }
public void scroll_to_line (int line) {
GLib.Timeout.add(500, () => {