{
"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",
}
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. "
);
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. "
);
}
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. "
);
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. "
);