Builder4/DialogSaveTemplate.bjs.NRJ9LX
authorAlan Knowles <alan@roojs.com>
Thu, 11 Sep 2014 07:24:22 +0000 (15:24 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 11 Sep 2014 07:24:22 +0000 (15:24 +0800)
Builder4/DialogSaveTemplate.bjs
Builder4/DialogSaveTemplate.js.7IO9LX
Builder4/DialogSaveTemplate.js
Builder4/DialogSaveTemplate.vala.I6U9LX
Builder4/DialogSaveTemplate.vala

Builder4/DialogSaveTemplate.bjs
Builder4/DialogSaveTemplate.js
Builder4/DialogSaveTemplate.vala

index 2b6eff1..5cf3de8 100644 (file)
@@ -9,7 +9,7 @@
         {
             "listeners" : {
                 "delete_event" : " (self, event) => {\n    this.el.hide();\n    return true;\n    \n}",
-                "response" : "(self, response_id) => {\n\n    if (response_id < 1) {\n        this.el.hide();\n         return;\n    }\n    var name = _this.name.el.get_text();\n    if (name.length < 1) {\n        StandardErrorDialog.show(\n            this.el,\n            \"You must give the template a name. \"\n        );\n        return;\n    }\n    if (!Regex.match_simple (\"^[A-Za-z]+$\", name) || \n        !Regex.match_simple (\"^[A-Za-z ]+$\", name) )\n    {\n        StandardErrorDialog.show(\n            this.el,\n            \"Template Nane must contain only letters and spaces. \"\n        );\n         return;\n    }\n    _this.palete.saveTemplate(name, _this.data);\n    // now we save it..\n    this.el.hide();\n    \n}"
+                "response" : "(self, response_id) => {\n\n    if (response_id < 1) {\n        this.el.hide();\n         return;\n    }\n    var name = _this.name.el.get_text();\n    if (name.length < 1) {\n        StandardErrorDialog.singleton().show(\n            this.el,\n            \"You must give the template a name. \"\n        );\n        return;\n    }\n    if (!Regex.match_simple (\"^[A-Za-z]+$\", name) || \n        !Regex.match_simple (\"^[A-Za-z ]+$\", name) )\n    {\n        StandardErrorDialog.singleton().show(\n            this.el,\n            \"Template Nane must contain only letters and spaces. \"\n        );\n         return;\n    }\n    _this.palete.saveTemplate(name, _this.data);\n    // now we save it..\n    this.el.hide();\n    \n}"
             },
             "default_width" : 400,
             "| static void show" : " (Gtk.Window parent, Palete.Palete palete, JsRender.Node data) {\n \n    \n \n     var t =DialogSaveTemplate;\n    if (t == null) {\n       t =   new Xcls_DialogSaveTemplate();\n    }\n    t.el.set_transient_for(parent);\n    t.data = data;\n    t.palete = palete;\n    t.name.el.set_text(\"\");\n    t.el.show_all();\n}\n",
index 6459465..08aa110 100644 (file)
@@ -45,7 +45,7 @@ DialogSaveTemplate=new XObject({
               }
               var name = _this.name.el.get_text();
               if (name.length < 1) {
-                  StandardErrorDialog.show(
+                  StandardErrorDialog.singleton().show(
                       this.el,
                       "You must give the template a name. "
                   );
@@ -54,7 +54,7 @@ DialogSaveTemplate=new XObject({
               if (!Regex.match_simple ("^[A-Za-z]+$", name) || 
                   !Regex.match_simple ("^[A-Za-z ]+$", name) )
               {
-                  StandardErrorDialog.show(
+                  StandardErrorDialog.singleton().show(
                       this.el,
                       "Template Nane must contain only letters and spaces. "
                   );
index 5b315d3..cf8c4e6 100644 (file)
@@ -54,7 +54,7 @@ public class DialogSaveTemplate : Object
             }
             var name = _this.name.el.get_text();
             if (name.length < 1) {
-                StandardErrorDialog.show(
+                StandardErrorDialog.singleton().show(
                     this.el,
                     "You must give the template a name. "
                 );
@@ -63,7 +63,7 @@ public class DialogSaveTemplate : Object
             if (!Regex.match_simple ("^[A-Za-z]+$", name) || 
                 !Regex.match_simple ("^[A-Za-z ]+$", name) )
             {
-                StandardErrorDialog.show(
+                StandardErrorDialog.singleton().show(
                     this.el,
                     "Template Nane must contain only letters and spaces. "
                 );