Clones.bjs
[gitlive] / Clones.js
index 9abf675..2a18392 100644 (file)
--- a/Clones.js
+++ b/Clones.js
@@ -327,9 +327,6 @@ Clones=new XObject({
                                       _this, [ _this, '']
                                    );
                                          });
-                                         
-                                         
-                               this.el.set_tooltip_column(7);          
                               },
                             items : [
                                 {
@@ -338,7 +335,7 @@ Clones=new XObject({
                                     pack : "set_model",
                                     init : function() {
                                         XObject.prototype.init.call(this);
-                                        this.el.set_column_types ( 9, [
+                                        this.el.set_column_types ( 8, [
                                            GObject.TYPE_STRING, // repo  
                                           GObject.TYPE_STRING, // current branch
                                           GObject.TYPE_STRING, // all branch      
@@ -346,8 +343,7 @@ Clones=new XObject({
                                            GObject.TYPE_BOOLEAN, // auto-commit
                                             GObject.TYPE_BOOLEAN, // auto-push
                                                GObject.TYPE_STRING, // repopath
-                                               GObject.TYPE_STRINGm, // color highighling 
-                                               GObject.TYPE_STRING // uncommited. (tip) 
+                                               GObject.TYPE_STRING // color highighling 
                                       ] );
                                     },
                                     load : function()
@@ -397,10 +393,21 @@ Clones=new XObject({
                                                 col =  '#ff00ff';
                                             }
                                             
-                                            this.el.set_value(ret.iter, 7, col  );
-                                            this.el.set_value(ret.iter, 7, tr[i].localChanges  );      
+                                            this.el.set_value(ret.iter, 7, col  );      
                                             
                                         }     
+                                    },
+                                    pathToRepo : function(path) {
+                                    
+                                        var tr= this.repos;
+                                    
+                                        
+                                        for(var i =0 ; i < tr.length; i++) {
+                                            if (tr[i].repopath == path) {
+                                                return tr[i];
+                                            }
+                                        } 
+                                        return false; 
                                     }
                                 },
                                 {
@@ -428,6 +435,15 @@ Clones=new XObject({
                                                     //print(JSON.stringify(value));
                                                     store.el.set_value(ret.iter,4, !value);
                                                     
+                                                     var path =  store.el.get_value(ret.iter, 6).value.get_string();
+                                                     
+                                                     
+                                                     
+                                                          var repo = imports.Scm.Repo.Repo.get(path);
+                                                     repo.autocommit(!value);
+                                                     
+                                                    
+                                                    
                                                 }
                                             },
                                             pack : "pack_start",
@@ -458,7 +474,10 @@ Clones=new XObject({
                                                                                                                  
                                                     //print(JSON.stringify(value));
                                                     store.el.set_value(ret.iter,5, !value);
-                                                    
+                                                      var path =  store.el.get_value(ret.iter, 6).value.get_string();
+                                                     var repo = imports.Scm.Repo.Repo.get(path);
+                                                     repo.autopush(!value);
+                                                     
                                                 }
                                             },
                                             pack : "pack_start",
@@ -470,7 +489,7 @@ Clones=new XObject({
                                     xtype: Gtk.TreeViewColumn,
                                     min_width : 200,
                                     pack : "append_column",
-                                    resizable : "true",
+                                    resizable : true,
                                     title : "Repo",
                                     init : function() {
                                         XObject.prototype.init.call(this);