Partial Fix #5560 - Gitlive - branching wip
[gitlive] / RepoStatusPopover.vala
index 0e363fb..136505c 100644 (file)
@@ -384,8 +384,15 @@ public class RepoStatusPopover : Object
 
             //listeners
             this.el.button_press_event.connect( () => {
-                    _this.el.hide();
-                    return false;
+               _this.repo.git({ "stash" , "--all" });
+               _this.repo.loadStatus();
+               
+                _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
+                _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
+                Clones.singleton().reposStore.load();
+              
+               _this.el.hide();
+                return false;
             });
         }
 
@@ -413,8 +420,17 @@ public class RepoStatusPopover : Object
 
             //listeners
             this.el.button_press_event.connect( () => {
-                     _this.el.hide();
-                    return false;
+               _this.repo.git({ "commit" , "-a" ,"-m", "Uncommited changes synced" });
+               _this.repo.push();
+               _this.repo.loadStatus();
+               
+                _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);
+                _this.status_view.el.get_buffer().set_text(_this.repo.git_status);
+                
+               _this.el.hide();
+               Clones.singleton().reposStore.load();
+               
+                return false;
             });
         }