MergeBranch.bjs
[gitlive] / MergeBranch.bjs
index 5449642..da8e150 100644 (file)
@@ -33,8 +33,8 @@
       {
        "id" : "table",
        "bool homogeneous" : false,
-       "* pack" : "pack_start,false,false,0",
        "xtype" : "Table",
+       "* pack" : "pack_start,false,false,0",
        "uint column_spacing" : 2,
        "n_columns" : 2,
        "$ xns" : "Gtk",
           },
           {
            "id" : "dbmodel",
-           "xtype" : "ListStore",
            "* pack" : "set_model",
            "| void loadTickets" : "  () {\n\n    RooTicket.singleton().loadTickets(\"\",RooTicket.Who.ME, RooTicket.Status.ACTIVE);\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    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a ticket --\");\n    \n    _this.ticketsel.el.set_active_iter(iter);\n    \n    if (_this.ticket != null &&  _this.ticket.id == \"-1\") {\n\t\tel.append(out iter);\n\t\tel.set_value(iter, 0, \"-1\");\n\t\tel.set_value(iter, 1, \"Temporary Branch - No ticket specified/relivant\");\n        _this.ticketsel.el.set_active_iter(iter);\t\n    }\n    \n    \n    \n    \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\t\tif (_this.ticket != null && _this.ticket.id == ticket.id) {\n\t\t    _this.ticketsel.el.set_active_iter(iter);\n\t    }\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)",
         }
        ]
       },
+      {
+       "* pack" : "add",
+       "xtype" : "Notebook",
+       "$ xns" : "Gtk",
+       "bool vexpand" : true,
+       "items" : [
+        {
+         "id" : "label_diff",
+         "* pack" : false,
+         "xtype" : "Label",
+         "string label" : "Projected Commit Diff",
+         "$ xns" : "Gtk"
+        },
+        {
+         "string label" : "Ticket Details",
+         "* pack" : false,
+         "xtype" : "Label",
+         "$ xns" : "Gtk"
+        }
+       ]
+      },
       {
        "int height_request" : 500,
        "id" : "scrolled_window",
        "items" : [
         {
          "id" : "view",
-         "xtype" : "WebView",
          "* pack" : "add",
+         "xtype" : "WebView",
          "$ xns" : "WebKit",
          "| void loadTicket" : "(string tid) {\n\tint h,w;\n\t_this.el.get_size(out w, out h);\n\t\n\tif (tid == \"\") {\n\t\t_this.scrolled_window.el.hide();\n\t\t_this.el.resize(w, 150);\n\t} else {\n\t\t_this.scrolled_window.el.show();\n\t\t_this.el.resize(w, 800);\n\t}\n\t\n\tvar rs =  RooTicket.singleton();\t\t\n\tvar uri = new WebKit.URIRequest(\"https://roojs.com/admin.php/MTrack/View/\" + tid);\n\tvar hd = uri.get_http_headers();\n\tvar authCode = Base64.encode (\"%s:%s\".printf(rs.username, rs.password).data);\n\thd.append(\"Authorization\", \"Basic %s\".printf(authCode));\n\t\n\t this.el.load_request(uri);\n}\n"
         }