src/Builder4/EditProject.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 09:05:16 +0000 (17:05 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 09:05:16 +0000 (17:05 +0800)
src/Builder4/EditProject.vala

src/Builder4/EditProject.bjs
src/Builder4/EditProject.vala

index d8c9ac5..bd4fe08 100644 (file)
@@ -1,97 +1,97 @@
 {
-    "id": "file-gtk-8",
-    "name": "EditProject",
-    "parent": "",
-    "title": false,
-    "path": "/home/alan/gitlive/app.Builder.js/Builder4/EditProject.bjs",
-    "items": [
+ "name" : "EditProject",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/EditProject.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "",
+ "items" : [
+  {
+   "listeners" : {
+    "destroy_event" : " (self, event) => {\n  this.el.response(0);\n//     this.el.hide();\n    return false;\n}"
+   },
+   "default_width" : 600,
+   "$ deletable" : true,
+   "title" : "Project Properties",
+   "xtype" : "Dialog",
+   "default_height" : 500,
+   "| Project.Project? show" : "() {\n      \n\n    //[ 'xtype'  ].forEach(function(k) {\n    //    _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);\n    //});\n\t// shouild set path..\n    _this.model.loadData();\n    this.el.show_all();\n    \n    var err_dialog = StandardErrorDialog.singleton();\n\n    var id = -1;\n    while (id < 0) {\n         id =  this.el.run();\n         if (id < 1) {\n                this.el.hide();\n                return null;\n        }\n \n         \n          if (_this.xtype.getValue().length < 1) {\n               \n                err_dialog.show(_this.el,\"You have to set Project type\");             \n                id = -1;\n                continue;\n            }\n            if (_this.dir.el.get_filename().length < 1) {\n \n                err_dialog.show(_this.el,\"You have to select a folder\");             \n                id = -1;\n                continue;\n            }\n           \n    }\n    \n    this.el.hide();\n    \n    \n    \n \n    var fn = _this.dir.el.get_filename();\n    print(\"add %s\\n\" , fn);\n    \n    var project = Project.Project.factory(_this.xtype.getValue(), fn);\n    project.save();\n    Project.projects.set(project.name,project);\n    \n    //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);\n    \n    return project;\n\n    \n    //this.success = c.success;\n}\n",
+   "$ modal" : true,
+   "$ xns" : "Gtk",
+   "border_width" : 3,
+   "name" : "EditProject",
+   "items" : [
+    {
+     "$ pack" : " get_content_area().add \n \n",
+     "xtype" : "VBox",
+     "$ xns" : "Gtk",
+     "$ homogeneous" : false,
+     "items" : [
+      {
+       "xtype" : "HBox",
+       "* pack" : "pack_start,false,true,3",
+       "$ xns" : "Gtk",
+       "$ homogeneous" : false,
+       "items" : [
         {
-            "listeners": {
-                "destroy_event": " (self, event) => {\n  this.el.response(0);\n//     this.el.hide();\n    return false;\n}"
-            },
-            "border_width": 3,
-            "default_height": 500,
-            "default_width": 600,
-            "name": "EditProject",
-            "title": "Project Properties",
-            "xtype": "Dialog",
-            "|Project.Project?:show": "() {\n      \n\n    //[ 'xtype'  ].forEach(function(k) {\n    //    _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);\n    //});\n\t// shouild set path..\n    _this.model.loadData();\n    this.el.show_all();\n    \n    var err_dialog = StandardErrorDialog.singleton();\n\n    var id = -1;\n    while (id < 0) {\n         id =  this.el.run();\n         if (id < 1) {\n                this.el.hide();\n                return null;\n        }\n\n         \n          if (_this.xtype.getValue().length < 1) {\n               \n                err_dialog.show(_this.el,\"You have to set Project type\");             \n                id = -1;\n                continue;\n            }\n            if (_this.dir.el.get_filename().length < 1) {\n \n                err_dialog.show(_this.el,\"You have to select a folder\");             \n                id = -1;\n                continue;\n            }\n           \n    }\n    \n    this.el.hide();\n    \n    \n    \n \n    var fn = _this.dir.el.get_filename();\n    print(\"add %s\\n\" , fn);\n    \n    var project = Project.Project.factory(_this.xtype.getValue(), fn);\n    project.save();\n    Project.projects.set(project.name,project);\n    \n    //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);\n    \n    return project;\n\n    \n    //this.success = c.success;\n}\n",
-            "|deletable": "true",
-            "|modal": "true",
-            "|xns": "Gtk",
-            "items": [
-                {
-                    "|homogeneous": "false",
-                    "xtype": "VBox",
-                    "|pack": " get_content_area().add \n \n",
-                    "|xns": "Gtk",
-                    "items": [
-                        {
-                            "|homogeneous": "false",
-                            "pack": "pack_start,false,true,3",
-                            "xtype": "HBox",
-                            "|xns": "Gtk",
-                            "items": [
-                                {
-                                    "|xns": "Gtk",
-                                    "xtype": "Label",
-                                    "pack": "pack_start,false,true,3",
-                                    "label": "Project type :"
-                                },
-                                {
-                                    "id": "xtype",
-                                    "pack": "pack_end,true,true,3",
-                                    "xtype": "ComboBox",
-                                    "|init": " this.el.add_attribute(_this.cellrender.el , \"markup\", 1 );  \n \n",
-                                    "|setValue": " (v)    {\n        var el = this.el;\n        el.set_active(-1);\n        \n        for (var i =0;i < this.data.length; i++ ) {\n            if (v == this.data.nth_datA(i)) {\n                el.set_active(ix);\n                return false;\n            }\n        }\n    }",
-                                    "|string:getValue": " () {\n     var ix = this.el.get_active();\n        if (ix < 0 ) {\n            return \"\";\n        }\n        switch(ix) {\n            case 0:\n                return \"Roo\";\n            case 1:\n                return \"Gtk\";\n        }\n        return \"\";\n}\n",
-                                    "|xns": "Gtk",
-                                    "items": [
-                                        {
-                                            "id": "cellrender",
-                                            "pack": "pack_start,true",
-                                            "xtype": "CellRendererText",
-                                            "|xns": "Gtk"
-                                        },
-                                        {
-                                            "|columns": "typeof(string),typeof(string)",
-                                            "id": "model",
-                                            "n_columns": 2,
-                                            "pack": "set_model",
-                                            "xtype": "ListStore",
-                                            "|void:loadData": "  ( ) {\n        this.el.clear();\n                      \n        Gtk.TreeIter iter;\n                \n        el.append(out iter);\n        \n        el.set_value(iter, 0, \"Roo\");\n        el.set_value(iter, 1, \"Roo Project\");\n         el.append(out iter);\n        \n        el.set_value(iter, 0, \"Gtk\");\n        el.set_value(iter, 1, \"Gtk Project\");\n         \n              \n                                     \n}\n",
-                                            "|xns": "Gtk"
-                                        }
-                                    ]
-                                }
-                            ]
-                        },
-                        {
-                            "|create_folders": "false",
-                            "id": "dir",
-                            "pack": "pack_end,true,true,5",
-                            "xtype": "FileChooserWidget",
-                            "|action": "Gtk.FileChooserAction.SELECT_FOLDER",
-                            "|select_multiple": "false",
-                            "|xns": "Gtk"
-                        }
-                    ]
-                },
-                {
-                    "label": "OK",
-                    "pack": "add_action_widget,1",
-                    "xtype": "Button",
-                    "|xns": "Gtk"
-                },
-                {
-                    "|xns": "Gtk",
-                    "xtype": "Button",
-                    "pack": "add_action_widget,0",
-                    "label": "Cancel"
-                }
-            ]
+         "label" : "Project type :",
+         "* pack" : "pack_start,false,true,3",
+         "xtype" : "Label",
+         "$ xns" : "Gtk"
+        },
+        {
+         "| string getValue" : " () {\n     var ix = this.el.get_active();\n        if (ix < 0 ) {\n            return \"\";\n        }\n        switch(ix) {\n            case 0:\n                return \"Roo\";\n            case 1:\n                return \"Gtk\";\n        }\n        return \"\";\n}\n",
+         "id" : "xtype",
+         "| setValue" : " (v)    {\n        var el = this.el;\n        el.set_active(-1);\n        \n        for (var i =0;i < this.data.length; i++ ) {\n            if (v == this.data.nth_datA(i)) {\n                el.set_active(ix);\n                return false;\n            }\n        }\n    }",
+         "* init" : " this.el.add_attribute(_this.cellrender.el , \"markup\", 1 );  \n \n",
+         "xtype" : "ComboBox",
+         "* pack" : "pack_end,true,true,3",
+         "$ xns" : "Gtk",
+         "items" : [
+          {
+           "id" : "cellrender",
+           "xtype" : "CellRendererText",
+           "* pack" : "pack_start,true",
+           "$ xns" : "Gtk"
+          },
+          {
+           "id" : "model",
+           "* pack" : "set_model",
+           "xtype" : "ListStore",
+           "$ columns" : "typeof(string),typeof(string)",
+           "n_columns" : 2,
+           "$ xns" : "Gtk",
+           "| void loadData" : "  ( ) {\n        this.el.clear();\n                      \n        Gtk.TreeIter iter;\n                \n        el.append(out iter);\n        \n        el.set_value(iter, 0, \"Roo\");\n        el.set_value(iter, 1, \"Roo Project\");\n         el.append(out iter);\n        \n        el.set_value(iter, 0, \"Gtk\");\n        el.set_value(iter, 1, \"Gtk Project\");\n         \n              \n                                     \n}\n"
+          }
+         ]
         }
-    ],
-    "permname": "",
-    "modOrder": ""
+       ]
+      },
+      {
+       "$ create_folders" : false,
+       "id" : "dir",
+       "$ action" : "Gtk.FileChooserAction.SELECT_FOLDER",
+       "* pack" : "pack_end,true,true,5",
+       "xtype" : "FileChooserWidget",
+       "$ xns" : "Gtk",
+       "$ select_multiple" : false
+      }
+     ]
+    },
+    {
+     "label" : "OK",
+     "xtype" : "Button",
+     "* pack" : "add_action_widget,1",
+     "$ xns" : "Gtk"
+    },
+    {
+     "label" : "Cancel",
+     "* pack" : "add_action_widget,0",
+     "xtype" : "Button",
+     "$ xns" : "Gtk"
+    }
+   ]
+  }
+ ]
 }
\ No newline at end of file
index 0203eec..4ccf0ba 100644 (file)
@@ -1,62 +1,43 @@
-/* -- to compile
-valac  --pkg gio-2.0  --pkg posix  --pkg gtk+-3.0 --pkg libnotify --pkg gtksourceview-3.0  --pkg  libwnck-3.0 \
-    /tmp/EditProject.vala  -o /tmp/EditProject
-*/
-
-
-/* -- to test class
-static int main (string[] args) {
-    Gtk.init (ref args);
-    new Xcls_EditProject();
-    EditProject.show_all();
-     Gtk.main ();
-    return 0;
-}
-*/
-
+static EditProject  _EditProject;
 
-public static Xcls_EditProject  EditProject;
-
-public class Xcls_EditProject : Object 
+public class EditProject : Object
 {
     public Gtk.Dialog el;
-    private Xcls_EditProject  _this;
+    private EditProject  _this;
 
-    public static Xcls_EditProject singleton()
+    public static EditProject singleton()
     {
-        if (EditProject == null) {
-            EditProject= new Xcls_EditProject();
+        if (_EditProject == null) {
+            _EditProject= new EditProject();
         }
-        return EditProject;
+        return _EditProject;
     }
     public Xcls_xtype xtype;
     public Xcls_cellrender cellrender;
     public Xcls_model model;
     public Xcls_dir dir;
 
-        // my vars
+        // my vars (def)
 
-        // ctor 
-    public Xcls_EditProject()
+    // ctor
+    public EditProject()
     {
         _this = this;
         this.el = new Gtk.Dialog();
 
-        // my vars
+        // my vars (dec)
 
         // set gobject values
+        this.el.title = "Project Properties";
+        this.el.name = "EditProject";
         this.el.border_width = 3;
         this.el.default_height = 500;
         this.el.default_width = 600;
         this.el.deletable = true;
         this.el.modal = true;
-        this.el.name = "EditProject";
-        this.el.title = "Project Properties";
         var child_0 = new Xcls_VBox2( _this );
         child_0.ref();
-        this.el. get_content_area().add 
- (  child_0.el  );
+        this.el.get_content_area().add (  child_0.el  );
         var child_1 = new Xcls_Button9( _this );
         child_1.ref();
         this.el.add_action_widget (  child_1.el , 1 );
@@ -64,87 +45,85 @@ public class Xcls_EditProject : Object
         child_2.ref();
         this.el.add_action_widget (  child_2.el , 0 );
 
-        // listeners 
-        this.el.destroy_event.connect(  (self, event) => {
+        //listeners
+        this.el.destroy_event.connect( (self, event) => {
           this.el.response(0);
         //     this.el.hide();
             return false;
-        } );
+        });
     }
 
-    // userdefined functions 
-    public Project.Project? show() {
-              
-        
-            //[ 'xtype'  ].forEach(function(k) {
-            //    _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);
-            //});
-               // shouild set path..
-            _this.model.loadData();
-            this.el.show_all();
-            
-            var err_dialog = StandardErrorDialog.singleton();
+    // user defined functions
+    public Project.Project? show () {
+          
+    
+        //[ 'xtype'  ].forEach(function(k) {
+        //    _this.get(k).setValue(typeof(c[k]) == 'undefined' ? '' : c[k]);
+        //});
+       // shouild set path..
+        _this.model.loadData();
+        this.el.show_all();
         
-            var id = -1;
-            while (id < 0) {
-                 id =  this.el.run();
-                 if (id < 1) {
-                        this.el.hide();
-                        return null;
+        var err_dialog = StandardErrorDialog.singleton();
+    
+        var id = -1;
+        while (id < 0) {
+             id =  this.el.run();
+             if (id < 1) {
+                    this.el.hide();
+                    return null;
+            }
+     
+             
+              if (_this.xtype.getValue().length < 1) {
+                   
+                    err_dialog.show(_this.el,"You have to set Project type");             
+                    id = -1;
+                    continue;
+                }
+                if (_this.dir.el.get_filename().length < 1) {
+     
+                    err_dialog.show(_this.el,"You have to select a folder");             
+                    id = -1;
+                    continue;
                 }
+               
+        }
         
-                 
-                  if (_this.xtype.getValue().length < 1) {
-                       
-                        err_dialog.show(_this.el,"You have to set Project type");             
-                        id = -1;
-                        continue;
-                    }
-                    if (_this.dir.el.get_filename().length < 1) {
-         
-                        err_dialog.show(_this.el,"You have to select a folder");             
-                        id = -1;
-                        continue;
-                    }
-                   
-            }
-            
-            this.el.hide();
-            
-            
-            
-         
-            var fn = _this.dir.el.get_filename();
-            print("add %s\n" , fn);
-            
-            var project = Project.Project.factory(_this.xtype.getValue(), fn);
-            project.save();
-            Project.projects.set(project.name,project);
-            
-            //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);
-            
-            return project;
+        this.el.hide();
         
-            
-            //this.success = c.success;
-        }
-
-    // skip |xns - no return type
-    public class Xcls_VBox2 : Object 
+        
+        
+     
+        var fn = _this.dir.el.get_filename();
+        print("add %s\n" , fn);
+        
+        var project = Project.Project.factory(_this.xtype.getValue(), fn);
+        project.save();
+        Project.projects.set(project.name,project);
+        
+        //var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);
+        
+        return project;
+    
+        
+        //this.success = c.success;
+    }
+    public class Xcls_VBox2 : Object
     {
         public Gtk.VBox el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_VBox2(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_VBox2(EditProject _owner )
         {
             _this = _owner;
             this.el = new Gtk.VBox( false, 0 );
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
             var child_0 = new Xcls_HBox3( _this );
@@ -155,25 +134,23 @@ public class Xcls_EditProject : Object
             this.el.pack_end (  child_1.el , true,true,5 );
         }
 
-        // userdefined functions 
-
-        // skip |xns - no return type
+        // user defined functions
     }
-    public class Xcls_HBox3 : Object 
+    public class Xcls_HBox3 : Object
     {
         public Gtk.HBox el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_HBox3(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_HBox3(EditProject _owner )
         {
             _this = _owner;
             this.el = new Gtk.HBox( false, 0 );
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
             var child_0 = new Xcls_Label4( _this );
@@ -184,49 +161,46 @@ public class Xcls_EditProject : Object
             this.el.pack_end (  child_1.el , true,true,3 );
         }
 
-        // userdefined functions 
-
-        // skip |xns - no return type
+        // user defined functions
     }
-    public class Xcls_Label4 : Object 
+    public class Xcls_Label4 : Object
     {
         public Gtk.Label el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_Label4(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_Label4(EditProject _owner )
         {
             _this = _owner;
             this.el = new Gtk.Label( "Project type :" );
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
         }
 
-        // userdefined functions 
-
-        // skip |xns - no return type
+        // user defined functions
     }
-    public class Xcls_xtype : Object 
+
+    public class Xcls_xtype : Object
     {
         public Gtk.ComboBox el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_xtype(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_xtype(EditProject _owner )
         {
             _this = _owner;
             _this.xtype = this;
             this.el = new Gtk.ComboBox();
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
             var child_0 = new Xcls_cellrender( _this );
@@ -236,167 +210,172 @@ public class Xcls_EditProject : Object
             child_1.ref();
             this.el.set_model (  child_1.el  );
 
-            // init method 
-             this.el.add_attribute(_this.cellrender.el , "markup", 1 );  
-             
-        }
+            // init method
 
-        // userdefined functions 
+            this.el.add_attribute(_this.cellrender.el , "markup", 1 );
+        }
 
-        // skip |setValue - no return type
+        // user defined functions
         public string getValue () {
-                 var ix = this.el.get_active();
-                    if (ix < 0 ) {
-                        return "";
-                    }
-                    switch(ix) {
-                        case 0:
-                            return "Roo";
-                        case 1:
-                            return "Gtk";
-                    }
+             var ix = this.el.get_active();
+                if (ix < 0 ) {
                     return "";
+                }
+                switch(ix) {
+                    case 0:
+                        return "Roo";
+                    case 1:
+                        return "Gtk";
+                }
+                return "";
+        }
+        public setValue (v)    {
+                var el = this.el;
+                el.set_active(-1);
+                
+                for (var i =0;i < this.data.length; i++ ) {
+                    if (v == this.data.nth_datA(i)) {
+                        el.set_active(ix);
+                        return false;
+                    }
+                }
             }
-
-        // skip |xns - no return type
     }
-    public class Xcls_cellrender : Object 
+    public class Xcls_cellrender : Object
     {
         public Gtk.CellRendererText el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_cellrender(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_cellrender(EditProject _owner )
         {
             _this = _owner;
             _this.cellrender = this;
             this.el = new Gtk.CellRendererText();
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
         }
 
-        // userdefined functions 
-
-        // skip |xns - no return type
+        // user defined functions
     }
-    public class Xcls_model : Object 
+
+    public class Xcls_model : Object
     {
         public Gtk.ListStore el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_model(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_model(EditProject _owner )
         {
             _this = _owner;
             _this.model = this;
             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
         }
 
-        // userdefined functions 
-        public void loadData  ( ) {
-                    this.el.clear();
-                                  
-                    Gtk.TreeIter iter;
-                            
-                    el.append(out iter);
-                    
-                    el.set_value(iter, 0, "Roo");
-                    el.set_value(iter, 1, "Roo Project");
-                     el.append(out iter);
-                    
-                    el.set_value(iter, 0, "Gtk");
-                    el.set_value(iter, 1, "Gtk Project");
-                     
-                          
-                                                 
-            }
-
-        // skip |xns - no return type
+        // user defined functions
+        public void loadData ( ) {
+                this.el.clear();
+                              
+                Gtk.TreeIter iter;
+                        
+                el.append(out iter);
+                
+                el.set_value(iter, 0, "Roo");
+                el.set_value(iter, 1, "Roo Project");
+                 el.append(out iter);
+                
+                el.set_value(iter, 0, "Gtk");
+                el.set_value(iter, 1, "Gtk Project");
+                 
+                      
+                                             
+        }
     }
-    public class Xcls_dir : Object 
+
+
+
+    public class Xcls_dir : Object
     {
         public Gtk.FileChooserWidget el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_dir(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_dir(EditProject _owner )
         {
             _this = _owner;
             _this.dir = this;
             this.el = new Gtk.FileChooserWidget( Gtk.FileChooserAction.SELECT_FOLDER );
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
             this.el.create_folders = false;
             this.el.select_multiple = false;
         }
 
-        // userdefined functions 
-
-        // skip |xns - no return type
+        // user defined functions
     }
-    public class Xcls_Button9 : Object 
+
+
+    public class Xcls_Button9 : Object
     {
         public Gtk.Button el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_Button9(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_Button9(EditProject _owner )
         {
             _this = _owner;
             this.el = new Gtk.Button();
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
             this.el.label = "OK";
         }
 
-        // userdefined functions 
-
-        // skip |xns - no return type
+        // user defined functions
     }
-    public class Xcls_Button10 : Object 
+
+    public class Xcls_Button10 : Object
     {
         public Gtk.Button el;
-        private Xcls_EditProject  _this;
+        private EditProject  _this;
 
 
-            // my vars
+            // my vars (def)
 
-            // ctor 
-        public Xcls_Button10(Xcls_EditProject _owner )
+        // ctor
+        public Xcls_Button10(EditProject _owner )
         {
             _this = _owner;
             this.el = new Gtk.Button();
 
-            // my vars
+            // my vars (dec)
 
             // set gobject values
             this.el.label = "Cancel";
         }
 
-        // userdefined functions 
-
-        // skip |xns - no return type
+        // user defined functions
     }
+
 }