X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Ticket.vala;h=cb75d9d86275237b66762806a7d9d6049c3b8f72;hb=02686501f35afec51b24a4cc484be9218d7ff28e;hp=9857b7ffa54f5301be2d3cd9a7ed9ebb762bc62f;hpb=424eebf8a96c11d28b3da871c3e1560638d3511f;p=gitlive diff --git a/Ticket.vala b/Ticket.vala index 9857b7ff..cb75d9d8 100644 --- a/Ticket.vala +++ b/Ticket.vala @@ -79,11 +79,12 @@ public class Ticket : Object _this.summary.el.get_text() , _this.description.el.buffer.text ); - + this.el.hide(); + this.running = false; if (this.repo != null) { NewBranch.singleton().show(this.repo, new Gee.ArrayList(), tid); } - + }); @@ -117,9 +118,24 @@ public class Ticket : Object RooProject? curproj = null; if (this.repo != null) { - curproj = RooTicket.singleton().getProjectByRepo(this.repo); + curproj = RooProject.getProjectByRepo(this.repo); } _this.prmodel.loadProjects(curproj == null ? "" : curproj.id); + if (curproj != null) { + + + var rt = RooTicket.singleton(); + rt.loadProjectOptions(curproj.id); + + _this.msmodel.loadMilestones(); + _this.primodel.loadPriorities(); + _this.sevmodel.loadSeverities(); + _this.clmodel.loadClassifications(); + _this.devmodel.loadDevelopers(); + + } + _this.summary.el.set_text(""); + _this.description.el.buffer.text = ""; this.el.run(); @@ -410,8 +426,6 @@ public class Ticket : Object // user defined functions public void loadProjects (string id) { - var rt = RooTicket.singleton(); - rt.loadProjects(); _this.project_id.loading = true; @@ -427,8 +441,8 @@ public class Ticket : Object if (id == "") { _this.project_id.el.set_active_iter(iter); } - var projects = rt.projects; - foreach(var project in projects) { + + foreach(var project in RooProject.projects()) { el.append(out iter);