MergeBranch.bjs
[gitlive] / RepoStatusPopover.vala
index 9c20936..e5db19f 100644 (file)
@@ -200,7 +200,7 @@ public class RepoStatusPopover : Object
             this.el.is_important = true;
 
             //listeners
-            this.el.button_press_event.connect( () => {
+            this.el.clicked.connect( () => {
               
                
                GitMonitor.gitmonitor.stop();
@@ -212,7 +212,7 @@ public class RepoStatusPopover : Object
                 Clones.singleton().reposStore.load();
               
                _this.el.hide();
-                return false;
+                 
             });
         }
 
@@ -241,7 +241,9 @@ public class RepoStatusPopover : Object
             this.el.is_important = true;
 
             //listeners
-            this.el.button_press_event.connect( () => {
+            this.el.clicked.connect( () => {
+               _this.el.hide();
+                GitMonitor.gitmonitor.stop();
                _this.repo.git({ "commit" , "-a" ,"-m", "Uncommited changes synced" });
                _this.repo.push();
                _this.repo.loadStatus();
@@ -249,10 +251,10 @@ public class RepoStatusPopover : Object
                 _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;
+                GitMonitor.gitmonitor.start();
+                
             });
         }
 
@@ -281,7 +283,7 @@ public class RepoStatusPopover : Object
             this.el.is_important = true;
 
             //listeners
-            this.el.button_press_event.connect( () => {
+            this.el.clicked.connect( () => {
               
                
                GitMonitor.gitmonitor.stop();
@@ -293,7 +295,7 @@ public class RepoStatusPopover : Object
                 Clones.singleton().reposStore.load();
               
                _this.el.hide();
-                return false;
+             
             });
         }
 
@@ -322,7 +324,7 @@ public class RepoStatusPopover : Object
             this.el.is_important = true;
 
             //listeners
-            this.el.button_press_event.connect( () => {
+            this.el.clicked.connect( () => {
               
                
                GitMonitor.gitmonitor.stop();
@@ -334,7 +336,7 @@ public class RepoStatusPopover : Object
                 Clones.singleton().reposStore.load();
               
                _this.el.hide();
-                return false;
+                
             });
         }
 
@@ -571,6 +573,11 @@ public class RepoStatusPopover : Object
             var description =   Pango.FontDescription.from_string("monospace");
                 description.set_size(9000);
                 this.el.override_font(description);
+                 var lm = Gtk.SourceLanguageManager.get_default();
+                                
+                ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(
+                    lm.get_language("diff")
+                );
         }
 
         // user defined functions
@@ -659,13 +666,13 @@ public class RepoStatusPopover : Object
             this.el.is_important = true;
 
             //listeners
-            this.el.button_press_event.connect( () => {
+            this.el.clicked.connect( () => {
                var oldq = new Gee.ArrayList<GitMonitorQueue>();  
             
                Clones.singleton().el.response(-1);
                NewBranch.singleton().show(_this.repo, oldq);
             
-                return false;
+                
             });
         }
 
@@ -701,7 +708,7 @@ public class RepoStatusPopover : Object
                if (_this.repo.activeTicket != null) {
                   MergeBranch.singleton().show(_this.repo.activeTicket, null);   
                }
-                return ;
+             
             });
         }
 
@@ -729,7 +736,7 @@ public class RepoStatusPopover : Object
             this.el.is_important = true;
 
             //listeners
-            this.el.button_press_event.connect( () => {
+            this.el.clicked.connect( () => {
               
             
             
@@ -737,8 +744,7 @@ public class RepoStatusPopover : Object
               
                _this.el.hide();
                Ticket.singleton().show( _this.repo);
-               
-                return false;
+                
             });
         }