From 9e3e84106577000fe87d112526c853ece4b840c5 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 30 Oct 2018 15:44:22 +0800 Subject: [PATCH] Clones.bjs Clones.vala --- Clones.bjs | 2 +- Clones.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Clones.bjs b/Clones.bjs index ba9a5b3b..efe3a7e3 100644 --- a/Clones.bjs +++ b/Clones.bjs @@ -106,7 +106,7 @@ "$ 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" }, { diff --git a/Clones.vala b/Clones.vala index 5e6da46d..de4ce98c 100644 --- a/Clones.vala +++ b/Clones.vala @@ -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; -- 2.39.2