Clones.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 13 Sep 2011 03:25:32 +0000 (11:25 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 13 Sep 2011 03:25:32 +0000 (11:25 +0800)
Clones.bjs

index 4e2fe1e..54b9c6d 100644 (file)
@@ -98,7 +98,7 @@
                                             "pack": "set_model",
                                             "xtype": "ListStore",
                                             "|init": "function() {\n    XObject.prototype.init.call(this);\n    this.el.set_column_types ( 8, [\n       GObject.TYPE_STRING, // repo  \n      GObject.TYPE_STRING, // current branch\n      GObject.TYPE_STRING, // all branch      \n      GObject.TYPE_STRING, // updated\n       GObject.TYPE_BOOLEAN, // auto-commit\n        GObject.TYPE_BOOLEAN, // auto-push\n           GObject.TYPE_STRING, // repopath\n           GObject.TYPE_STRING // color highighling \n  ] );\n}\n",
-                                            "|load": "function()\n{\n    //this.insert(citer,iter,0);\n    print(\"getting list\");\n    this.repos = imports.Scm.Repo.Repo.list();\n    var tr= this.repos;\n    this.el.clear();\n    \n    for(var i =0 ; i < tr.length; i++) {\n        var ret = {  };\n       \n        this.el.append(ret);\n        \n        //print(JSON.stringify(ret,null,4));\n         tr[i].getBranches();\n         try {\n             tr[i].debug=1;\n             var 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(ret.iter, 0, '' +  tr[i].repopath.split('/').pop() );\n        this.el.set_value(ret.iter, 1, '' + tr[i].currentBranch.name   );\n        this.el.set_value(ret.iter, 2, '' + tr[i].branches.map(\n                        function(e) { return e.name; \n                    }).join(', ') \n         );\n        this.el.set_value(ret.iter, 3, '' + 'tbc' );        \n        this.el.set_value(ret.iter, 4, tr[i].autocommit() );                \n        this.el.set_value(ret.iter, 5, tr[i].autopush() );                        \n        this.el.set_value(ret.iter, 6,  tr[i].repopath );  \n        // highlight color.\n        var cb = tr[i].currentBranch;\n        print(JSON.stringify(cb,null,4));\n        var col = cb.lastrev == cb.remoterev ? '#ffffff' : '#ff0000';\n        this.el.set_value(ret.iter, 7, col  );      \n        \n    }     \n}",
+                                            "|load": "function()\n{\n    //this.insert(citer,iter,0);\n    print(\"getting list\");\n    this.repos = imports.Scm.Repo.Repo.list();\n    var tr= this.repos;\n    this.el.clear();\n    \n    for(var i =0 ; i < tr.length; i++) {\n        var ret = {  };\n       \n        this.el.append(ret);\n        \n        //print(JSON.stringify(ret,null,4));\n         tr[i].getBranches();\n         try {\n             tr[i].debug=1;\n             var 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(ret.iter, 0, '' +  tr[i].repopath.split('/').pop() );\n        this.el.set_value(ret.iter, 1, '' + tr[i].currentBranch.name   );\n        this.el.set_value(ret.iter, 2, '' + tr[i].branches.map(\n                        function(e) { return e.name; \n                    }).join(', ') \n         );\n        this.el.set_value(ret.iter, 3, '' + 'tbc' );        \n        this.el.set_value(ret.iter, 4, tr[i].autocommit() );                \n        this.el.set_value(ret.iter, 5, tr[i].autopush() );                        \n        this.el.set_value(ret.iter, 6,  tr[i].repopath );  \n        // highlight color.\n        var cb = tr[i].currentBranch;\n        print(JSON.stringify(cb,null,4));\n        var col = cb.lastrev == cb.remoterev ? '#ffffff' : '#ff0000';\n        this.el.set_value(ret.iter, 7, col  );      \n        \n    }     \n}",
                                             "|xns": "Gtk"
                                         },
                                         {