RepoStatusPopover.bjs
[gitlive] / NewBranch.vala
index 3dd1fba..86fc32a 100644 (file)
@@ -19,6 +19,8 @@ public class NewBranch : Object
     public Xcls_dbcellrenderer dbcellrenderer;
     public Xcls_dbmodel dbmodel;
     public Xcls_name name;
+    public Xcls_btn_not_me btn_not_me;
+    public Xcls_btn_closed btn_closed;
 
         // my vars (def)
     public GitRepo? repo;
@@ -540,8 +542,11 @@ public class NewBranch : Object
             
             // fixme .. get project id from selection..
             
-              RooTicket.singleton().loadTickets(project_id);
-                
+             RooTicket.singleton().loadTickets(
+                               project_id,
+                               _this.btn_not_me.el.active ? RooTicket.NotMe.TRUE :  RooTicket.NotMe.FALSE,
+                                _this.btn_closed.el.active ? RooTicket.Closed.TRUE :  RooTicket.Closed.FALSE
+                        );
                 
             _this.ticketsel.loading = true;
         
@@ -676,7 +681,8 @@ public class NewBranch : Object
             }
 
             //listeners
-            this.el.activate.connect( () => {
+            this.el.clicked.connect( () => {
+               GLib.debug("fire response = 1");
                _this.el.response(1);
             });
         }
@@ -701,10 +707,10 @@ public class NewBranch : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_CheckButton17( _this );
+            var child_0 = new Xcls_btn_not_me( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
-            var child_1 = new Xcls_CheckButton18( _this );
+            var child_1 = new Xcls_btn_closed( _this );
             child_1.ref();
             this.el.add (  child_1.el  );
             var child_2 = new Xcls_Label19( _this );
@@ -714,7 +720,7 @@ public class NewBranch : Object
 
         // user defined functions
     }
-    public class Xcls_CheckButton17 : Object
+    public class Xcls_btn_not_me : Object
     {
         public Gtk.CheckButton el;
         private NewBranch  _this;
@@ -723,9 +729,10 @@ public class NewBranch : Object
             // my vars (def)
 
         // ctor
-        public Xcls_CheckButton17(NewBranch _owner )
+        public Xcls_btn_not_me(NewBranch _owner )
         {
             _this = _owner;
+            _this.btn_not_me = this;
             this.el = new Gtk.CheckButton();
 
             // my vars (dec)
@@ -734,7 +741,7 @@ public class NewBranch : Object
             this.el.label = "Show tickets not assigned to me";
 
             //listeners
-            this.el.activate.connect( () => {
+            this.el.toggled.connect( () => {
                var project_id = _this.projectsel.selectedProjectId();
                _this.dbmodel.loadTickets(project_id);  
             });
@@ -743,7 +750,7 @@ public class NewBranch : Object
         // user defined functions
     }
 
-    public class Xcls_CheckButton18 : Object
+    public class Xcls_btn_closed : Object
     {
         public Gtk.CheckButton el;
         private NewBranch  _this;
@@ -752,9 +759,10 @@ public class NewBranch : Object
             // my vars (def)
 
         // ctor
-        public Xcls_CheckButton18(NewBranch _owner )
+        public Xcls_btn_closed(NewBranch _owner )
         {
             _this = _owner;
+            _this.btn_closed = this;
             this.el = new Gtk.CheckButton();
 
             // my vars (dec)
@@ -763,7 +771,7 @@ public class NewBranch : Object
             this.el.label = "Show closed Tickets";
 
             //listeners
-            this.el.activate.connect( () => {
+            this.el.toggled.connect( () => {
                var project_id = _this.projectsel.selectedProjectId();
                _this.dbmodel.loadTickets(project_id);