Ticket.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 24 Dec 2018 07:52:45 +0000 (15:52 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 24 Dec 2018 07:52:45 +0000 (15:52 +0800)
Ticket.vala

Ticket.bjs
Ticket.vala

index cf6e052..7645b86 100644 (file)
@@ -17,7 +17,7 @@
    "title" : "Create a Ticket",
    "xtype" : "Dialog",
    "# GitRepo? repo" : "null",
-   "|   void show" : "( GitRepo? repo   ) \n{\n     // this.el.set_gravity(Gdk.Gravity.NORTH);\n    if (this.running) { // should not happen!!\n    \tGLib.error(\"new branch show called, when already being displayed?\");\n\t}\n \n \n \t_this.el.show_all();\n\t\n\t_this.table.el.hide();\n\n\t_this.spinner.el.show();\n\t_this.spinner.el.start();\t\n\t\n \n\t\n\tthis.running  = true;\n\t//GitMonitor.gitmonitor.stop();\n\t\n    this.repo = repo;\n    \n    \n    \n    this.el.set_keep_above(true);    \n\tthis.el.move((Gdk.Screen.width() / 2)- 250 ,0);\n\tthis.el.set_default_size( 500,200); // not sure why it grows..\n//    GLib.debug(\"Loading tickets\"); \n     \n\n\n\tRooProject? curproj = null;\n    if (this.repo != null) {\n\t    curproj = RooProject.getProjectByRepo(this.repo);\n    }\n\t_this.prmodel.loadProjects(curproj == null ? \"\" : curproj.id);\n    if (curproj != null) {\n \n\t\t\n\t\tvar rt = RooTicket.singleton();\n\t\trt.loadProjectOptions(curproj.id);\n\t\t\n\t\t_this.msmodel.loadMilestones();\n\t\t_this.primodel.loadPriorities();\n\t\t_this.sevmodel.loadSeverities();\n\t\t_this.clmodel.loadClassifications();\t\n\t\t_this.devmodel.loadDevelopers();\t\n\t\t\n    }\n\t_this.summary.el.set_text(\"\");\n\t_this.description.el.buffer.text = \"\"; \n    \n\n    this.el.table.el.show();\n    this.el.table.el.hide();\n\n   \n\n \n \tthis.el.run();\n\n}",
+   "|   void show" : "( GitRepo? repo   ) \n{\n     // this.el.set_gravity(Gdk.Gravity.NORTH);\n    if (this.running) { // should not happen!!\n    \tGLib.error(\"new branch show called, when already being displayed?\");\n\t}\n \tthis.running  = true;\n \n \t_this.el.show_all();\n\t\n\t_this.table.el.hide();\n\n\t_this.spinner.el.show();\n\t_this.spinner.el.start();\t\n\tthis.el.set_keep_above(true);    \n\tthis.el.move((Gdk.Screen.width() / 2)- 250 ,0);\n\tthis.el.set_default_size( 500,200); // not sure why it grows..\n\t\n\tGLib.debug(\"Showing dialog?\"); \n    while(Gtk.events_pending()) {\n\t\tGtk.main_iteration();\n\t}\n\t\n\t\n\t\n\n\t//GitMonitor.gitmonitor.stop();\n\t\n    this.repo = repo;\n    \n    \n    \n    \n//    GLib.debug(\"Loading tickets\"); \n     \n\n\n\tRooProject? curproj = null;\n    if (this.repo != null) {\n\t    curproj = RooProject.getProjectByRepo(this.repo);\n    }\n\t_this.prmodel.loadProjects(curproj == null ? \"\" : curproj.id);\n    if (curproj != null) {\n \n\t\t\n\t\tvar rt = RooTicket.singleton();\n\t\trt.loadProjectOptions(curproj.id);\n\t\t\n\t\t_this.msmodel.loadMilestones();\n\t\t_this.primodel.loadPriorities();\n\t\t_this.sevmodel.loadSeverities();\n\t\t_this.clmodel.loadClassifications();\t\n\t\t_this.devmodel.loadDevelopers();\t\n\t\t\n    }\n\t_this.summary.el.set_text(\"\");\n\t_this.description.el.buffer.text = \"\"; \n    _this.spinner.el.stop();\n\t_this.spinner.el.hide();\t\n\n    this.table.el.show();\n \n\n   \n\n \n \tthis.el.run();\n\n}",
    "default_height" : 200,
    "$ xns" : "Gtk",
    "# bool running" : false,
index eb97279..d49456f 100644 (file)
@@ -99,7 +99,7 @@ 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();
        
@@ -107,19 +107,25 @@ public class Ticket : Object
     
        _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("Showing dialog?"); 
+        while(Gtk.events_pending()) {
+               Gtk.main_iteration();
+       }
+       
        
-     
        
-       this.running  = true;
+    
        //GitMonitor.gitmonitor.stop();
        
         this.repo = repo;
         
         
         
-        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"); 
          
     
@@ -144,10 +150,11 @@ public class Ticket : Object
         }
        _this.summary.el.set_text("");
        _this.description.el.buffer.text = ""; 
-        
+        _this.spinner.el.stop();
+       _this.spinner.el.hide();        
     
-        this.el.table.el.show();
-        this.el.table.el.hide();
+        this.table.el.show();
+