X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=NewBranch.vala;h=c55d3de7615f7d2e55e24cde40139ed261cecb9d;hp=99733f4581b10dd0e5bfa055355f07dfbac6dcd3;hb=2d3bb6db4cf59fb23b8774360ee0f15ffb7dc975;hpb=27286f9959213043f98fae7d27bca610b62b93c2 diff --git a/NewBranch.vala b/NewBranch.vala index 99733f45..c55d3de7 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -52,7 +52,6 @@ public class NewBranch : Object //listeners this.el.delete_event.connect( (self, event) => { this.el.hide(); - this.running = false; return true; //test }); @@ -62,7 +61,6 @@ public class NewBranch : Object if (response_id == 0) { _this.el.hide(); this.running = false; - GitMonitor.gitmonitor.start(); return; } @@ -75,24 +73,27 @@ public class NewBranch : Object // -- initial load can check the contents of the ticket files on first scan. var ticket_id = _this.ticketsel.selectedTicketId(); - var success = true; if (this.repo != null) { var bn = _this.name.el.get_text(); - if (ticket_id != "" ) { - success = this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn); - } else { - success = this.repo.createBranchNamed(bn); - } + + var res = this.repo.setActiveTicket( + RooTicket.singleton().getById(ticket_id != "" ? ticket_id : "-1"), bn + ); + if (res) { + // start the monitoring.. + GitMonitor.gitmonitor.start(); + + } } - if (success) { - GitMonitor.gitmonitor.restoreQueue( this.queue ); - GitMonitor.gitmonitor.runQueue(); - GitMonitor.gitmonitor.start(); - } - this.running = false; - _this.el.hide(); + + + this.running = false; + + this.el.hide(); + + + - }); this.el.show.connect( (self) => { @@ -120,7 +121,9 @@ public class NewBranch : Object this.el.show_all(); + this.el.set_keep_above(true); _this.dbmodel.loadTickets(); + this.el.run(); } public class Xcls_VBox2 : Object