Clones.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 08:58:42 +0000 (16:58 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 08:58:42 +0000 (16:58 +0800)
Clones.vala
NewBranch.bjs
NewBranch.vala
config1.builder

Clones.bjs
Clones.vala

index c6338e2..0c223b2 100644 (file)
@@ -45,7 +45,7 @@
         },
         {
          "listeners" : {
-          "clicked" : "() => {\n/*\n    var rv = this.get('/reposView');\n    var rs = this.get('/reposStore');\n    if (rv.el.get_selection().count_selected_rows() != 1) {\n        //nothing?\n        // error condition.\n        return;\n    }\n    var Branches =     imports.Branches.Branches;\n    \n \n    var ret = {};       \n    var s = rv.el.get_selection();\n    var path = '';\n    s.selected_foreach(function(model,p,iter) {\n                                                    \n       path = model.get_value(iter, 6).value.get_string();\n     \n    }); \n\n    var repo = false;\n    rs.repos.forEach(function(r) {\n        if (r.repopath == path) {\n            repo = r;\n        \n        }\n    \n    });\n    Branches.repo = repo;\n    Branches.el.set_transient_for(Clones.el);\n    Clones.el.set_title(\"Manage Clones - \" + repo.repopath);\n    Branches.show();\n    Clones.el.set_title(\"Manage Clones\");\n\n     \n    \n    \n    \n\n       \n */   \n    \n}"
+          "clicked" : "() => {\n// \n\n\tNewBranch.singleton().show();\n\n/*\n    var rv = this.get('/reposView');\n    var rs = this.get('/reposStore');\n    if (rv.el.get_selection().count_selected_rows() != 1) {\n        //nothing?\n        // error condition.\n        return;\n    }\n    var Branches =     imports.Branches.Branches;\n    \n \n    var ret = {};       \n    var s = rv.el.get_selection();\n    var path = '';\n    s.selected_foreach(function(model,p,iter) {\n                                                    \n       path = model.get_value(iter, 6).value.get_string();\n     \n    }); \n\n    var repo = false;\n    rs.repos.forEach(function(r) {\n        if (r.repopath == path) {\n            repo = r;\n        \n        }\n    \n    });\n    Branches.repo = repo;\n    Branches.el.set_transient_for(Clones.el);\n    Clones.el.set_title(\"Manage Clones - \" + repo.repopath);\n    Branches.show();\n    Clones.el.set_title(\"Manage Clones\");\n\n     \n    \n    \n    \n\n       \n */   \n    \n}"
          },
          "label" : "Branches",
          "* pack" : "add",
index 17b0038..01c2623 100644 (file)
@@ -242,6 +242,10 @@ public class Clones : Object
 
             //listeners
             this.el.clicked.connect( () => {
+            // 
+            
+               NewBranch.singleton().show();
+            
             /*
                 var rv = this.get('/reposView');
                 var rs = this.get('/reposStore');