X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=Ticket.vala;h=04d431cc11af66fff9cee3449905610d23ee5eb5;hp=12eb4684c01e9c18ae6030219c7ef15b06e7e58c;hb=62bcbeee7e77f9f8774f13569dc9fb5cc25666d6;hpb=7787e7058c952459a07f64edaa20d5e7778dc1fa diff --git a/Ticket.vala b/Ticket.vala index 12eb4684..04d431cc 100644 --- a/Ticket.vala +++ b/Ticket.vala @@ -76,6 +76,7 @@ public class Ticket : Object _this.milestone_id.selectedMilestoneId(), _this.priority_id.selectedPriorityId() , + _this.severity_id.selectedSeverityId() , _this.classification_id.selectedClassificationId() , _this.developer_id.selectedDeveloperId(), _this.summary.el.get_text() , @@ -87,7 +88,7 @@ public class Ticket : Object NewBranch.singleton().show(this.repo, new Gee.ArrayList(), tid); } - + }); } @@ -114,20 +115,12 @@ public class Ticket : Object GLib.debug("Showing dialog?"); Timeout.add_seconds(1, () => { - - - + //GitMonitor.gitmonitor.stop(); this.repo = repo; - - - - // GLib.debug("Loading tickets"); - - RooProject? curproj = null; if (this.repo != null) { curproj = RooProject.getProjectByRepo(this.repo); @@ -152,12 +145,8 @@ public class Ticket : Object _this.spinner.el.hide(); this.table.el.show(); - - - - - - + _this.summary.el.grab_focus(); + return false; }); this.el.run(); @@ -1168,17 +1157,16 @@ public class Ticket : Object _this.developer_id.el.set_active_iter(iter); // } - var projects = rt.developers; - foreach(var project in projects) { + var peps = rt.developers; + foreach(var p in peps) { el.append(out iter); - el.set_value(iter, 0, project.id); - el.set_value(iter, 1, project.display_name ); - // if (id == project.id) { - // _this.projectsel.el.set_active_iter(iter); - // } - + el.set_value(iter, 0, p.id); + el.set_value(iter, 1, p.display_name ); + if (rt.authuser_id == p.id) { + _this.developer_id.el.set_active_iter(iter); + } } _this.developer_id.loading = false; @@ -1228,10 +1216,6 @@ public class Ticket : Object } _this.milestone_id.el.get_child().get_style_context().remove_class("warning"); - if (_this.milestone_id.selectedMilestoneId() == "") { - _this.milestone_id.el.get_child().get_style_context().add_class("warning"); - invalid = true; - } _this.priority_id.el.get_child().get_style_context().remove_class("warning"); if (_this.priority_id.selectedPriorityId() == "") { @@ -1258,12 +1242,7 @@ public class Ticket : Object } _this.description.el.get_style_context().remove_class("warning"); - if (_this.description.el.buffer.text == "") { - _this.description.el.get_style_context().add_class("warning"); - invalid = true; - } - - + if (invalid) { return; }