X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=NewBranch.vala;h=cb191c5b3751db31dd277f4f5a40e14aba0e82f7;hp=dac5d5ce14f05e951d6b20c2bf94135c6ed5eadb;hb=9719b1140507ce779ffa4bdd67a9b034fcb78620;hpb=e2abc79f785551620a7f02cdb04ddcf431a7464b diff --git a/NewBranch.vala b/NewBranch.vala index dac5d5ce..cb191c5b 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -135,41 +135,30 @@ public class NewBranch : Object if (this.running) { // should not happen!! GLib.error("new branch show called, when already being displayed?"); } - this.queue = queue; + + this.queue = queue; this.running = true; GitMonitor.gitmonitor.stop(); + this.repo = repo; - - - this.el.move((Gdk.Screen.width() / 2)- 250 ,0); this.el.set_default_size( 500,200); // not sure why it grows.. - GLib.debug("Loading tickets"); + + + + this.el.show_all(); this.el.set_keep_above(true); + + _this.select_ticket_tab.load_data(); + _this.create_ticket_tab.load_data(); + _this.quick_commit_tab.load_data(); + - - var curproj = RooProject.getProjectByRepo(this.repo); - _this.prmodel.loadProjects(curproj == null ? "" : curproj.id); - - _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid); - _this.createbtn.updateState(); - - _this.ticketsel.el.get_child().get_style_context().remove_class("warning"); - if (tid != "") { - var name = RooTicket.singleton().usernameLocal(); - var ticket = RooTicket.singleton().getById(tid); - _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName())); - } else { - _this.ticketsel.el.get_child().get_style_context().add_class("warning"); - } - _this.view.loadTicket(tid); - - @@ -314,6 +303,25 @@ public class NewBranch : Object // user defined functions public void load_data () { + GLib.debug("Loading tickets"); + + var curproj = RooProject.getProjectByRepo(this.repo); + _this.prmodel.loadProjects(curproj == null ? "" : curproj.id); + + _this.dbmodel.loadTickets(curproj == null ? "": curproj.id, tid); + _this.createbtn.updateState(); + + _this.ticketsel.el.get_child().get_style_context().remove_class("warning"); + if (tid != "") { + var name = RooTicket.singleton().usernameLocal(); + var ticket = RooTicket.singleton().getById(tid); + _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName())); + } else { + _this.ticketsel.el.get_child().get_style_context().add_class("warning"); + } + _this.view.loadTicket(tid); + + } } public class Xcls_Table7 : Object