Partial Fix #5782 - messing around with libgit2-glib
[gitlive] / Clones.vala
index 123d5ae..d4c267b 100644 (file)
@@ -85,7 +85,7 @@ public class Clones : Object
        this.spinner.el.show();
        this.spinner.el.start();        
        
-       GitRepo.updateAll("show_clones");
+       GitRepo.updateAllAsync("show_clones");
        
          
      
@@ -361,7 +361,7 @@ public class Clones : Object
                 _this.reposStore.el.get_value(iter, 6, out val);
                 var git_working_dir = (string)val;
                 
-                var repo = GitRepo.singleton().get(git_working_dir);
+                var repo = GitRepo.singleton().get_sync(git_working_dir);
                 
                 Gdk.Rectangle rect;
                 _this.reposView.el.get_cell_area(path, col, out rect);
@@ -464,7 +464,7 @@ public class Clones : Object
                 // } catch(e) { print(e);}
                   
                 this.el.set_value(iter, 0,   repo.name );
-                this.el.set_value( iter, 1, repo.currentBranch.name   );
+                this.el.set_value( iter, 1, repo.getCurrentBranch().name   );
                 this.el.set_value( iter, 2,  repo.branchesToString()   );
         //        this.el.set_value(ret.iter, 2, '' + repo.branches.map(
         //                        function(e) { return e.name; 
@@ -475,24 +475,24 @@ public class Clones : Object
                 this.el.set_value(iter, 5, repo.is_autopush() );                        
                 this.el.set_value(iter, 6,  repo.git_working_dir );  
                 // highlight color.
-                var cb = repo.currentBranch;
+                var cb = repo.getCurrentBranch();
                 //print(JSON.stringify(cb,null,4));
                 var col = "#ffffff";
                 
                 if (cb.lastrev != cb.remoterev) {
                     col =  "#f2dede";
-                    this.el.set_value( iter, 1, repo.currentBranch.name +"\n" +
+                    this.el.set_value( iter, 1, repo.getCurrentBranch().name +"\n" +
                        (repo.ahead_or_behind == "B" ? "Local is BEHIND remote" : "Local is AHEAD of remote")
                     
                        );
                 }
                 if (repo.has_local_changes) {
                     col =  "#d9edf7";
-                    this.el.set_value( iter, 1, repo.currentBranch.name +"\nHas uncommitted changes"   );
+                    this.el.set_value( iter, 1, repo.getCurrentBranch().name +"\nHas uncommitted changes"   );
                 }
                 if  ((cb.lastrev != cb.remoterev) && (repo.has_local_changes)) {
                     col =  "#fcf8e3";
-                    this.el.set_value( iter, 1, repo.currentBranch.name +"\n" + 
+                    this.el.set_value( iter, 1, repo.getCurrentBranch().name +"\n" + 
                     (repo.ahead_or_behind == "B" ? "Local is BEHIND remote" : "Local is AHEAD of remote") +
                     "\nHas uncommitted changes"   );            
                 }
@@ -577,11 +577,9 @@ public class Clones : Object
                _this.reposStore.el.set_value(iter, 4, !bval);
                GLib.debug("got repopath? %s", repopath);
                
-               var repo = GitRepo.get(repopath);
+               var repo = GitRepo.get_sync(repopath);
                repo.set_autocommit(!bval);
-               
-               
-               
+                
               
             });
         }
@@ -656,7 +654,7 @@ public class Clones : Object
                var repopath = (string)rval;
                var bval = (bool)val;
                _this.reposStore.el.set_value(iter, 5, !bval);
-               var repo = GitRepo.get(repopath);
+               var repo = GitRepo.get_sync(repopath);
                repo.set_autopush(!bval);
                
                
@@ -735,7 +733,7 @@ public class Clones : Object
                var repopath = (string)rval;
                var bval = (bool)val;
                _this.reposStore.el.set_value(iter, 8, !bval);
-               var repo = GitRepo.get(repopath);
+               var repo = GitRepo.get_sync(repopath);
                repo.set_auto_branch(!bval);