X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=NewBranch.vala;h=1ec03eea151a9493a10edf82267b6a78c7a5ca1b;hb=1245856c12bd5161158d057fc603ae5f4b0dfcee;hp=640ae38eba348b6af36151f0d67fdeaf14dc26e2;hpb=fd9fb18c5cf70445c33adab625622222801c12ac;p=gitlive diff --git a/NewBranch.vala b/NewBranch.vala index 640ae38e..1ec03eea 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -20,6 +20,7 @@ public class NewBranch : Object // my vars (def) public GitRepo? repo; public bool running; + public Gee.ArrayList queue; // ctor public NewBranch() @@ -29,7 +30,8 @@ public class NewBranch : Object // my vars (dec) this.repo = null; - this.running = true; + this.running = false; + this.queue = null; // set gobject values this.el.title = "Create a working branch "; @@ -50,6 +52,7 @@ public class NewBranch : Object //listeners this.el.delete_event.connect( (self, event) => { this.el.hide(); + this.running = false; return true; //test }); @@ -59,8 +62,10 @@ public class NewBranch : Object if (response_id == 0) { _this.el.hide(); this.running = false; + GitMonitor.gitmonitor.start(); return; } + // have they selected a ticket.. // make that the current active ticket? // we really need to store locally what ticket is being worked on.. @@ -70,12 +75,13 @@ 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 != "" ) { - this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn); + success = this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn); } else { - this.repo.createBranchNamed(bn); + success = this.repo.createBranchNamed(bn); } } @@ -95,12 +101,17 @@ public class NewBranch : Object } // user defined functions - public void show ( GitRepo repo ) + public void show ( GitRepo repo, Gee.ArrayList queue ) { // this.el.set_gravity(Gdk.Gravity.NORTH); - if (this.running) { - return; + if (this.running) { // should not happen!! + GLib.error("new branch show called, when already being displayed?"); } + this.queue = queue; + + this.running = true; + GitMonitor.gitmonitor.stop(); + this.repo = repo; this.el.move((Gdk.Screen.width() / 2)- 250 ,0);