src/Builder4/DialogPluginWebkit.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 16 Apr 2015 08:42:03 +0000 (16:42 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 16 Apr 2015 08:42:03 +0000 (16:42 +0800)
src/Builder4/DialogPluginWebkit.vala
src/Builder4/DialogNewComponent.bjs
src/Builder4/DialogNewComponent.vala

src/Builder4/DialogNewComponent.bjs
src/Builder4/DialogPluginWebkit.bjs
src/Builder4/DialogPluginWebkit.vala

index 2a5a58f..86d43e1 100644 (file)
@@ -13,8 +13,8 @@
     "show" : "(self)  => {\n  this.el.show_all();\n  //test\n}"
    },
    "|   void updateFileFromEntry" : "() {\n\n        _this.file.title = _this.title.el.get_text();\n        _this.file.region = _this.region.el.get_text();            \n        _this.file.parent = _this.parent.el.get_text();                        \n        _this.file.permname = _this.permname.el.get_text();                                    \n        _this.file.modOrder = _this.modOrder.el.get_text();\n        \n        if (_this.file.name.length  > 0 && _this.file.name != _this.name.el.get_text()) {\n            _this.file.renameTo(_this.name.el.get_text());\n        }\n                                                    \n}    ",
-   "id" : "DialogNewComponent",
    "@ void success" : "(Project.Project pr, JsRender.JsRender file)",
+   "id" : "DialogNewComponent",
    "default_width" : 500,
    "$ deletable" : true,
    "# Project.Project project" : "",
@@ -74,8 +74,8 @@
         },
         {
          "label" : "Region",
-         "$ visible" : true,
          "tooltip_text" : "center, north, south, east, west",
+         "$ visible" : true,
          "xalign" : 0.90000000000000002,
          "* pack" : "attach_defaults,0,1,2,3",
          "xtype" : "Label",
     },
     {
      "label" : "Cancel",
-     "xtype" : "Button",
      "* pack" : "add_action_widget,0",
+     "xtype" : "Button",
      "$ xns" : "Gtk"
     },
     {
      "label" : "OK",
-     "xtype" : "Button",
      "* pack" : "add_action_widget,1",
+     "xtype" : "Button",
      "$ xns" : "Gtk"
     }
    ]
index 8bda705..ca35f4b 100644 (file)
@@ -7,6 +7,9 @@
  "modOrder" : "",
  "items" : [
   {
+   "listeners" : {
+    "delete_event" : "(self, event) => {\n    this.el.hide();\n    return true; \n    //test  \n}\n "
+   },
    "id" : "DialogPluginWebkit",
    "utf8 title" : "Add / Edit Component",
    "gint default_height" : 500,
index 5fb526c..8d1ef6e 100644 (file)
@@ -33,6 +33,13 @@ public class Xcls_DialogPluginWebkit : Object
         var child_0 = new Xcls_VBox2( _this );
         child_0.ref();
         this.el.get_content_area().add (  child_0.el  );
+
+        // listeners 
+        this.el.delete_event.connect( (self, event) => {
+            this.el.hide();
+            return true; 
+            //test  
+        });
     }
 
     // user defined functions