From 659ef9c0685b96add8076a6cb9b8056500c14fd3 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 27 May 2015 16:12:13 +0800 Subject: [PATCH] src/Builder4/Editor.bjs src/Builder4/Editor.vala --- src/Builder4/Editor.bjs | 2 +- src/Builder4/Editor.vala | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Builder4/Editor.bjs b/src/Builder4/Editor.bjs index ccba0768f..06c2b1861 100644 --- a/src/Builder4/Editor.bjs +++ b/src/Builder4/Editor.bjs @@ -9,7 +9,7 @@ "items" : [ { "# Xcls_MainWindow window" : "null", - "| bool saveContents" : " () {\n \n \n if (_this.file == null) {\n return true;\n }\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 }\n \n \n // call the signal..\n this.save();\n \n return true;\n\n} ", + "| bool saveContents" : " () {\n \n \n if (_this.file == null) {\n return true;\n }\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.contents = str;\n }\n \n // call the signal..\n this.save();\n \n return true;\n\n} ", "# string activeEditor" : "\"\"", "# int pos_root_x" : "", "# int pos_root_y" : "", diff --git a/src/Builder4/Editor.vala b/src/Builder4/Editor.vala index 07b8417ab..1d2a1b45d 100644 --- a/src/Builder4/Editor.vala +++ b/src/Builder4/Editor.vala @@ -90,8 +90,9 @@ public class Editor : Object } else { this.node.props.set(key,str); } - } - + } else { + _this.file.contents = str; + } // call the signal.. this.save(); -- 2.39.2