X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=Ticket.vala;h=12eb4684c01e9c18ae6030219c7ef15b06e7e58c;hp=8989b1804d2167703bf1020cde7eeaffccfc3772;hb=refs%2Fheads%2Fwip_alan_T5632_cache_project_listing;hpb=1674b0bada75891c3958d2d6eef5339ddfd22f89 diff --git a/Ticket.vala b/Ticket.vala index 8989b180..12eb4684 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; @@ -98,48 +99,69 @@ public class Ticket : Object if (this.running) { // should not happen!! GLib.error("new branch show called, when already being displayed?"); } + this.running = true; + _this.el.show_all(); - this.running = true; - //GitMonitor.gitmonitor.stop(); - - this.repo = repo; - - - - + _this.table.el.hide(); + + _this.spinner.el.show(); + _this.spinner.el.start(); + this.el.set_keep_above(true); 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); - + + GLib.debug("Showing dialog?"); + Timeout.add_seconds(1, () => { + + + - RooProject? curproj = null; - if (this.repo != null) { - curproj = RooProject.getProjectByRepo(this.repo); - } - _this.prmodel.loadProjects(curproj == null ? "" : curproj.id); - if (curproj != null) { - + //GitMonitor.gitmonitor.stop(); - var rt = RooTicket.singleton(); - rt.loadProjectOptions(curproj.id); + this.repo = repo; - _this.msmodel.loadMilestones(); - _this.primodel.loadPriorities(); - _this.sevmodel.loadSeverities(); - _this.clmodel.loadClassifications(); - _this.devmodel.loadDevelopers(); - } - _this.summary.el.set_text(""); + + + // GLib.debug("Loading tickets"); + + + + RooProject? curproj = null; + if (this.repo != null) { + 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.spinner.el.stop(); + _this.spinner.el.hide(); + + this.table.el.show(); + + + + + + + return false; + }); this.el.run(); + } public class Xcls_Box2 : Object @@ -154,12 +176,12 @@ public class Ticket : Object public Xcls_Box2(Ticket _owner ) { _this = _owner; - this.el = new Gtk.Box( null, 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 ); @@ -169,7 +191,7 @@ public class Ticket : Object // user defined functions } - public class Xcls_Table3 : Object + public class Xcls_table : Object { public Gtk.Table el; private Ticket _this; @@ -178,9 +200,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)