Clone.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 14 Dec 2018 07:51:38 +0000 (15:51 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 14 Dec 2018 07:51:38 +0000 (15:51 +0800)
Clone.vala

Clone.bjs
Clone.vala

index 980fec2..e6e034f 100644 (file)
--- a/Clone.bjs
+++ b/Clone.bjs
@@ -53,7 +53,7 @@
       },
       {
        "listeners" : {
-        "button_press_event" : "() => {\n     \n     var repo = _this.reposel.selectedRepo();\n        GitMonitor.gitmonitor.stop();\n        \n    \n        string[]  args = { \"git\" , \"--no-pager\" , \"clone\" };\n    \n        args +=  (\"http://git.roojs.com/\" + repo );\n \n    \n\n        string[]   env = {};\n        string  home = \"HOME=\" + Environment.get_home_dir() ;\n        env +=  home ;\n   \t\t//v.push(\"GITPATH=\" + this.repo );\n        //}\n          \n        var cfg = new SpawnConfig(Environment.get_home_dir() + \"/gitlive\" , args , env);\n        //cfg.debug = true;\n\n       // may throw error...\n        var sp = new Spawn(cfg);\n      \n      \t GLib.debug(\"Spawn: %s\", sp.output);\n\t\n        \n        \n        \n        \n        \n        GitMonitor.gitmonitor.start();\n       Clones.singleton().reposStore.load();\n     \n       _this.el.hide();\n        return false;\n}"
+        "button_press_event" : "() => {\n      _this.el.hide();\n      Clones.singleton().el.hide();\n     var repo = _this.reposel.selectedRepo();\n        GitMonitor.gitmonitor.stop();\n        \n    \n        string[]  args = { \"git\" , \"--no-pager\" , \"clone\" };\n    \n        args +=  (\"http://git.roojs.com/\" + repo );\n \n    \n\n        string[]   env = {};\n        string  home = \"HOME=\" + Environment.get_home_dir() ;\n        env +=  home ;\n   \t\t//v.push(\"GITPATH=\" + this.repo );\n        //}\n          \n        var cfg = new SpawnConfig(Environment.get_home_dir() + \"/gitlive\" , args , env);\n        //cfg.debug = true;\n\n       // may throw error...\n        var sp = new Spawn(cfg);\n      \n      \t GLib.debug(\"Spawn: %s\", sp.output);\n\t\n        \n        \n        \n        \n        \n        GitMonitor.gitmonitor.start();\n\n         GitRepo.updateAll(\"show_clones\");\n      \n        return false;\n}"
        },
        "label" : "Checkout",
        "xtype" : "Button",
index 510c46f..afad682 100644 (file)
@@ -237,7 +237,8 @@ public class Clone : Object
 
             //listeners
             this.el.button_press_event.connect( () => {
-                 
+                  _this.el.hide();
+                  Clones.singleton().el.hide();
                  var repo = _this.reposel.selectedRepo();
                     GitMonitor.gitmonitor.stop();
                     
@@ -268,9 +269,9 @@ public class Clone : Object
                     
                     
                     GitMonitor.gitmonitor.start();
-                   Clones.singleton().reposStore.load();
-                 
-                   _this.el.hide();
+            
+                     GitRepo.updateAll("show_clones");
+                  
                     return false;
             });
         }