NewBranch.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 08:44:28 +0000 (16:44 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 08:44:28 +0000 (16:44 +0800)
NewBranch.vala

NewBranch.bjs
NewBranch.vala

index d724810..ff1c0ab 100644 (file)
     "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        // store the module...\n        _this.file.build_module = \"\";        \n         Gtk.TreeIter iter; \n        if (_this.build_module.el.get_active_iter (out iter)) {\n             Value vfname;\n             this.dbmodel.el.get_value (iter, 0, out vfname);\n             if (((string)vfname).length > 0) {\n                 _this.file.build_module = (string)vfname;\n             }\n    \n        }\n        \n        \n\n                                                    \n}    ",
-   "@ void success" : "(Project.Project pr, JsRender.JsRender file)",
    "id" : "DialogNewComponent",
    "default_width" : 500,
    "$ deletable" : true,
-   "# Project.Project project" : "",
    "title" : "New Component",
    "xtype" : "Dialog",
-   "|   void show" : "(JsRender.JsRender c) \n{\n    this.project = c.project;\n    \n    //if (!this.el) {\n        //this.init();\n     //}\n    \n    _this.name.el.set_text(c.name);\n    _this.title.el.set_text(c.title);\n    _this.parent.el.set_text(c.parent);    \n    _this.region.el.set_text(c.region);\n    _this.modOrder.el.set_text(c.modOrder);\n     _this.permname.el.set_text(c.permname);\n    \n    if (c.path.length > 0) {\n        this.el.set_title(\"Edit File Details - \" + c.name);\n    } else {\n        this.el.set_title(\"Create New File\");\n    }\n    \n     var ar = new Gee.ArrayList<string>();\n     _this.dbmodel.loadData(ar,\"\");\n    // load the modules... if relivant..\n    if (this.project.xtype == \"Gtk\") {\n        var p = (Project.Gtk)c.project;\n          var cg = p.compilegroups;\n\n        var iter = cg.map_iterator();\n       while(iter.next()) {\n            var key = iter.get_key();\n            if (key == \"_default_\") {\n                continue;\n            }\n            ar.add(key);\n        };\n        _this.dbmodel.loadData(ar, c.build_module);\n\n    }\n    \n     \n    _this.file = c;\n    //console.log('show all');\n    this.el.show_all();\n    \n    //this.success = c.success;\n    \n    \n}",
-   "# JsRender.JsRender file" : "null",
+   "|   void show" : "( ) \n{\n    \n    \n    //this.success = c.success;\n    \n    \n}",
    "default_height" : 200,
    "$ modal" : true,
    "$ xns" : "Gtk",
index 26efcee..e75d2d5 100644 (file)
@@ -23,9 +23,6 @@ public class Xcls_DialogNewComponent : Object
     public Xcls_dbmodel dbmodel;
 
         // my vars (def)
-    public signal void success (Project.Project pr, JsRender.JsRender file);
-    public Project.Project project;
-    public JsRender.JsRender file;
 
     // ctor
     public Xcls_DialogNewComponent()
@@ -34,7 +31,6 @@ public class Xcls_DialogNewComponent : Object
         this.el = new Gtk.Dialog();
 
         // my vars (dec)
-        this.file = null;
 
         // set gobject values
         this.el.title = "New Component";
@@ -96,50 +92,9 @@ public class Xcls_DialogNewComponent : Object
     
                                                         
     }
-    public   void show (JsRender.JsRender c
+    public   void show ( 
     {
-        this.project = c.project;
         
-        //if (!this.el) {
-            //this.init();
-         //}
-        
-        _this.name.el.set_text(c.name);
-        _this.title.el.set_text(c.title);
-        _this.parent.el.set_text(c.parent);    
-        _this.region.el.set_text(c.region);
-        _this.modOrder.el.set_text(c.modOrder);
-         _this.permname.el.set_text(c.permname);
-        
-        if (c.path.length > 0) {
-            this.el.set_title("Edit File Details - " + c.name);
-        } else {
-            this.el.set_title("Create New File");
-        }
-        
-         var ar = new Gee.ArrayList<string>();
-         _this.dbmodel.loadData(ar,"");
-        // load the modules... if relivant..
-        if (this.project.xtype == "Gtk") {
-            var p = (Project.Gtk)c.project;
-              var cg = p.compilegroups;
-    
-            var iter = cg.map_iterator();
-           while(iter.next()) {
-                var key = iter.get_key();
-                if (key == "_default_") {
-                    continue;
-                }
-                ar.add(key);
-            };
-            _this.dbmodel.loadData(ar, c.build_module);
-    
-        }
-        
-         
-        _this.file = c;
-        //console.log('show all');
-        this.el.show_all();
         
         //this.success = c.success;