X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Ticket.vala;h=76d25d1c4a42369d74d7252bf2791ff3e0725413;hb=a3eb51eac18b303361264403df77a4092a0baa9e;hp=9857b7ffa54f5301be2d3cd9a7ed9ebb762bc62f;hpb=424eebf8a96c11d28b3da871c3e1560638d3511f;p=gitlive diff --git a/Ticket.vala b/Ticket.vala index 9857b7ff..76d25d1c 100644 --- a/Ticket.vala +++ b/Ticket.vala @@ -12,6 +12,7 @@ public class Ticket : Object } return _Ticket; } + public Xcls_table table; public Xcls_project_id project_id; public Xcls_prcellrenderer prcellrenderer; public Xcls_prmodel prmodel; @@ -27,6 +28,7 @@ public class Ticket : Object public Xcls_clmodel clmodel; public Xcls_developer_id developer_id; public Xcls_devmodel devmodel; + public Xcls_spinner spinner; // my vars (def) public GitRepo? repo; @@ -48,7 +50,7 @@ public class Ticket : Object this.el.default_width = 500; this.el.deletable = true; this.el.modal = true; - var child_0 = new Xcls_VBox2( _this ); + var child_0 = new Xcls_Box2( _this ); child_0.ref(); this.el.get_content_area().add ( child_0.el ); @@ -79,11 +81,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,39 +120,57 @@ 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(); } - public class Xcls_VBox2 : Object + public class Xcls_Box2 : Object { - public Gtk.VBox el; + public Gtk.Box el; private Ticket _this; // my vars (def) // ctor - public Xcls_VBox2(Ticket _owner ) + public Xcls_Box2(Ticket _owner ) { _this = _owner; - this.el = new Gtk.VBox( true, 0 ); + this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 ); // my vars (dec) // set gobject values - var child_0 = new Xcls_Table3( _this ); + var child_0 = new Xcls_table( _this ); child_0.ref(); this.el.pack_start ( child_0.el , false,false,0 ); + var child_1 = new Xcls_spinner( _this ); + child_1.ref(); + this.el.add ( child_1.el ); } // user defined functions } - public class Xcls_Table3 : Object + public class Xcls_table : Object { public Gtk.Table el; private Ticket _this; @@ -158,9 +179,10 @@ public class Ticket : Object // my vars (def) // ctor - public Xcls_Table3(Ticket _owner ) + public Xcls_table(Ticket _owner ) { _this = _owner; + _this.table = this; this.el = new Gtk.Table( 14, 4, true ); // my vars (dec) @@ -410,8 +432,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 +447,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); @@ -1236,5 +1256,30 @@ public class Ticket : Object } + public class Xcls_spinner : Object + { + public Gtk.Spinner el; + private Ticket _this; + + + // my vars (def) + + // ctor + public Xcls_spinner(Ticket _owner ) + { + _this = _owner; + _this.spinner = this; + this.el = new Gtk.Spinner(); + + // my vars (dec) + + // set gobject values + this.el.hexpand = true; + this.el.vexpand = true; + } + + // user defined functions + } + }