0c459deee7a6bf4ac04c39e28ef8e511d48bc6f3
[gitlive] / Clone.bjs
1 {
2  "name" : "Clone",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/gitlive/Clone.bjs",
6  "permname" : "",
7  "modOrder" : "",
8  "build_module" : "gitlive",
9  "items" : [
10   {
11    "GitRepo repo" : "",
12    "| void show" : " (Gtk.Widget btn, GitRepo repo) {\n \n    \t//console.log('show all');\n\tthis.el.set_modal(true);\n\tthis.el.set_relative_to(btn);\n  \n\t//this.el.set_position(Gtk.PositionType.RIGHT);\n\n\t// window + header?\n\t GLib.debug(\"SHOWALL - POPIP\\n\");\n\tthis.el.show_all();\n;\n}\n",
13    "xtype" : "Popover",
14    "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
15    "$ xns" : "Gtk",
16    "bool modal" : true,
17    "uint border_width" : 0,
18    "items" : [
19     {
20      "* pack" : "pack_end,false,false,0",
21      "xtype" : "Box",
22      "gboolean expand" : false,
23      "$ xns" : "Gtk",
24      "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
25      "gboolean vexpand" : false,
26      "items" : [
27       {
28        "* ctor" : "new Gtk.ComboBox.with_entry()",
29        "| string selectedRepo" : "() {\n\tGtk.TreeIter iter;\n\tValue val1;\n \n \n\tthis.el.get_active_iter (out iter);\n\t_this.repomodel.el.get_value (iter, 0, out val1);\n \n\n\treturn  (string) val1;\n\t\n\t\n\t\n\t\n}\n",
30        "id" : "reposel",
31        "* init" : "this.el.set_entry_text_column(1);",
32        "bool hexpand" : true,
33        "* pack" : "attach_defaults,0,1,1,2",
34        "xtype" : "ComboBox",
35        "# bool loading" : false,
36        "$ xns" : "Gtk",
37        "items" : [
38         {
39          "id" : "prcellrenderer",
40          "* pack" : "pack_start,true",
41          "xtype" : "CellRendererText",
42          "$ xns" : "Gtk"
43         },
44         {
45          "| void loadProjects" : "  (string id) {\n\n    var rt = RooTicket.singleton();\n    var gr = GitRepo.singleton();\n    _this.reposel.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 repo --\");\n \n\t_this.reposel.el.set_active_iter(iter);\n    \n    var projects = rt.projects;\n    foreach(var project in rt.repos) {\n    \n    \tforeach(\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.reposel.loading = false;\n     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
46          "id" : "prmodel",
47          "* pack" : "set_model",
48          "xtype" : "ListStore",
49          "$ columns" : "typeof(string),typeof(string)",
50          "n_columns" : 2,
51          "$ xns" : "Gtk"
52         }
53        ]
54       },
55       {
56        "listeners" : {
57         "button_press_event" : "() => {\n       _this.el.hide();\n        return false;\n}"
58        },
59        "label" : "Checkout",
60        "* pack" : "add",
61        "xtype" : "Button",
62        "$ xns" : "Gtk"
63       }
64      ]
65     }
66    ]
67   }
68  ]
69 }