From 6660ca0608e8ed6273598bdbbe771160d746fed8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 30 Oct 2018 14:39:08 +0800 Subject: [PATCH] Clones.bjs Clones.vala --- Clones.bjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Clones.bjs b/Clones.bjs index 2ed240be..b9c18da2 100644 --- a/Clones.bjs +++ b/Clones.bjs @@ -107,7 +107,7 @@ "xtype" : "ListStore", "* pack" : "set_model", "$ xns" : "Gtk", - "$ load" : "function()\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 \n //var ret = { };\n \n // this.el.append(ret);\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(ret.iter, 0, '' + repo.repopath.split('/').pop() );\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(ret.iter, 3, '' + (!hi ? '??' : hi[0].changed_raw)); \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 = '#ffffff';\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}" + "$ load" : "function()\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 \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.repopath.split('/').pop() );\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, tr[i].autocommit() ); \n this.el.set_value(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 = '#ffffff';\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}" }, { "id" : "tv_autocommit", -- 2.39.2