Clones.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 07:44:22 +0000 (15:44 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 07:44:22 +0000 (15:44 +0800)
Clones.vala

Clones.bjs
Clones.vala

index ba9a5b3..efe3a7e 100644 (file)
            "$ pathToRepo" : "function(path) {\n\n    var tr= this.repos;\n\n    \n    for(var i =0 ; i < tr.length; i++) {\n        if (tr[i].repopath == path) {\n            return tr[i];\n        }\n    } \n    return false; \n}\n",
            "xtype" : "ListStore",
            "* pack" : "set_model",
-           "| void load" : "()\n{\n    //this.insert(citer,iter,0);\n    print(\"getting list\");\n    var tr = GitRepo.list();\n    \n    this.el.clear();\n    \n    // fixme .. sort by last updated ...\n    \n    \n    for(var i =0 ; i < tr.length; i++) {\n\t    var repo = tr.index(i);\n\t    repo.loadBranches();\n\t    \n\t    Gtk.TreeIter iter;\n\t    this.el.append(out iter);\n     \n        \n        //print(JSON.stringify(ret,null,4));\n         //tr[i].getBranches();\n         //tr[i].getStatus();\n         //var hi;\n         //try {\n             //tr[i].debug=1;\n         //     hi = tr[i].history('/', 1, 'branch', tr[i].currentBranch.name );\n//             print(JSON.stringify(hi,null,4));\n        // } catch(e) { print(e);}\n          \n        this.el.set_value(iter, 0, '' +  repo.name) );\n//        this.el.set_value(ret.iter, 1, '' + repo.currentBranch.name   );\n//        this.el.set_value(ret.iter, 2, '' + repo.branches.map(\n//                        function(e) { return e.name; \n//                    }).join(', ') \n //        );\n//        this.el.set_value(iter, 3, '' +  (!hi  ? '??' : hi[0].changed_raw));        \n        this.el.set_value(iter, 4, repo.is_autocommit() );                \n        this.el.set_value(iter, 5, repo.is_autopush() );                        \n        this.el.set_value(ret.iter, 6,  repo.repopath );  \n        // highlight color.\n        var cb = repo.currentBranch;\n        //print(JSON.stringify(cb,null,4));\n        var col = '#ffffff';\n        /*\n        if (cb.lastrev != cb.remoterev) {\n            col =  '#ff0000';\n        }\n        if (tr[i].hasLocalChanges) {\n            col =  '#0000ff';\n        }\n        if  ((cb.lastrev != cb.remoterev) && (tr[i].hasLocalChanges)) {\n            col =  '#ff00ff';\n        }\n        */\n        this.el.set_value(ret.iter, 7, col  );      \n        \n    }     \n}",
+           "| void load" : "()\n{\n    //this.insert(citer,iter,0);\n    print(\"getting list\");\n    var tr = GitRepo.list();\n    \n    this.el.clear();\n    \n    // fixme .. sort by last updated ...\n    \n    \n    for(var i =0 ; i < tr.length; i++) {\n\t    var repo = tr.index(i);\n\t    repo.loadBranches();\n\t    \n\t    Gtk.TreeIter iter;\n\t    this.el.append(out iter);\n     \n        \n        //print(JSON.stringify(ret,null,4));\n         //tr[i].getBranches();\n         //tr[i].getStatus();\n         //var hi;\n         //try {\n             //tr[i].debug=1;\n         //     hi = tr[i].history('/', 1, 'branch', tr[i].currentBranch.name );\n//             print(JSON.stringify(hi,null,4));\n        // } catch(e) { print(e);}\n          \n        this.el.set_value(iter, 0,   repo.name) );\n//        this.el.set_value(ret.iter, 1, '' + repo.currentBranch.name   );\n//        this.el.set_value(ret.iter, 2, '' + repo.branches.map(\n//                        function(e) { return e.name; \n//                    }).join(', ') \n //        );\n//        this.el.set_value(iter, 3, '' +  (!hi  ? '??' : hi[0].changed_raw));        \n        this.el.set_value(iter, 4, repo.is_autocommit() );                \n        this.el.set_value(iter, 5, repo.is_autopush() );                        \n        this.el.set_value(ret.iter, 6,  repo.repopath );  \n        // highlight color.\n        var cb = repo.currentBranch;\n        //print(JSON.stringify(cb,null,4));\n        var col = '#ffffff';\n        /*\n        if (cb.lastrev != cb.remoterev) {\n            col =  '#ff0000';\n        }\n        if (tr[i].hasLocalChanges) {\n            col =  '#0000ff';\n        }\n        if  ((cb.lastrev != cb.remoterev) && (tr[i].hasLocalChanges)) {\n            col =  '#ff00ff';\n        }\n        */\n        this.el.set_value(ret.iter, 7, col  );      \n        \n    }     \n}",
            "$ xns" : "Gtk"
           },
           {
index 5e6da46..de4ce98 100644 (file)
@@ -604,7 +604,7 @@ public class Clones : Object
         //             print(JSON.stringify(hi,null,4));
                 // } catch(e) { print(e);}
                   
-                this.el.set_value(iter, 0, '' +  repo.name) );
+                this.el.set_value(iter, 0,   repo.name) );
         //        this.el.set_value(ret.iter, 1, '' + repo.currentBranch.name   );
         //        this.el.set_value(ret.iter, 2, '' + repo.branches.map(
         //                        function(e) { return e.name;