Clones.bjs
[gitlive] / Clones.js
index 553a8ad..d901de2 100644 (file)
--- a/Clones.js
+++ b/Clones.js
@@ -327,6 +327,11 @@ Clones=new XObject({
                                       _this, [ _this, '']
                                    );
                                          });
+                                      
+                                      
+                                      //this.el.set_tooltip_column(8); 
+                                         
+                                        
                               },
                             items : [
                                 {
@@ -335,7 +340,7 @@ Clones=new XObject({
                                     pack : "set_model",
                                     init : function() {
                                         XObject.prototype.init.call(this);
-                                        this.el.set_column_types ( 8, [
+                                        this.el.set_column_types ( 9, [
                                            GObject.TYPE_STRING, // repo  
                                           GObject.TYPE_STRING, // current branch
                                           GObject.TYPE_STRING, // all branch      
@@ -343,7 +348,8 @@ Clones=new XObject({
                                            GObject.TYPE_BOOLEAN, // auto-commit
                                             GObject.TYPE_BOOLEAN, // auto-push
                                                GObject.TYPE_STRING, // repopath
-                                               GObject.TYPE_STRING // color highighling 
+                                               GObject.TYPE_STRING, // color highighling 
+                                               GObject.TYPE_STRING // uncommited. (tip) 
                                       ] );
                                     },
                                     load : function()
@@ -361,6 +367,7 @@ Clones=new XObject({
                                             
                                             //print(JSON.stringify(ret,null,4));
                                              tr[i].getBranches();
+                                             tr[i].getStatus();
                                              var hi;
                                              try {
                                                  //tr[i].debug=1;
@@ -381,8 +388,19 @@ Clones=new XObject({
                                             // highlight color.
                                             var cb = tr[i].currentBranch;
                                             //print(JSON.stringify(cb,null,4));
-                                            var col = cb.lastrev == cb.remoterev ? '#ffffff' : '#ff0000';
-                                            this.el.set_value(ret.iter, 7, col  );      
+                                            var col = '#ffffff';
+                                            if (cb.lastrev != cb.remoterev) {
+                                                col =  '#ff0000';
+                                            }
+                                            if (tr[i].hasLocalChanges) {
+                                                col =  '#0000ff';
+                                            }
+                                            if  ((cb.lastrev != cb.remoterev) && (tr[i].hasLocalChanges)) {
+                                                col =  '#ff00ff';
+                                            }
+                                            
+                                            this.el.set_value(ret.iter, 7, col  );
+                                            this.el.set_value(ret.iter, 8, tr[i].localChanges  );      
                                             
                                         }     
                                     }
@@ -454,7 +472,6 @@ Clones=new XObject({
                                     xtype: Gtk.TreeViewColumn,
                                     min_width : 200,
                                     pack : "append_column",
-                                    resizable : true,
                                     title : "Repo",
                                     init : function() {
                                         XObject.prototype.init.call(this);