Uncommited changes synced
authorAlan Knowles <alan@roojs.com>
Mon, 17 Dec 2018 04:11:05 +0000 (12:11 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 17 Dec 2018 04:11:05 +0000 (12:11 +0800)
Makefile.am
NewBranch.bjs
NewBranch.vala
StatusIcon.vala
Ticket.bjs [new file with mode: 0644]
Ticket.vala [new file with mode: 0644]
config1.builder

index 731bbd4..3556ac9 100644 (file)
@@ -32,6 +32,7 @@ Gitlive_SOURCES = \
           WindowLog.vala \
           Clones.vala \
           Clone.vala \
           WindowLog.vala \
           Clones.vala \
           Clone.vala \
+          Ticket.vala \
           NewBranch.vala \
           MergeBranch.vala \
           RepoStatusPopover.vala
           NewBranch.vala \
           MergeBranch.vala \
           RepoStatusPopover.vala
index 18a6cd0..2ae1ceb 100644 (file)
@@ -65,8 +65,8 @@
           "changed" : "() => {\n\tif (this.loading) {\n\t\treturn;\n\t}\n\tvar project_id = this.selectedProjectId();\n\t_this.dbmodel.loadTickets(project_id);\n\t\n\t\n\t/*if (this.loading) {\n\t\treturn;\n\t}\n\tvar ticket_id = this.selectedTicketId();\n\t\n\tvar name = RooTicket.singleton().usernameLocal();\n\t\n\tif (ticket_id == \"\" || ticket_id == null) {\n\t\n\t\tvar dt = new  DateTime.now_local();\n\t\t_this.name.el.set_text(\"wip_%s_%s\".printf(name,dt.format(\"%Y_%b_%d\")));\n\t\treturn;\n\t}\n\t\n\t\n\tvar ticket = RooTicket.singleton().getById(ticket_id);\n   \n\t_this.name.el.set_text(\"wip_%s_T%s_%s\".printf(name,ticket.id, ticket.summaryToBranchName()));\n\t\n\t//GLib.debug (//\"Selection: %s, %s\\n\", (string) val1, (string) val2);\n\t*/\n}"
          },
          "* ctor" : "new Gtk.ComboBox.with_entry()",
           "changed" : "() => {\n\tif (this.loading) {\n\t\treturn;\n\t}\n\tvar project_id = this.selectedProjectId();\n\t_this.dbmodel.loadTickets(project_id);\n\t\n\t\n\t/*if (this.loading) {\n\t\treturn;\n\t}\n\tvar ticket_id = this.selectedTicketId();\n\t\n\tvar name = RooTicket.singleton().usernameLocal();\n\t\n\tif (ticket_id == \"\" || ticket_id == null) {\n\t\n\t\tvar dt = new  DateTime.now_local();\n\t\t_this.name.el.set_text(\"wip_%s_%s\".printf(name,dt.format(\"%Y_%b_%d\")));\n\t\treturn;\n\t}\n\t\n\t\n\tvar ticket = RooTicket.singleton().getById(ticket_id);\n   \n\t_this.name.el.set_text(\"wip_%s_T%s_%s\".printf(name,ticket.id, ticket.summaryToBranchName()));\n\t\n\t//GLib.debug (//\"Selection: %s, %s\\n\", (string) val1, (string) val2);\n\t*/\n}"
          },
          "* ctor" : "new Gtk.ComboBox.with_entry()",
-         "| string selectedProjectId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.prmodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
          "id" : "projectsel",
          "id" : "projectsel",
+         "| string selectedProjectId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.prmodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
          "* init" : "this.el.set_entry_text_column(1);",
          "* pack" : "attach_defaults,0,1,1,2",
          "xtype" : "ComboBox",
          "* init" : "this.el.set_entry_text_column(1);",
          "* pack" : "attach_defaults,0,1,1,2",
          "xtype" : "ComboBox",
@@ -75,8 +75,8 @@
          "items" : [
           {
            "id" : "prcellrenderer",
          "items" : [
           {
            "id" : "prcellrenderer",
-           "* pack" : "pack_start,true",
            "xtype" : "CellRendererText",
            "xtype" : "CellRendererText",
+           "* pack" : "pack_start,true",
            "$ xns" : "Gtk"
           },
           {
            "$ xns" : "Gtk"
           },
           {
          "items" : [
           {
            "id" : "dbcellrenderer",
          "items" : [
           {
            "id" : "dbcellrenderer",
-           "xtype" : "CellRendererText",
            "* pack" : "pack_start,true",
            "* pack" : "pack_start,true",
+           "xtype" : "CellRendererText",
            "$ xns" : "Gtk"
           },
           {
            "id" : "dbmodel",
            "$ xns" : "Gtk"
           },
           {
            "id" : "dbmodel",
-           "xtype" : "ListStore",
            "* pack" : "set_model",
            "* pack" : "set_model",
+           "xtype" : "ListStore",
            "| void loadTickets" : "(string project_id) {\n\n\n    \n    // fixme .. get project id from selection..\n    \n     RooTicket.singleton().loadTickets(\n \t\t\tproject_id,\n \t\t\t_this.btn_not_me.el.active ? RooTicket.NotMe.TRUE :  RooTicket.NotMe.FALSE,\n \t\t\t _this.btn_closed.el.active ? RooTicket.Closed.TRUE :  RooTicket.Closed.FALSE\n\t\t );\n        \n    _this.ticketsel.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a ticket --\");\n    \n    _this.ticketsel.el.set_active_iter(iter);\n    var tickets = RooTicket.singleton().tickets;\n    foreach(var ticket in tickets) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, ticket.id);\n        el.set_value(iter, 1, \"#%s [%s] %s\".printf( ticket.id, ticket.project_id_name , ticket.summary));\n        \n        //if (data.get(i) == cur) {\n         //   _this.build_module.el.set_active_iter(iter);\n       // }\n        \n    }\n    \n    _this.ticketsel.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
            "$ columns" : "typeof(string),typeof(string)",
            "n_columns" : 2,
            "| void loadTickets" : "(string project_id) {\n\n\n    \n    // fixme .. get project id from selection..\n    \n     RooTicket.singleton().loadTickets(\n \t\t\tproject_id,\n \t\t\t_this.btn_not_me.el.active ? RooTicket.NotMe.TRUE :  RooTicket.NotMe.FALSE,\n \t\t\t _this.btn_closed.el.active ? RooTicket.Closed.TRUE :  RooTicket.Closed.FALSE\n\t\t );\n        \n    _this.ticketsel.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a ticket --\");\n    \n    _this.ticketsel.el.set_active_iter(iter);\n    var tickets = RooTicket.singleton().tickets;\n    foreach(var ticket in tickets) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, ticket.id);\n        el.set_value(iter, 1, \"#%s [%s] %s\".printf( ticket.id, ticket.project_id_name , ticket.summary));\n        \n        //if (data.get(i) == cur) {\n         //   _this.build_module.el.set_active_iter(iter);\n       // }\n        \n    }\n    \n    _this.ticketsel.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
            "$ columns" : "typeof(string),typeof(string)",
            "n_columns" : 2,
          ]
         },
         {
          ]
         },
         {
+         "listeners" : {
+          "clicked" : "() => {\n\tTicket.singleton().show(_this.repo);\n}"
+         },
          "bool expand" : false,
          "bool expand" : false,
-         "* pack" : "attach_defaults,4,5,1,2",
          "xtype" : "Button",
          "xtype" : "Button",
+         "* pack" : "attach_defaults,4,5,1,2",
          "string label" : "New Ticket",
          "$ xns" : "Gtk"
         },
          "string label" : "New Ticket",
          "$ xns" : "Gtk"
         },
             "toggled" : "() => {\n\tvar project_id = _this.projectsel.selectedProjectId();\n\t_this.dbmodel.loadTickets(project_id);\t\n}"
            },
            "id" : "btn_not_me",
             "toggled" : "() => {\n\tvar project_id = _this.projectsel.selectedProjectId();\n\t_this.dbmodel.loadTickets(project_id);\t\n}"
            },
            "id" : "btn_not_me",
-           "* pack" : "add",
            "string label" : "Show tickets not assigned to me",
            "string label" : "Show tickets not assigned to me",
+           "* pack" : "add",
            "xtype" : "CheckButton",
            "$ xns" : "Gtk"
           },
            "xtype" : "CheckButton",
            "$ xns" : "Gtk"
           },
             "toggled" : "() => {\n \tvar project_id = _this.projectsel.selectedProjectId();\n\t_this.dbmodel.loadTickets(project_id);\t\n\t \n}"
            },
            "id" : "btn_closed",
             "toggled" : "() => {\n \tvar project_id = _this.projectsel.selectedProjectId();\n\t_this.dbmodel.loadTickets(project_id);\t\n\t \n}"
            },
            "id" : "btn_closed",
-           "string label" : "Show closed Tickets",
            "xtype" : "CheckButton",
            "xtype" : "CheckButton",
+           "string label" : "Show closed Tickets",
            "* pack" : "add",
            "$ xns" : "Gtk"
           },
            "* pack" : "add",
            "$ xns" : "Gtk"
           },
index 86fc32a..166c8a6 100644 (file)
@@ -601,6 +601,11 @@ public class NewBranch : Object
             // set gobject values
             this.el.expand = false;
             this.el.label = "New Ticket";
             // set gobject values
             this.el.expand = false;
             this.el.label = "New Ticket";
+
+            //listeners
+            this.el.clicked.connect( () => {
+               Ticket.singleton().show(_this.repo);
+            });
         }
 
         // user defined functions
         }
 
         // user defined functions
index efedeba..d2154e0 100644 (file)
@@ -180,6 +180,7 @@ public class StatusIconA : StatusIcon {
             this.append(this.after_seperator);
             //this.append(new MenuItemUpdateTimesheet());            
             this.append(new MenuItemManageClones());
             this.append(this.after_seperator);
             //this.append(new MenuItemUpdateTimesheet());            
             this.append(new MenuItemManageClones());
+            this.append(new MenuItemNewTicket());            
             this.append(new MenuItemAbout());
             this.append(new MenuItemQuit());
             this.merge_items = new  Gee.ArrayList<Gtk.MenuItem>();
             this.append(new MenuItemAbout());
             this.append(new MenuItemQuit());
             this.merge_items = new  Gee.ArrayList<Gtk.MenuItem>();
@@ -468,6 +469,30 @@ public class StatusIconA : StatusIcon {
             
         }
         
             
         }
         
+        class MenuItemNewTicket : ImageMenuItem {
+            
+            public MenuItemNewTicket()
+            {
+                
+                var  image = new Gtk.Image();
+                image.set_from_stock(Gtk.Stock.FULLSCREEN,Gtk.IconSize.MENU );
+                this.set_image (image);
+                this.label= "New Ticket";
+                this.always_show_image = true;
+                this.accel_group = null;
+                
+                this.activate.connect( () => {
+                       Ticket.singleton().show(null);
+
+                
+                     // Clones.singleton().show();
+                });
+            }
+            
+            
+        }
+        
+        
         class MenuItemAbout : ImageMenuItem {
             
             public MenuItemAbout()
         class MenuItemAbout : ImageMenuItem {
             
             public MenuItemAbout()
diff --git a/Ticket.bjs b/Ticket.bjs
new file mode 100644 (file)
index 0000000..2024d34
--- /dev/null
@@ -0,0 +1,277 @@
+{
+ "name" : "Ticket",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/gitlive/Ticket.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "gitlive",
+ "items" : [
+  {
+   "listeners" : {
+    "delete_event" : "(self, event) => {\n    this.el.hide();\n    return true; \n    //test  \n}\n ",
+    "response" : " (self, response_id) =>  { \n  \n\tGLib.debug(\"got %d\", (int) response_id);\n\tif (response_id < 1) {\n\t    _this.el.hide();\t\n\t    this.running = false; \n\t \treturn;\n\t}\n\t \n\treturn; \n\t \n\t \n\n\t \n}"
+   },
+   "default_width" : 500,
+   "$ deletable" : true,
+   "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\t\n\tthis.running  = true;\n\t//GitMonitor.gitmonitor.stop();\n\t\n    this.repo = repo;\n    \n    \n    \n    \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    this.el.show_all();\n    this.el.set_keep_above(true);\n   \n\n\tRooProject? curproj = null;\n    if (this.repo != null) {\n\t    curproj = RooTicket.singleton().getProjectByRepo(this.repo);\n    }\n\t_this.prmodel.loadProjects(curproj == null ? \"\" : curproj.id);\n    \n \n \tthis.el.run();\n\n}",
+   "default_height" : 200,
+   "$ xns" : "Gtk",
+   "# bool running" : false,
+   "bool modal" : true,
+   "items" : [
+    {
+     "xtype" : "VBox",
+     "$ pack" : "get_content_area().add",
+     "$ xns" : "Gtk",
+     "items" : [
+      {
+       "bool homogeneous" : true,
+       "bool expand" : false,
+       "xtype" : "Table",
+       "* pack" : "pack_start,false,false,0",
+       "uint column_spacing" : 4,
+       "n_columns" : 5,
+       "$ xns" : "Gtk",
+       "n_rows" : 14,
+       "bool vexpand" : false,
+       "int margin" : 2,
+       "items" : [
+        {
+         "label" : "Project",
+         "$ visible" : true,
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "* pack" : "attach_defaults,0,1,0,1",
+         "xtype" : "Label",
+         "$ xns" : "Gtk"
+        },
+        {
+         "label" : "Summary",
+         "$ visible" : true,
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "* pack" : "attach_defaults,1,2,0,1",
+         "xtype" : "Label",
+         "x_options" : 4,
+         "$ xns" : "Gtk"
+        },
+        {
+         "listeners" : {
+          "changed" : "() => {\n\tif (this.loading) {\n\t\treturn;\n\t}\n\tvar project_id = this.selectedProjectId();\n\t\n\t// affects projects and milestones..\n\t\n\t\n\t/*if (this.loading) {\n\t\treturn;\n\t}\n\tvar ticket_id = this.selectedTicketId();\n\t\n\tvar name = RooTicket.singleton().usernameLocal();\n\t\n\tif (ticket_id == \"\" || ticket_id == null) {\n\t\n\t\tvar dt = new  DateTime.now_local();\n\t\t_this.name.el.set_text(\"wip_%s_%s\".printf(name,dt.format(\"%Y_%b_%d\")));\n\t\treturn;\n\t}\n\t\n\t\n\tvar ticket = RooTicket.singleton().getById(ticket_id);\n   \n\t_this.name.el.set_text(\"wip_%s_T%s_%s\".printf(name,ticket.id, ticket.summaryToBranchName()));\n\t\n\t//GLib.debug (//\"Selection: %s, %s\\n\", (string) val1, (string) val2);\n\t*/\n}"
+         },
+         "* ctor" : "new Gtk.ComboBox.with_entry()",
+         "id" : "project_id",
+         "| string selectedProjectId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.prmodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
+         "* init" : "this.el.set_entry_text_column(1);",
+         "* pack" : "attach_defaults,0,1,1,2",
+         "xtype" : "ComboBox",
+         "# bool loading" : false,
+         "$ xns" : "Gtk",
+         "items" : [
+          {
+           "id" : "prcellrenderer",
+           "xtype" : "CellRendererText",
+           "* pack" : "pack_start,true",
+           "$ xns" : "Gtk"
+          },
+          {
+           "| void loadProjects" : "  (string id) {\n\n    var rt = RooTicket.singleton();\n    rt.loadProjects();\n    \n    _this.project_id.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a project --\");\n    if (id == \"\") {\n\t    _this.project_id.el.set_active_iter(iter);\n    }\n    var projects = rt.projects;\n    foreach(var project in projects) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, project.id);\n        el.set_value(iter, 1,  project.name );\n        if (id == project.id) {\n\t \t   _this.project_id.el.set_active_iter(iter);\n\t    }   \n        \n    }\n    \n    _this.project_id.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
+           "id" : "prmodel",
+           "* pack" : "set_model",
+           "xtype" : "ListStore",
+           "$ columns" : "typeof(string),typeof(string)",
+           "n_columns" : 2,
+           "$ xns" : "Gtk"
+          }
+         ]
+        },
+        {
+         "id" : "summary",
+         "$ visible" : true,
+         "xtype" : "Entry",
+         "* pack" : "attach_defaults,1,4,1,2",
+         "$ xns" : "Gtk"
+        },
+        {
+         "label" : "Milestone",
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "xalign" : 0.90000000000000002,
+         "* pack" : "attach_defaults,0,1,2,3",
+         "xtype" : "Label",
+         "$ justify" : "Gtk.Justification.RIGHT",
+         "x_options" : 4,
+         "$ xns" : "Gtk"
+        },
+        {
+         "* ctor" : "new Gtk.ComboBox.with_entry()",
+         "id" : "milestone_id",
+         "* init" : "this.el.set_entry_text_column(1);",
+         "* pack" : "attach_defaults,0,1,3,4",
+         "xtype" : "ComboBox",
+         "# bool loading" : false,
+         "$ xns" : "Gtk",
+         "| string selectedMilestoneId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.msmodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
+         "items" : [
+          {
+           "id" : "msmodel",
+           "* pack" : "set_model",
+           "xtype" : "ListStore",
+           "| void loadMilestones" : "  (string id) {\n\n    var rt = RooTicket.singleton();\n   // rt.loadProjects();\n    \n    _this.milestone_id.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a milestone --\");\n\t    _this.milestone_id.el.set_active_iter(iter);    \n    /*\n    if (id == \"\") {\n\n    }\n    var projects = rt.projects;\n    foreach(var project in projects) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, project.id);\n        el.set_value(iter, 1,  project.name );\n        if (id == project.id) {\n\t \t   _this.milestone.el.set_active_iter(iter);\n\t    }   \n        \n    }\n    */\n    \n    _this.milestone_id.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
+           "$ columns" : "typeof(string),typeof(string)",
+           "n_columns" : 2,
+           "$ xns" : "Gtk"
+          }
+         ]
+        },
+        {
+         "label" : "Description",
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "* pack" : "attach_defaults,1,4,2,3",
+         "xtype" : "Label",
+         "x_options" : 4,
+         "$ xns" : "Gtk"
+        },
+        {
+         "id" : "description",
+         "* pack" : "attach_defaults,1,4,3,12",
+         "xtype" : "TextView",
+         "$ xns" : "Gtk",
+         "uint border_width" : 1
+        },
+        {
+         "label" : "Priority",
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "xalign" : 0.90000000000000002,
+         "* pack" : "attach_defaults,0,1,4,5",
+         "xtype" : "Label",
+         "x_options" : 4,
+         "$ xns" : "Gtk"
+        },
+        {
+         "* ctor" : "new Gtk.ComboBox.with_entry()",
+         "id" : "priority_id",
+         "* init" : "this.el.set_entry_text_column(1);",
+         "* pack" : "attach_defaults,0,1,5,6",
+         "xtype" : "ComboBox",
+         "# bool loading" : false,
+         "$ xns" : "Gtk",
+         "| string selectedPriorityId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.primodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
+         "items" : [
+          {
+           "id" : "primodel",
+           "* pack" : "set_model",
+           "xtype" : "ListStore",
+           "$ columns" : "typeof(string),typeof(string)",
+           "| void loadPriority" : "  (string id) {\n\n    var rt = RooTicket.singleton();\n   // rt.loadProjects();\n    \n    _this.priority_id.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select priority --\");\n   // if (id == \"\") {\n\t    _this.priority_id.el.set_active_iter(iter);\n    //}\n    /*var projects = rt.projects;\n    foreach(var project in projects) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, project.id);\n        el.set_value(iter, 1,  project.name );\n        if (id == project.id) {\n\t \t   _this.priority_id.el.set_active_iter(iter);\n\t    }   \n        \n    }\n    */\n    _this.priority_id.loading = false;\n           \n                                     \n}\n",
+           "n_columns" : 2,
+           "$ xns" : "Gtk"
+          }
+         ]
+        },
+        {
+         "label" : "Severity",
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "* pack" : "attach_defaults,0,1,6,7",
+         "xtype" : "Label",
+         "x_options" : 4,
+         "$ xns" : "Gtk"
+        },
+        {
+         "* ctor" : "new Gtk.ComboBox.with_entry()",
+         "id" : "severity_id",
+         "* init" : "this.el.set_entry_text_column(1);",
+         "* pack" : "attach_defaults,0,1,7,8",
+         "xtype" : "ComboBox",
+         "# bool loading" : false,
+         "$ xns" : "Gtk",
+         "| string selectedSeverityId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.sevmodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
+         "items" : [
+          {
+           "| void loadProjects" : "  (string id) {\n\n    var rt = RooTicket.singleton();\n    //rt.loadProjects();\n    \n    _this.severity_id.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select severity --\");\n   // if (id == \"\") {\n\t    _this.severity_id.el.set_active_iter(iter);\n   // }\n   /*\n    var projects = rt.projects;\n    foreach(var project in projects) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, project.id);\n        el.set_value(iter, 1,  project.name );\n        if (id == project.id) {\n\t \t   _this.projectsel.el.set_active_iter(iter);\n\t    }   \n        \n    }\n    */\n    _this.severity_id.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
+           "id" : "sevmodel",
+           "* pack" : "set_model",
+           "xtype" : "ListStore",
+           "$ columns" : "typeof(string),typeof(string)",
+           "n_columns" : 2,
+           "$ xns" : "Gtk"
+          }
+         ]
+        },
+        {
+         "label" : "Classification",
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "* pack" : "attach_defaults,0,1,8,9",
+         "xtype" : "Label",
+         "x_options" : 4,
+         "$ xns" : "Gtk"
+        },
+        {
+         "* ctor" : "new Gtk.ComboBox.with_entry()",
+         "| string selectedProjectId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.prmodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
+         "id" : "classification_id",
+         "* init" : "this.el.set_entry_text_column(1);",
+         "* pack" : "attach_defaults,0,1,9,10",
+         "xtype" : "ComboBox",
+         "# bool loading" : false,
+         "$ xns" : "Gtk",
+         "items" : [
+          {
+           "id" : "clmodel",
+           "| void loadClassifications" : "  (string id) {\n\n    var rt = RooTicket.singleton();\n    // rt.loadProjects();\n    \n    _this.classification_id.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a project --\");\n    if (id == \"\") {\n\t    _this.classification_id.el.set_active_iter(iter);\n    }\n    /*\n    var projects = rt.projects;\n    foreach(var project in projects) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, project.id);\n        el.set_value(iter, 1,  project.name );\n        if (id == project.id) {\n\t \t   _this.classification_id.el.set_active_iter(iter);\n\t    }   \n        \n    }\n    */\n    _this.classification_id.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
+           "* pack" : "set_model",
+           "xtype" : "ListStore",
+           "$ columns" : "typeof(string),typeof(string)",
+           "n_columns" : 2,
+           "$ xns" : "Gtk"
+          }
+         ]
+        },
+        {
+         "label" : "Assign to",
+         "Gtk.Align halign" : "Gtk.Align.START",
+         "* pack" : "attach_defaults,0,1,10,11",
+         "xtype" : "Label",
+         "x_options" : 4,
+         "$ xns" : "Gtk"
+        },
+        {
+         "* ctor" : "new Gtk.ComboBox.with_entry()",
+         "id" : "developer_id",
+         "* init" : "this.el.set_entry_text_column(1);",
+         "* pack" : "attach_defaults,0,1,11,12",
+         "xtype" : "ComboBox",
+         "# bool loading" : false,
+         "| string selectedDeveloperId" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.devmodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
+         "$ xns" : "Gtk",
+         "items" : [
+          {
+           "id" : "devmodel",
+           "* pack" : "set_model",
+           "xtype" : "ListStore",
+           "$ columns" : "typeof(string),typeof(string)",
+           "n_columns" : 2,
+           "$ xns" : "Gtk",
+           "| void loadDevelopers" : "  (string id) {\n\n    var rt = RooTicket.singleton();\n    //rt.loadProjects();\n    \n    _this.developer_id.loading = true;\n\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a project --\");\n    if (id == \"\") {\n\t    _this.developer_id.el.set_active_iter(iter);\n    }\n    /*\n    var projects = rt.projects;\n    foreach(var project in projects) {\n    \n        el.append(out iter);\n        \n        el.set_value(iter, 0, project.id);\n        el.set_value(iter, 1,  project.name );\n        if (id == project.id) {\n\t \t   _this.projectsel.el.set_active_iter(iter);\n\t    }   \n        \n    }\n    */\n    _this.developer_id.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n"
+          }
+         ]
+        },
+        {
+         "listeners" : {
+          "clicked" : "() => {\n\tGLib.debug(\"fire response = 1\");\n\t_this.el.response(1);\n}"
+         },
+         "label" : "Create Branch",
+         "* init" : "{\n   this.el.get_style_context().add_class(\"suggested-action\");\n}\n",
+         "xtype" : "Button",
+         "* pack" : "attach_defaults,3,4,12,13",
+         "$ xns" : "Gtk"
+        }
+       ]
+      }
+     ]
+    }
+   ]
+  }
+ ]
+}
\ No newline at end of file
diff --git a/Ticket.vala b/Ticket.vala
new file mode 100644 (file)
index 0000000..e9848d9
--- /dev/null
@@ -0,0 +1,1189 @@
+static Ticket  _Ticket;
+
+public class Ticket : Object
+{
+    public Gtk.Dialog el;
+    private Ticket  _this;
+
+    public static Ticket singleton()
+    {
+        if (_Ticket == null) {
+            _Ticket= new Ticket();
+        }
+        return _Ticket;
+    }
+    public Xcls_project_id project_id;
+    public Xcls_prcellrenderer prcellrenderer;
+    public Xcls_prmodel prmodel;
+    public Xcls_summary summary;
+    public Xcls_milestone_id milestone_id;
+    public Xcls_msmodel msmodel;
+    public Xcls_description description;
+    public Xcls_priority_id priority_id;
+    public Xcls_primodel primodel;
+    public Xcls_severity_id severity_id;
+    public Xcls_sevmodel sevmodel;
+    public Xcls_classification_id classification_id;
+    public Xcls_clmodel clmodel;
+    public Xcls_developer_id developer_id;
+    public Xcls_devmodel devmodel;
+
+        // my vars (def)
+    public GitRepo? repo;
+    public bool running;
+
+    // ctor
+    public Ticket()
+    {
+        _this = this;
+        this.el = new Gtk.Dialog();
+
+        // my vars (dec)
+        this.repo = null;
+        this.running = false;
+
+        // set gobject values
+        this.el.title = "Create a Ticket";
+        this.el.default_height = 200;
+        this.el.default_width = 500;
+        this.el.deletable = true;
+        this.el.modal = true;
+        var child_0 = new Xcls_VBox2( _this );
+        child_0.ref();
+        this.el.get_content_area().add (  child_0.el  );
+
+        //listeners
+        this.el.delete_event.connect( (self, event) => {
+            this.el.hide();
+            return true; 
+            //test  
+        });
+        this.el.response.connect( (self, response_id) =>  { 
+          
+               GLib.debug("got %d", (int) response_id);
+               if (response_id < 1) {
+                   _this.el.hide();    
+                   this.running = false; 
+                       return;
+               }
+                
+               return; 
+                
+                
+        
+                
+        });
+    }
+
+    // user defined functions
+    public   void show ( GitRepo? repo   ) 
+    {
+         // this.el.set_gravity(Gdk.Gravity.NORTH);
+        if (this.running) { // should not happen!!
+               GLib.error("new branch show called, when already being displayed?");
+       }
+     
+       
+       this.running  = true;
+       //GitMonitor.gitmonitor.stop();
+       
+        this.repo = repo;
+        
+        
+        
+        
+       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);
+       
+    
+       RooProject? curproj = null;
+        if (this.repo != null) {
+           curproj = RooTicket.singleton().getProjectByRepo(this.repo);
+        }
+       _this.prmodel.loadProjects(curproj == null ? "" : curproj.id);
+        
+     
+       this.el.run();
+    
+    }
+    public class Xcls_VBox2 : Object
+    {
+        public Gtk.VBox el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_VBox2(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.VBox( true, 0 );
+
+            // my vars (dec)
+
+            // set gobject values
+            var child_0 = new Xcls_Table3( _this );
+            child_0.ref();
+            this.el.pack_start (  child_0.el , false,false,0 );
+        }
+
+        // user defined functions
+    }
+    public class Xcls_Table3 : Object
+    {
+        public Gtk.Table el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Table3(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Table( 14, 5, true );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.expand = false;
+            this.el.margin = 2;
+            this.el.column_spacing = 4;
+            this.el.vexpand = false;
+            var child_0 = new Xcls_Label4( _this );
+            child_0.ref();
+            this.el.attach_defaults (  child_0.el , 0,1,0,1 );
+            var child_1 = new Xcls_Label5( _this );
+            child_1.ref();
+            this.el.attach_defaults (  child_1.el , 1,2,0,1 );
+            var child_2 = new Xcls_project_id( _this );
+            child_2.ref();
+            this.el.attach_defaults (  child_2.el , 0,1,1,2 );
+            var child_3 = new Xcls_summary( _this );
+            child_3.ref();
+            this.el.attach_defaults (  child_3.el , 1,4,1,2 );
+            var child_4 = new Xcls_Label10( _this );
+            child_4.ref();
+            this.el.attach_defaults (  child_4.el , 0,1,2,3 );
+            var child_5 = new Xcls_milestone_id( _this );
+            child_5.ref();
+            this.el.attach_defaults (  child_5.el , 0,1,3,4 );
+            var child_6 = new Xcls_Label13( _this );
+            child_6.ref();
+            this.el.attach_defaults (  child_6.el , 1,4,2,3 );
+            var child_7 = new Xcls_description( _this );
+            child_7.ref();
+            this.el.attach_defaults (  child_7.el , 1,4,3,12 );
+            var child_8 = new Xcls_Label15( _this );
+            child_8.ref();
+            this.el.attach_defaults (  child_8.el , 0,1,4,5 );
+            var child_9 = new Xcls_priority_id( _this );
+            child_9.ref();
+            this.el.attach_defaults (  child_9.el , 0,1,5,6 );
+            var child_10 = new Xcls_Label18( _this );
+            child_10.ref();
+            this.el.attach_defaults (  child_10.el , 0,1,6,7 );
+            var child_11 = new Xcls_severity_id( _this );
+            child_11.ref();
+            this.el.attach_defaults (  child_11.el , 0,1,7,8 );
+            var child_12 = new Xcls_Label21( _this );
+            child_12.ref();
+            this.el.attach_defaults (  child_12.el , 0,1,8,9 );
+            var child_13 = new Xcls_classification_id( _this );
+            child_13.ref();
+            this.el.attach_defaults (  child_13.el , 0,1,9,10 );
+            var child_14 = new Xcls_Label24( _this );
+            child_14.ref();
+            this.el.attach_defaults (  child_14.el , 0,1,10,11 );
+            var child_15 = new Xcls_developer_id( _this );
+            child_15.ref();
+            this.el.attach_defaults (  child_15.el , 0,1,11,12 );
+            var child_16 = new Xcls_Button27( _this );
+            child_16.ref();
+            this.el.attach_defaults (  child_16.el , 3,4,12,13 );
+        }
+
+        // user defined functions
+    }
+    public class Xcls_Label4 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label4(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Project" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+            this.el.visible = true;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_Label5 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label5(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Summary" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+            this.el.visible = true;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_project_id : Object
+    {
+        public Gtk.ComboBox el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+        public bool loading;
+
+        // ctor
+        public Xcls_project_id(Ticket _owner )
+        {
+            _this = _owner;
+            _this.project_id = this;
+            this.el = new Gtk.ComboBox.with_entry();
+
+            // my vars (dec)
+            this.loading = false;
+
+            // set gobject values
+            var child_0 = new Xcls_prcellrenderer( _this );
+            child_0.ref();
+            this.el.pack_start (  child_0.el , true );
+            var child_1 = new Xcls_prmodel( _this );
+            child_1.ref();
+            this.el.set_model (  child_1.el  );
+
+            // init method
+
+            this.el.set_entry_text_column(1);
+
+            //listeners
+            this.el.changed.connect( () => {
+               if (this.loading) {
+                       return;
+               }
+               var project_id = this.selectedProjectId();
+               
+               // affects projects and milestones..
+               
+               
+               /*if (this.loading) {
+                       return;
+               }
+               var ticket_id = this.selectedTicketId();
+               
+               var name = RooTicket.singleton().usernameLocal();
+               
+               if (ticket_id == "" || ticket_id == null) {
+               
+                       var dt = new  DateTime.now_local();
+                       _this.name.el.set_text("wip_%s_%s".printf(name,dt.format("%Y_%b_%d")));
+                       return;
+               }
+               
+               
+               var ticket = RooTicket.singleton().getById(ticket_id);
+               
+               _this.name.el.set_text("wip_%s_T%s_%s".printf(name,ticket.id, ticket.summaryToBranchName()));
+               
+               //GLib.debug (//"Selection: %s, %s\n", (string) val1, (string) val2);
+               */
+            });
+        }
+
+        // user defined functions
+        public string selectedProjectId () {
+               Gtk.TreeIter iter;
+               Value val1;
+         
+         
+               this.el.get_active_iter (out iter);
+               _this.prmodel.el.get_value (iter, 0, out val1);
+         
+        
+               return  (string) val1;
+               
+               
+               
+               
+        }
+    }
+    public class Xcls_prcellrenderer : Object
+    {
+        public Gtk.CellRendererText el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_prcellrenderer(Ticket _owner )
+        {
+            _this = _owner;
+            _this.prcellrenderer = this;
+            this.el = new Gtk.CellRendererText();
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_prmodel : Object
+    {
+        public Gtk.ListStore el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_prmodel(Ticket _owner )
+        {
+            _this = _owner;
+            _this.prmodel = this;
+            this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+        public void loadProjects (string id) {
+        
+            var rt = RooTicket.singleton();
+            rt.loadProjects();
+            
+            _this.project_id.loading = true;
+        
+            this.el.clear();                                    
+            Gtk.TreeIter iter;
+            var el = this.el;
+            
+            el.append(out iter);
+        
+            
+            el.set_value(iter, 0, "");
+            el.set_value(iter, 1, "-- select a project --");
+            if (id == "") {
+                   _this.project_id.el.set_active_iter(iter);
+            }
+            var projects = rt.projects;
+            foreach(var project in projects) {
+            
+                el.append(out iter);
+                
+                el.set_value(iter, 0, project.id);
+                el.set_value(iter, 1,  project.name );
+                if (id == project.id) {
+                          _this.project_id.el.set_active_iter(iter);
+                   }   
+                
+            }
+            
+            _this.project_id.loading = false;
+             //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
+                                             
+        }
+    }
+
+
+    public class Xcls_summary : Object
+    {
+        public Gtk.Entry el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_summary(Ticket _owner )
+        {
+            _this = _owner;
+            _this.summary = this;
+            this.el = new Gtk.Entry();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.visible = true;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_Label10 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label10(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Milestone" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+            this.el.justify = Gtk.Justification.RIGHT;
+            this.el.xalign = 0.900000f;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_milestone_id : Object
+    {
+        public Gtk.ComboBox el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+        public bool loading;
+
+        // ctor
+        public Xcls_milestone_id(Ticket _owner )
+        {
+            _this = _owner;
+            _this.milestone_id = this;
+            this.el = new Gtk.ComboBox.with_entry();
+
+            // my vars (dec)
+            this.loading = false;
+
+            // set gobject values
+            var child_0 = new Xcls_msmodel( _this );
+            child_0.ref();
+            this.el.set_model (  child_0.el  );
+
+            // init method
+
+            this.el.set_entry_text_column(1);
+        }
+
+        // user defined functions
+        public string selectedMilestoneId () {
+               Gtk.TreeIter iter;
+               Value val1;
+         
+         
+               this.el.get_active_iter (out iter);
+               _this.msmodel.el.get_value (iter, 0, out val1);
+         
+        
+               return  (string) val1;
+               
+               
+               
+               
+        }
+    }
+    public class Xcls_msmodel : Object
+    {
+        public Gtk.ListStore el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_msmodel(Ticket _owner )
+        {
+            _this = _owner;
+            _this.msmodel = this;
+            this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+        public void loadMilestones (string id) {
+        
+            var rt = RooTicket.singleton();
+           // rt.loadProjects();
+            
+            _this.milestone_id.loading = true;
+        
+            this.el.clear();                                    
+            Gtk.TreeIter iter;
+            var el = this.el;
+            
+            el.append(out iter);
+        
+            
+            el.set_value(iter, 0, "");
+            el.set_value(iter, 1, "-- select a milestone --");
+                   _this.milestone_id.el.set_active_iter(iter);    
+            /*
+            if (id == "") {
+        
+            }
+            var projects = rt.projects;
+            foreach(var project in projects) {
+            
+                el.append(out iter);
+                
+                el.set_value(iter, 0, project.id);
+                el.set_value(iter, 1,  project.name );
+                if (id == project.id) {
+                          _this.milestone.el.set_active_iter(iter);
+                   }   
+                
+            }
+            */
+            
+            _this.milestone_id.loading = false;
+             //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
+                                             
+        }
+    }
+
+
+    public class Xcls_Label13 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label13(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Description" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_description : Object
+    {
+        public Gtk.TextView el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_description(Ticket _owner )
+        {
+            _this = _owner;
+            _this.description = this;
+            this.el = new Gtk.TextView();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.border_width = 1;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_Label15 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label15(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Priority" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+            this.el.xalign = 0.900000f;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_priority_id : Object
+    {
+        public Gtk.ComboBox el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+        public bool loading;
+
+        // ctor
+        public Xcls_priority_id(Ticket _owner )
+        {
+            _this = _owner;
+            _this.priority_id = this;
+            this.el = new Gtk.ComboBox.with_entry();
+
+            // my vars (dec)
+            this.loading = false;
+
+            // set gobject values
+            var child_0 = new Xcls_primodel( _this );
+            child_0.ref();
+            this.el.set_model (  child_0.el  );
+
+            // init method
+
+            this.el.set_entry_text_column(1);
+        }
+
+        // user defined functions
+        public string selectedPriorityId () {
+               Gtk.TreeIter iter;
+               Value val1;
+         
+         
+               this.el.get_active_iter (out iter);
+               _this.primodel.el.get_value (iter, 0, out val1);
+         
+        
+               return  (string) val1;
+               
+               
+               
+               
+        }
+    }
+    public class Xcls_primodel : Object
+    {
+        public Gtk.ListStore el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_primodel(Ticket _owner )
+        {
+            _this = _owner;
+            _this.primodel = this;
+            this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+        public void loadPriority (string id) {
+        
+            var rt = RooTicket.singleton();
+           // rt.loadProjects();
+            
+            _this.priority_id.loading = true;
+        
+            this.el.clear();                                    
+            Gtk.TreeIter iter;
+            var el = this.el;
+            
+            el.append(out iter);
+        
+            
+            el.set_value(iter, 0, "");
+            el.set_value(iter, 1, "-- select priority --");
+           // if (id == "") {
+                   _this.priority_id.el.set_active_iter(iter);
+            //}
+            /*var projects = rt.projects;
+            foreach(var project in projects) {
+            
+                el.append(out iter);
+                
+                el.set_value(iter, 0, project.id);
+                el.set_value(iter, 1,  project.name );
+                if (id == project.id) {
+                          _this.priority_id.el.set_active_iter(iter);
+                   }   
+                
+            }
+            */
+            _this.priority_id.loading = false;
+                   
+                                             
+        }
+    }
+
+
+    public class Xcls_Label18 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label18(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Severity" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_severity_id : Object
+    {
+        public Gtk.ComboBox el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+        public bool loading;
+
+        // ctor
+        public Xcls_severity_id(Ticket _owner )
+        {
+            _this = _owner;
+            _this.severity_id = this;
+            this.el = new Gtk.ComboBox.with_entry();
+
+            // my vars (dec)
+            this.loading = false;
+
+            // set gobject values
+            var child_0 = new Xcls_sevmodel( _this );
+            child_0.ref();
+            this.el.set_model (  child_0.el  );
+
+            // init method
+
+            this.el.set_entry_text_column(1);
+        }
+
+        // user defined functions
+        public string selectedSeverityId () {
+               Gtk.TreeIter iter;
+               Value val1;
+         
+         
+               this.el.get_active_iter (out iter);
+               _this.sevmodel.el.get_value (iter, 0, out val1);
+         
+        
+               return  (string) val1;
+               
+               
+               
+               
+        }
+    }
+    public class Xcls_sevmodel : Object
+    {
+        public Gtk.ListStore el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_sevmodel(Ticket _owner )
+        {
+            _this = _owner;
+            _this.sevmodel = this;
+            this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+        public void loadProjects (string id) {
+        
+            var rt = RooTicket.singleton();
+            //rt.loadProjects();
+            
+            _this.severity_id.loading = true;
+        
+            this.el.clear();                                    
+            Gtk.TreeIter iter;
+            var el = this.el;
+            
+            el.append(out iter);
+        
+            
+            el.set_value(iter, 0, "");
+            el.set_value(iter, 1, "-- select severity --");
+           // if (id == "") {
+                   _this.severity_id.el.set_active_iter(iter);
+           // }
+           /*
+            var projects = rt.projects;
+            foreach(var project in projects) {
+            
+                el.append(out iter);
+                
+                el.set_value(iter, 0, project.id);
+                el.set_value(iter, 1,  project.name );
+                if (id == project.id) {
+                          _this.projectsel.el.set_active_iter(iter);
+                   }   
+                
+            }
+            */
+            _this.severity_id.loading = false;
+             //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
+                                             
+        }
+    }
+
+
+    public class Xcls_Label21 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label21(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Classification" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_classification_id : Object
+    {
+        public Gtk.ComboBox el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+        public bool loading;
+
+        // ctor
+        public Xcls_classification_id(Ticket _owner )
+        {
+            _this = _owner;
+            _this.classification_id = this;
+            this.el = new Gtk.ComboBox.with_entry();
+
+            // my vars (dec)
+            this.loading = false;
+
+            // set gobject values
+            var child_0 = new Xcls_clmodel( _this );
+            child_0.ref();
+            this.el.set_model (  child_0.el  );
+
+            // init method
+
+            this.el.set_entry_text_column(1);
+        }
+
+        // user defined functions
+        public string selectedProjectId () {
+               Gtk.TreeIter iter;
+               Value val1;
+         
+         
+               this.el.get_active_iter (out iter);
+               _this.prmodel.el.get_value (iter, 0, out val1);
+         
+        
+               return  (string) val1;
+               
+               
+               
+               
+        }
+    }
+    public class Xcls_clmodel : Object
+    {
+        public Gtk.ListStore el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_clmodel(Ticket _owner )
+        {
+            _this = _owner;
+            _this.clmodel = this;
+            this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+        public void loadClassifications (string id) {
+        
+            var rt = RooTicket.singleton();
+            // rt.loadProjects();
+            
+            _this.classification_id.loading = true;
+        
+            this.el.clear();                                    
+            Gtk.TreeIter iter;
+            var el = this.el;
+            
+            el.append(out iter);
+        
+            
+            el.set_value(iter, 0, "");
+            el.set_value(iter, 1, "-- select a project --");
+            if (id == "") {
+                   _this.classification_id.el.set_active_iter(iter);
+            }
+            /*
+            var projects = rt.projects;
+            foreach(var project in projects) {
+            
+                el.append(out iter);
+                
+                el.set_value(iter, 0, project.id);
+                el.set_value(iter, 1,  project.name );
+                if (id == project.id) {
+                          _this.classification_id.el.set_active_iter(iter);
+                   }   
+                
+            }
+            */
+            _this.classification_id.loading = false;
+             //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
+                                             
+        }
+    }
+
+
+    public class Xcls_Label24 : Object
+    {
+        public Gtk.Label el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Label24(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Label( "Assign to" );
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.halign = Gtk.Align.START;
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_developer_id : Object
+    {
+        public Gtk.ComboBox el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+        public bool loading;
+
+        // ctor
+        public Xcls_developer_id(Ticket _owner )
+        {
+            _this = _owner;
+            _this.developer_id = this;
+            this.el = new Gtk.ComboBox.with_entry();
+
+            // my vars (dec)
+            this.loading = false;
+
+            // set gobject values
+            var child_0 = new Xcls_devmodel( _this );
+            child_0.ref();
+            this.el.set_model (  child_0.el  );
+
+            // init method
+
+            this.el.set_entry_text_column(1);
+        }
+
+        // user defined functions
+        public string selectedDeveloperId () {
+               Gtk.TreeIter iter;
+               Value val1;
+         
+         
+               this.el.get_active_iter (out iter);
+               _this.devmodel.el.get_value (iter, 0, out val1);
+         
+        
+               return  (string) val1;
+               
+               
+               
+               
+        }
+    }
+    public class Xcls_devmodel : Object
+    {
+        public Gtk.ListStore el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_devmodel(Ticket _owner )
+        {
+            _this = _owner;
+            _this.devmodel = this;
+            this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+        public void loadDevelopers (string id) {
+        
+            var rt = RooTicket.singleton();
+            //rt.loadProjects();
+            
+            _this.developer_id.loading = true;
+        
+            this.el.clear();                                    
+            Gtk.TreeIter iter;
+            var el = this.el;
+            
+            el.append(out iter);
+        
+            
+            el.set_value(iter, 0, "");
+            el.set_value(iter, 1, "-- select a project --");
+            if (id == "") {
+                   _this.developer_id.el.set_active_iter(iter);
+            }
+            /*
+            var projects = rt.projects;
+            foreach(var project in projects) {
+            
+                el.append(out iter);
+                
+                el.set_value(iter, 0, project.id);
+                el.set_value(iter, 1,  project.name );
+                if (id == project.id) {
+                          _this.projectsel.el.set_active_iter(iter);
+                   }   
+                
+            }
+            */
+            _this.developer_id.loading = false;
+             //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
+                                             
+        }
+    }
+
+
+    public class Xcls_Button27 : Object
+    {
+        public Gtk.Button el;
+        private Ticket  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Button27(Ticket _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Button();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.label = "Create Branch";
+
+            // init method
+
+            {
+               this.el.get_style_context().add_class("suggested-action");
+            }
+
+            //listeners
+            this.el.clicked.connect( () => {
+               GLib.debug("fire response = 1");
+               _this.el.response(1);
+            });
+        }
+
+        // user defined functions
+    }
+
+
+
+}
index 88c1719..572b90f 100644 (file)
@@ -20,7 +20,8 @@
             "..//gitlive/RooTicket.vala",
             "..//gitlive/MergeBranch.vala",
             "..//gitlive/RepoStatusPopover.vala",
             "..//gitlive/RooTicket.vala",
             "..//gitlive/MergeBranch.vala",
             "..//gitlive/RepoStatusPopover.vala",
-            "..//gitlive/Clone.vala"
+            "..//gitlive/Clone.vala",
+            "..//gitlive/Ticket.vala"
         ],
         "packages" : [
         ]
         ],
         "packages" : [
         ]