RepoStatusPopover.bjs
[gitlive] / Clone.vala
index 11e45b3..afad682 100644 (file)
@@ -237,7 +237,41 @@ public class Clone : Object
 
             //listeners
             this.el.button_press_event.connect( () => {
-                   _this.el.hide();
+                  _this.el.hide();
+                  Clones.singleton().el.hide();
+                 var repo = _this.reposel.selectedRepo();
+                    GitMonitor.gitmonitor.stop();
+                    
+                
+                    string[]  args = { "git" , "--no-pager" , "clone" };
+                
+                    args +=  ("http://git.roojs.com/" + repo );
+             
+                
+            
+                    string[]   env = {};
+                    string  home = "HOME=" + Environment.get_home_dir() ;
+                    env +=  home ;
+                               //v.push("GITPATH=" + this.repo );
+                    //}
+                      
+                    var cfg = new SpawnConfig(Environment.get_home_dir() + "/gitlive" , args , env);
+                    //cfg.debug = true;
+            
+                   // may throw error...
+                    var sp = new Spawn(cfg);
+                  
+                        GLib.debug("Spawn: %s", sp.output);
+               
+                    
+                    
+                    
+                    
+                    
+                    GitMonitor.gitmonitor.start();
+            
+                     GitRepo.updateAll("show_clones");
+                  
                     return false;
             });
         }