X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=NewBranch.vala;h=602922edb30568ab45f7266e8044ec4590dcf48a;hp=b3bc91d9609ca419447f0c9e0cc5be47441a15a3;hb=1ca3cefd12af4ec1e3cfa3469fbcfc1afc129723;hpb=5c0a38cb0c01bc54849ca5f9990bfcc43c8dafc5 diff --git a/NewBranch.vala b/NewBranch.vala index b3bc91d9..602922ed 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() @@ -30,6 +31,7 @@ public class NewBranch : Object // my vars (dec) this.repo = null; this.running = false; + this.queue = null; // set gobject values this.el.title = "Create a working branch "; @@ -50,7 +52,6 @@ public class NewBranch : Object //listeners this.el.delete_event.connect( (self, event) => { this.el.hide(); - this.running = false; return true; //test }); @@ -60,7 +61,6 @@ public class NewBranch : Object if (response_id == 0) { _this.el.hide(); this.running = false; - GitMonitor.gitmonitor.start(); return; } @@ -73,19 +73,18 @@ 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); + this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn); } else { - success = this.repo.createBranchNamed(bn); + this.repo.setActiveTicket( RooTicket.singleton().getById("-1"), bn); } } - GitMonitor.gitmonitor.start(); + this.running = false; - + this.el.hide(); @@ -99,12 +98,14 @@ 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();