src/Builder4/Editor.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 21 May 2015 06:55:45 +0000 (14:55 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 May 2015 06:55:45 +0000 (14:55 +0800)
src/Builder4/Editor.vala

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

index 9d0976c..5e737c7 100644 (file)
@@ -15,7 +15,7 @@
    "# int pos_root_y" : "",
    "# string ptype" : "\"\"",
    "bool expand" : true,
-   "| void showPlainFile" : "(string fname)\n{\n    this.ptype = \"\";\n    this.key  = \"\";\n    this.node = null;\n    this.file = null;\n    string str;\n    try {\n        GLib.FileUtils.get_contents(fname, out str);\n    } catch (Error e) {\n        str = \"\";\n    }\n    \n    this.view.load(str);\n    this.key_edit.el.text = \"\";    \n\n}",
+   "| void showPlainFile" : "(string fname)\n{\n    this.ptype = \"\";\n    this.key  = \"\";\n    this.node = null;\n    this.file = null;\n    string str;\n    try {\n        GLib.FileUtils.get_contents(fname, out str);\n    } catch (Error e) {\n        str = \"\"; // a tad dangerios... - perhaps we should block editing...\n    }\n    \n    this.view.load(str);\n    this.key_edit.el.text = \"\";    \n\n}",
    "# string key" : "\"\"",
    "* pack" : "add",
    "xtype" : "Box",
index 4ba1fd1..016eb2a 100644 (file)
@@ -113,7 +113,7 @@ public class Editor : Object
         try {
             GLib.FileUtils.get_contents(fname, out str);
         } catch (Error e) {
-            str = "";
+            str = ""; // a tad dangerios... - perhaps we should block editing...
         }
         
         this.view.load(str);