Partial Fix #5639 - gitlive - general tidy ups
authorAlan Knowles <alan@roojs.com>
Mon, 31 Dec 2018 01:37:25 +0000 (09:37 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 31 Dec 2018 01:37:25 +0000 (09:37 +0800)
Clones.bjs
Clones.vala
MergeBranch.bjs
MergeBranch.vala
RepoStatusPopover.bjs

index 30e9f78..d1c1402 100644 (file)
@@ -13,9 +13,9 @@
     "response" : "(self, response_id) =>  { \n \n        this.el.hide();\n  \n}"
    },
    "boolean deletable" : true,
-   "| void loadAndShow" : "() {\n\t\n\t_this.el.show_all();\n\t\n\t_this.toolbar.el.hide();\n\t_this.scrolled.el.hide();\n\t_this.spinner.el.show();\n\t_this.spinner.el.start();\t\n\t\n\tGitRepo.updateAll(\"show_clones\");\n\tthis.el.set_deletable(true);\n    this.el.set_gravity(Gdk.Gravity.NORTH);\n    this.el.move((Gdk.Screen.width() / 2 ) -400 ,0);\n     this.el.set_keep_above(true);\n    this.el.set_default_size(\n\t\t\tint.min(1024,Gdk.Screen.width()),\n\t\t\tint.max(500,Gdk.Screen.height() - 300)\n\t);\n     \n \n\t\n\t\n}\n\n",
+   "| void loadAndShow" : "() {\n\tthis.el.set_deletable(true);\n    this.el.set_gravity(Gdk.Gravity.NORTH);\n    this.el.move((Gdk.Screen.width() / 2 ) - (int.min(1280,Gdk.Screen.width()) / 2) ,0);\n     this.el.set_keep_above(true);\n    this.el.set_default_size(\n\t\t\tint.min(1280,Gdk.Screen.width()),\n\t\t\tint.max(500,Gdk.Screen.height() - 200)\n\t);\n\tthis.el.show_all();\n\t\n\tthis.toolbar.el.hide();\n\tthis.scrolled.el.hide();\n\tthis.spinner.el.show();\n\tthis.spinner.el.start();\t\n\t\n\tGitRepo.updateAll(\"show_clones\");\n\t\n     \n \n\t\n\t\n}\n\n",
    "default_width" : 1024,
-   "| void show" : "()    {\n\n    this.el.show_all();\n\t_this.spinner.el.stop();\n\t_this.spinner.el.hide();\t\n\t_this.toolbar.el.show();\n\t_this.scrolled.el.show();\t\n \n    this.el.set_deletable(true);\n    this.el.set_gravity(Gdk.Gravity.NORTH);\n    this.el.move((Gdk.Screen.width() / 2 ) -400 ,0);\n     this.el.set_keep_above(true);\n    this.el.set_default_size(\n\t\t\tint.min(1024,Gdk.Screen.width()),\n\t\t\tint.max(500,Gdk.Screen.height() - 300)\n\t);\n     \n\n    _this.reposStore.load();\n   \n    GLib.debug(\"show clones = run?\");\n    this.el.run();\n    // load clones..\n//     this.get('/reposStore').load();\n    \n    //this.get('/ok_button').el.set_sensitive(false);\n    \n    // block until we return.\n//    var run_ret = this.el.run();\n//    if (run_ret < 1 ) {\n//        return  \"DONE\";\n//    }\n//    print(\"RUN RETURN : \" + run_ret);\n//    return \"DONE\";\n    //print(JSON.stringify(this.get('bug').getValue()));\n   // return this.get('bug').getValue();\n    //this.success = c.success;\n}\n",
+   "| void show" : "()    {\nthis.el.set_deletable(true);\n    this.el.set_gravity(Gdk.Gravity.NORTH);\n    this.el.move((Gdk.Screen.width() / 2 ) - (int.max(1280,Gdk.Screen.width()) / 2) ,0);\n     this.el.set_keep_above(true);\n   this.el.set_default_size(\n\t\t\tint.max(1280,Gdk.Screen.width()),\n\t\t\tint.max(500,Gdk.Screen.height() - 100)\n\t);\n    this.el.show_all();\n\tthis.spinner.el.stop();\n\tthis.spinner.el.hide();\t\n\tthis.toolbar.el.show();\n\tthis.scrolled.el.show();\t\n \n    \n     \n\n    this.reposStore.load();\n   \n    GLib.debug(\"show clones = run?\");\n    this.el.run();\n    // load clones..\n//     this.get('/reposStore').load();\n    \n    //this.get('/ok_button').el.set_sensitive(false);\n    \n    // block until we return.\n//    var run_ret = this.el.run();\n//    if (run_ret < 1 ) {\n//        return  \"DONE\";\n//    }\n//    print(\"RUN RETURN : \" + run_ret);\n//    return \"DONE\";\n    //print(JSON.stringify(this.get('bug').getValue()));\n   // return this.get('bug').getValue();\n    //this.success = c.success;\n}\n",
    "title" : "Manage Clones",
    "xtype" : "Dialog",
    "default_height" : 500,
        "items" : [
         {
          "listeners" : {
-          "row_activated" : "(path, col)  =>  {\n\n\tif (col.title != \"Current Branch\") {\n\t\treturn;\n\t}\n\t\n\t//\n\t\n\tGtk.TreeIter iter;\n\t_this.reposStore.el.get_iter(out iter, path);\n\tGLib.Value val;\n    _this.reposStore.el.get_value(iter, 6, out val);\n    var git_working_dir = (string)val;\n    \n    var repo = GitRepo.singleton().get(git_working_dir);\n    \n    Gdk.Rectangle rect;\n    _this.reposView.el.get_cell_area(path, col, out rect);\n    RepoStatusPopover.singleton().show(this.el, rect, repo);\n    \n     \n    \n}",
+          "row_activated" : "(path, col)  =>  {\n\n\tif (col.title == \"Auto Commit\" || col.title == \"Auto Push\" || col.title == \"Auto Branch\") {\n\t\treturn;\n\t}\n\t\n\t//\n\t\n\tGtk.TreeIter iter;\n\t_this.reposStore.el.get_iter(out iter, path);\n\tGLib.Value val;\n    _this.reposStore.el.get_value(iter, 6, out val);\n    var git_working_dir = (string)val;\n    \n    var repo = GitRepo.singleton().get(git_working_dir);\n    \n    Gdk.Rectangle rect;\n    _this.reposView.el.get_cell_area(path, col, out rect);\n    RepoStatusPopover.singleton().show(this.el, rect, repo);\n    \n     \n    \n}",
           "cursor_changed" : "()  => {\n  // SEE SELECTION.CHANGED\n  /*\n  \n  return;\n  \n    if (this.el.get_selection().count_selected_rows() < 1) {\n        //nothing? - clea it?\n        return;\n    }\n        var ret = {};         \n    var model = this.get('/changedFilesStore');\n\n     var s = this.el.get_selection();\n     var files = [];\n    s.selected_foreach(function(model,p,iter) {\n    \n       files.push( model.get_value(iter, 0).value.get_string());\n     \n    });\n    this.get('/patchview').showDiff(files); \n    //var value = ''+ ret.model.get_value(ret.iter, 1).value.get_string();\n     //print(\"OUT?\" + value);// id..\n    // load the list in the right grid..\n     \n    return true;\n*/\n}"
          },
          "id" : "reposView",
-         "* init" : " \n{\n    var selection = this.el.get_selection();\n    selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n    var description = new Pango.FontDescription();\n    description.set_size(10000);\n    this.el.override_font(description);\n \n}\n",
          "bool activate_on_single_click" : true,
+         "* init" : " \n{\n    var selection = this.el.get_selection();\n    selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n    var description = new Pango.FontDescription();\n    description.set_size(10000);\n    this.el.override_font(description);\n \n}\n",
          "xtype" : "TreeView",
          "* pack" : "add",
          "int search_column" : 0,
               "toggled" : "  (self, path)  => {\n  \n  \tGtk.TreeIter iter;\n  \t_this.reposStore.el.get_iter_from_string(out iter, path);\n  \t\n  \tGLib.Value val;\n  \tGLib.Value rval;\n  \t_this.reposStore.el.get_value(iter, 4, out val);\n  \t_this.reposStore.el.get_value(iter, 6, out rval);\n  \t\n  \tvar repopath = (string)rval;\n  \tvar bval = (bool)val;\n  \t_this.reposStore.el.set_value(iter, 4, !bval);\n  \tGLib.debug(\"got repopath? %s\", repopath);\n  \t\n  \tvar repo = GitRepo.get(repopath);\n  \trepo.set_autocommit(!bval);\n  \t\n  \t\n  \t\n  \n}"
              },
              "id" : "cr_autocommit",
-             "xtype" : "CellRendererToggle",
              "* pack" : "pack_start,false",
+             "xtype" : "CellRendererToggle",
              "$ xns" : "Gtk",
              "$ mode" : "Gtk.CellRendererMode.ACTIVATABLE"
             }
               "toggled" : "  (self, path)  => {\n  \n  \tGtk.TreeIter iter;\n  \t_this.reposStore.el.get_iter_from_string(out iter, path);\n  \t\n  \tGLib.Value val;\n  \tGLib.Value rval;\n  \t_this.reposStore.el.get_value(iter, 5, out val);\n  \t_this.reposStore.el.get_value(iter, 6, out rval);\n  \t\n  \tvar repopath = (string)rval;\n  \tvar bval = (bool)val;\n  \t_this.reposStore.el.set_value(iter, 5, !bval);\n  \tvar repo = GitRepo.get(repopath);\n  \trepo.set_autopush(!bval);\n  \t\n  \t\n  \t\n  \n}"
              },
              "id" : "cr_autopush",
-             "xtype" : "CellRendererToggle",
              "* pack" : "pack_start,false",
+             "xtype" : "CellRendererToggle",
              "$ xns" : "Gtk",
              "$ mode" : "Gtk.CellRendererMode.ACTIVATABLE"
             }
               "toggled" : "  (self, path)  => {\n  \n  \tGtk.TreeIter iter;\n  \t_this.reposStore.el.get_iter_from_string(out iter, path);\n  \t\n  \tGLib.Value val;\n  \tGLib.Value rval;\n  \t_this.reposStore.el.get_value(iter, 8, out val);\n  \t_this.reposStore.el.get_value(iter, 6, out rval);\n  \t\n  \tvar repopath = (string)rval;\n  \tvar bval = (bool)val;\n  \t_this.reposStore.el.set_value(iter, 8, !bval);\n  \tvar repo = GitRepo.get(repopath);\n  \trepo.set_auto_branch(!bval);\n  \t\n  \t\n  \t\n  \n}"
              },
              "id" : "cr_autobranch",
-             "* pack" : "pack_start,false",
              "xtype" : "CellRendererToggle",
+             "* pack" : "pack_start,false",
              "$ xns" : "Gtk",
              "$ mode" : "Gtk.CellRendererMode.ACTIVATABLE"
             }
           },
           {
            "id" : "tv_repo",
-           "Gtk.SortType sort_order" : "Gtk.SortType.ASCENDING",
            "* init" : "\n    this.el.add_attribute(_this.cr_repo.el , \"markup\", 0 );\n",
+           "Gtk.SortType sort_order" : "Gtk.SortType.ASCENDING",
            "title" : "Repo",
            "* pack" : "append_column",
            "xtype" : "TreeViewColumn",
            "items" : [
             {
              "id" : "cr_repo",
-             "xtype" : "CellRendererText",
              "* pack" : "pack_start,false",
+             "xtype" : "CellRendererText",
              "$ xns" : "Gtk"
             }
            ]
            "items" : [
             {
              "id" : "cr_active_ticket",
-             "* pack" : "pack_start,false",
              "xtype" : "CellRendererText",
+             "* pack" : "pack_start,false",
              "$ xns" : "Gtk"
             }
            ]
            "items" : [
             {
              "id" : "cr_current_branch",
-             "xtype" : "CellRendererText",
              "* pack" : "pack_start,false",
+             "xtype" : "CellRendererText",
              "$ xns" : "Gtk"
             }
            ]
            "items" : [
             {
              "id" : "cr_last_updated",
-             "xtype" : "CellRendererText",
              "* pack" : "pack_start,false",
+             "xtype" : "CellRendererText",
              "$ xns" : "Gtk"
             }
            ]
            "items" : [
             {
              "id" : "cr_all_branches",
-             "xtype" : "CellRendererText",
              "* pack" : "pack_start,false",
+             "xtype" : "CellRendererText",
              "$ xns" : "Gtk"
             }
            ]
index b152f76..123d5ae 100644 (file)
@@ -70,47 +70,47 @@ public class Clones : Object
 
     // user defined functions
     public void loadAndShow () {
-       
-       _this.el.show_all();
-       
-       _this.toolbar.el.hide();
-       _this.scrolled.el.hide();
-       _this.spinner.el.show();
-       _this.spinner.el.start();       
-       
-       GitRepo.updateAll("show_clones");
        this.el.set_deletable(true);
         this.el.set_gravity(Gdk.Gravity.NORTH);
-        this.el.move((Gdk.Screen.width() / 2 ) -400 ,0);
+        this.el.move((Gdk.Screen.width() / 2 ) - (int.min(1280,Gdk.Screen.width()) / 2) ,0);
          this.el.set_keep_above(true);
         this.el.set_default_size(
-                       int.min(1024,Gdk.Screen.width()),
-                       int.max(500,Gdk.Screen.height() - 300)
+                       int.min(1280,Gdk.Screen.width()),
+                       int.max(500,Gdk.Screen.height() - 200)
        );
+       this.el.show_all();
+       
+       this.toolbar.el.hide();
+       this.scrolled.el.hide();
+       this.spinner.el.show();
+       this.spinner.el.start();        
+       
+       GitRepo.updateAll("show_clones");
+       
          
      
        
        
     }
     public void show ()    {
-    
-        this.el.show_all();
-       _this.spinner.el.stop();
-       _this.spinner.el.hide();        
-       _this.toolbar.el.show();
-       _this.scrolled.el.show();       
-     
-        this.el.set_deletable(true);
+    this.el.set_deletable(true);
         this.el.set_gravity(Gdk.Gravity.NORTH);
-        this.el.move((Gdk.Screen.width() / 2 ) -400 ,0);
+        this.el.move((Gdk.Screen.width() / 2 ) - (int.max(1280,Gdk.Screen.width()) / 2) ,0);
          this.el.set_keep_above(true);
-        this.el.set_default_size(
-                       int.min(1024,Gdk.Screen.width()),
-                       int.max(500,Gdk.Screen.height() - 300)
+       this.el.set_default_size(
+                       int.max(1280,Gdk.Screen.width()),
+                       int.max(500,Gdk.Screen.height() - 100)
        );
+        this.el.show_all();
+       this.spinner.el.stop();
+       this.spinner.el.hide(); 
+       this.toolbar.el.show();
+       this.scrolled.el.show();        
+     
+        
          
     
-        _this.reposStore.load();
+        this.reposStore.load();
        
         GLib.debug("show clones = run?");
         this.el.run();
@@ -349,7 +349,7 @@ public class Clones : Object
             //listeners
             this.el.row_activated.connect( (path, col)  =>  {
             
-               if (col.title != "Current Branch") {
+               if (col.title == "Auto Commit" || col.title == "Auto Push" || col.title == "Auto Branch") {
                        return;
                }
                
index ecf0c11..28cf631 100644 (file)
@@ -13,8 +13,8 @@
     "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    \tGitMonitor.gitmonitor.start();\n\t \treturn;\n\t}\n\t /*\n\t// have they selected a ticket..\n\t// make that the current active ticket?\n\t// we really need to store locally what ticket is being worked on..\n\t// in theory we could be working on multiple project and not merging..\n\t// -- each repo would have their active ticket (only one per repo)\n\t// -- so we could just store that in there\n\t// -- initial load can check the contents of the ticket files on first scan.\n\tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\n    if (this.repo != null) {\n    \tvar bn = _this.name.el.get_text();\n    \tif (ticket_id != \"\" ) {\n\t\t\tthis.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn);\n\t\t} else {\n\t\t\tthis.repo.createBranchNamed(bn);\n\t\t}\n    }\n\t*/\n\t\n\tif (this.repo != null) {\n\t\trepo.doMerge(\n\t\t\t_this.actionsel.selectedAction(), \n\t\t\t_this.ticketsel.selectedTicketId(),\n\t\t\t_this.name.el.get_text()\n\t\t);\n\t\n\t} else {\n\t\tGitRepo.doMerges(\n\t\t\t_this.actionsel.selectedAction(), \n\t\t\t_this.ticketsel.selectedTicketId(),\n\t\t\t_this.name.el.get_text()\n\t\t);\n\t}\n\tthis.running = false; \n\n\t \n\t_this.el.hide();\t\n \tGitMonitor.gitmonitor.start();\n\n\t \n}"
    },
    "default_width" : 500,
-   "$ deletable" : true,
    "# GitRepo repo" : "",
+   "$ deletable" : true,
    "title" : "Merge Branch",
    "xtype" : "Dialog",
    "|   void show" : "(  RooTicket ticket, GitRepo? repo ) \n{\n     // this.el.set_gravity(Gdk.Gravity.NORTH);\n    if (this.running) {\n    \treturn;\n\t}\n\tGitMonitor.gitmonitor.stop();\n\t\n\t_this.el.show_all();\n\t\n\t_this.table.el.hide();\n\t_this.scrolled_window.el.hide();\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       \tGLib.debug(\"Loading tickets\"); \n \n\t\n    this.ticket = ticket;\n    this.repo = repo;\n    \n\t\n\tTimeout.add_seconds(1, () => {\n\t    _this.diff_view.el.get_buffer().set_text(\n\t    \trepo != null ? repo.previewMerge() : GitRepo.previewMerges(ticket.id)\n    \t);\t\t\n\t\t// if we are not working on a ticket, then we should be able to pick one?\n\t \t_this.dbmodel.loadTickets();\n\t \t_this.actionmodel.loadActions();\n\t\t_this.view.loadTicket(ticket.id);\n\t\t_this.spinner.el.stop();\n\t\t_this.spinner.el.hide();\t\n\n\t\tthis.table.el.show();\n\t\treturn false;\n\t});\n\t\n\tthis.el.run();\n\t \n}",
          "items" : [
           {
            "id" : "actioncellrenderer",
-           "xtype" : "CellRendererText",
            "* pack" : "pack_start,true",
+           "xtype" : "CellRendererText",
            "$ xns" : "Gtk"
           },
           {
            "id" : "actionmodel",
-           "xtype" : "ListStore",
            "* pack" : "set_model",
+           "xtype" : "ListStore",
            "$ columns" : "typeof(string),typeof(string)",
            "n_columns" : 2,
            "$ xns" : "Gtk",
          "items" : [
           {
            "id" : "dbcellrenderer",
-           "* pack" : "pack_start,true",
            "xtype" : "CellRendererText",
+           "* pack" : "pack_start,true",
            "$ xns" : "Gtk"
           },
           {
            "id" : "dbmodel",
-           "* pack" : "set_model",
            "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)",
            "n_columns" : 2,
        "items" : [
         {
          "id" : "label_diff",
-         "xtype" : "Label",
          "* pack" : false,
+         "xtype" : "Label",
          "string label" : "Projected Commit Diff",
          "$ xns" : "Gtk"
         },
         {
          "id" : "label_ticket",
-         "* pack" : false,
          "string label" : "Ticket Details",
+         "* pack" : false,
          "xtype" : "Label",
          "$ xns" : "Gtk"
         },
          "items" : [
           {
            "int height_request" : 400,
-           "xtype" : "ScrolledWindow",
            "* pack" : "pack_start,true,true,0",
+           "xtype" : "ScrolledWindow",
            "$ xns" : "Gtk",
            "items" : [
             {
              "id" : "diff_view",
-             "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(9000);\n    this.el.override_font(description);",
+             "* init" : " \n    var description =   Pango.FontDescription.from_string(\"monospace\");\n    description.set_size(9000);\n    this.el.override_font(description);\n         var lm = Gtk.SourceLanguageManager.get_default();\n                    \n    ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(\n        lm.get_language(\"diff\")\n    );",
              "xtype" : "View",
              "* pack" : "add",
              "$ xns" : "GtkSource"
            "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"
             }
     },
     {
      "label" : "Cancel",
-     "* pack" : "add_action_widget,0",
      "xtype" : "Button",
+     "* pack" : "add_action_widget,0",
      "Gtk.ReliefStyle relief" : "Gtk.ReliefStyle.NONE",
      "$ xns" : "Gtk"
     },
index 20fbc53..ca1f641 100644 (file)
@@ -802,6 +802,11 @@ public class MergeBranch : Object
             var description =   Pango.FontDescription.from_string("monospace");
                 description.set_size(9000);
                 this.el.override_font(description);
+                     var lm = Gtk.SourceLanguageManager.get_default();
+                                
+                ((Gtk.SourceBuffer)(this.el.get_buffer())).set_language(
+                    lm.get_language("diff")
+                );
         }
 
         // user defined functions
index 13510bf..2b996ec 100644 (file)
@@ -35,8 +35,8 @@
        "items" : [
         {
          "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH_HORIZ",
-         "* pack" : "add",
          "xtype" : "Toolbar",
+         "* pack" : "add",
          "$ xns" : "Gtk",
          "items" : [
           {
        "items" : [
         {
          "id" : "label_status",
-         "xtype" : "Label",
          "* pack" : false,
+         "xtype" : "Label",
          "$ xns" : "Gtk",
          "utf8 label" : "Status"
         },
         {
          "id" : "label_diff",
-         "* pack" : false,
          "xtype" : "Label",
+         "* pack" : false,
          "$ xns" : "Gtk",
          "utf8 label" : "Diff"
         },
          "items" : [
           {
            "int height_request" : 400,
-           "xtype" : "ScrolledWindow",
            "* pack" : "pack_start,true,true,0",
+           "xtype" : "ScrolledWindow",
            "$ xns" : "Gtk",
            "items" : [
             {
        "items" : [
         {
          "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH_HORIZ",
-         "xtype" : "Toolbar",
          "* pack" : "add",
+         "xtype" : "Toolbar",
          "$ xns" : "Gtk",
          "items" : [
           {