X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=NewBranch.vala;h=85eaa7bb89d756b77c8646c231d47919c8449281;hp=6f3fe8c8c895f2ff172dcf82d4cf28df05c84742;hb=7eda32e809de618241bc113ec0b717a8d8c2b735;hpb=3a9aa91b68290762502d8551c51c074c075d1e0a diff --git a/NewBranch.vala b/NewBranch.vala index 6f3fe8c8..85eaa7bb 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -97,7 +97,7 @@ public class NewBranch : Object } // user defined functions - public void show ( GitRepo repo, Gee.ArrayList queue ) + public void show ( GitRepo repo, Gee.ArrayList queue, string tid = "" ) { // this.el.set_gravity(Gdk.Gravity.NORTH); if (this.running) { // should not happen!! @@ -110,8 +110,7 @@ public class NewBranch : Object this.repo = repo; - - + this.el.move((Gdk.Screen.width() / 2)- 250 ,0); this.el.set_default_size( 500,200); // not sure why it grows.. @@ -125,7 +124,7 @@ public class NewBranch : Object var curproj = RooTicket.singleton().getProjectByRepo(this.repo); _this.prmodel.loadProjects(curproj == null ? "" : curproj.id); - _this.dbmodel.loadTickets(curproj == null ? "": curproj.id); + _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid); this.el.run(); } @@ -536,7 +535,7 @@ public class NewBranch : Object } // user defined functions - public void loadTickets (string project_id) { + public void loadTickets (string project_id , string tid = "") { @@ -544,7 +543,7 @@ public class NewBranch : Object RooTicket.singleton().loadTickets( project_id, - _this.btn_not_me.el.active ? RooTicket.Who.ANY : RooTicket.Who.ME, + _this.btn_not_me.el.active ? RooTicket.Who.ANYBODY : RooTicket.Who.ME, _this.btn_closed.el.active ? RooTicket.Status.ANY : RooTicket.Status.ACTIVE ); @@ -569,9 +568,9 @@ public class NewBranch : Object el.set_value(iter, 0, ticket.id); el.set_value(iter, 1, "#%s [%s] %s".printf( ticket.id, ticket.project_id_name , ticket.summary)); - //if (data.get(i) == cur) { - // _this.build_module.el.set_active_iter(iter); - // } + if (ticket.id == tid) { + _this.ticketsel.el.set_active_iter(iter); + } } @@ -604,7 +603,9 @@ public class NewBranch : Object //listeners this.el.clicked.connect( () => { + _this.el.response(-1); Ticket.singleton().show(_this.repo); + }); }