From: Alan Knowles Date: Tue, 30 Oct 2018 07:55:53 +0000 (+0800) Subject: Clones.bjs X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=432c2f571eb0b79465eb75ee4986637646c66842 Clones.bjs Clones.vala --- diff --git a/Clones.bjs b/Clones.bjs index 8587c0c7..54ce9543 100644 --- a/Clones.bjs +++ b/Clones.bjs @@ -95,12 +95,13 @@ "cursor_changed" : "() => {\n // SEE SELECTION.CHANGED\n /*\n \n return;\n \n if (this.el.get_selection().count_selected_rows() < 1) {\n //nothing? - clea it?\n return;\n }\n var ret = {}; \n var model = this.get('/changedFilesStore');\n\n var s = this.el.get_selection();\n var files = [];\n s.selected_foreach(function(model,p,iter) {\n \n files.push( model.get_value(iter, 0).value.get_string());\n \n });\n this.get('/patchview').showDiff(files); \n //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n //print(\"OUT?\" + value);// id..\n // load the list in the right grid..\n \n return true;\n*/\n}" }, "id" : "reposView", - "* init" : " \n{\n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n var description = new Pango.FontDescription();\n description.set_size(10000);\n this.el.override_font(description);\n}\n", + "* init" : " \n{\n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n var description = new Pango.FontDescription();\n description.set_size(10000);\n this.el.override_font(description);\n \n}\n", "xtype" : "TreeView", "* pack" : "add", "$ xns" : "Gtk", "items" : [ { + "int n_columns" : 8, "id" : "reposStore", "columns" : " typeof(string), // 0 repo\n typeof(string), // 1 current branch\n typeof(string), // 2 all branch\n typeof(string), // 3 updated\n typeof(bool), // 4 auto commit\n typeof(bool), // 5 auto push\n typeof(string), // 7 repopath\n typeof(string) // 8 color highlighting?\n ", "$ 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", diff --git a/Clones.vala b/Clones.vala index 2bdd4009..e8146616 100644 --- a/Clones.vala +++ b/Clones.vala @@ -511,6 +511,7 @@ public class Clones : Object var description = new Pango.FontDescription(); description.set_size(10000); this.el.override_font(description); + } //listeners @@ -559,7 +560,7 @@ public class Clones : Object { _this = _owner; _this.reposStore = this; - this.el = new Gtk.ListStore( 0, typeof(string), // 0 repo + this.el = new Gtk.ListStore( 8, typeof(string), // 0 repo typeof(string), // 1 current branch typeof(string), // 2 all branch typeof(string), // 3 updated