NewBranch.bjs
[gitlive] / NewBranch.bjs
1 {
2  "name" : "NewBranch",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/gitlive/NewBranch.bjs",
6  "permname" : "",
7  "modOrder" : "",
8  "build_module" : "gitlive",
9  "items" : [
10   {
11    "listeners" : {
12     "delete_event" : "(self, event) => {\n    this.el.hide();\n    return true; \n    //test  \n}\n ",
13     "response" : " (self, response_id) =>  { \n  \n\t GLib.debug(\"got %d\", (int) response_id);\n}",
14     "show" : "(self)  => {\n \n\n  //test\n}"
15    },
16    "default_width" : 500,
17    "$ deletable" : true,
18    "title" : "Create a working branch ",
19    "xtype" : "Dialog",
20    "|   void show" : "( ) \n{\n     // this.el.set_gravity(Gdk.Gravity.NORTH);\n    \n    \n      \n}",
21    "default_height" : 200,
22    "$ xns" : "Gtk",
23    "bool modal" : true,
24    "items" : [
25     {
26      "xtype" : "VBox",
27      "$ pack" : "get_content_area().add",
28      "$ xns" : "Gtk",
29      "items" : [
30       {
31        "* pack" : "pack_start,false,false,0",
32        "xtype" : "Table",
33        "n_columns" : 2,
34        "$ xns" : "Gtk",
35        "n_rows" : 2,
36        "$ homogeneous" : true,
37        "items" : [
38         {
39          "label" : "Select Ticket",
40          "$ visible" : true,
41          "xalign" : 0.90000000000000002,
42          "* pack" : "attach_defaults,0,1,0,1",
43          "xtype" : "Label",
44          "$ justify" : "Gtk.Justification.RIGHT",
45          "x_options" : 4,
46          "$ xns" : "Gtk"
47         },
48         {
49          "id" : "build_module",
50          "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
51          "* pack" : "attach_defaults,1,2,0,1",
52          "xtype" : "ComboBox",
53          "$ xns" : "Gtk",
54          "items" : [
55           {
56            "id" : "dbcellrenderer",
57            "xtype" : "CellRendererText",
58            "* pack" : "pack_start,true",
59            "$ xns" : "Gtk"
60           },
61           {
62            "id" : "dbmodel",
63            "xtype" : "ListStore",
64            "* pack" : "set_model",
65            "| void loadTickets" : "  () {\n\n    RooTicket.singleton().loadTickets();\n    \n    \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.build_module.el.set_active_iter(iter);\n    var tickets = RooTicket.singleton().tickets;\n    foreach(var ticket in tickets) {\n    \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     //this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n",
66            "$ columns" : "typeof(string),typeof(string)",
67            "n_columns" : 2,
68            "$ xns" : "Gtk"
69           }
70          ]
71         },
72         {
73          "label" : "or use this as branch name",
74          "xalign" : 0.90000000000000002,
75          "* pack" : "attach_defaults,0,1,1,2",
76          "xtype" : "Label",
77          "$ justify" : "Gtk.Justification.RIGHT",
78          "x_options" : 4,
79          "$ xns" : "Gtk"
80         },
81         {
82          "id" : "name",
83          "$ visible" : true,
84          "xtype" : "Entry",
85          "* pack" : "attach_defaults,1,2,1,2",
86          "$ xns" : "Gtk"
87         }
88        ]
89       }
90      ]
91     },
92     {
93      "label" : "Do not create Branch",
94      "xtype" : "Button",
95      "* pack" : "add_action_widget,0",
96      "Gtk.ReliefStyle relief" : "Gtk.ReliefStyle.NONE",
97      "$ xns" : "Gtk"
98     },
99     {
100      "label" : "Create Branch",
101      "xtype" : "Button",
102      "* pack" : "add_action_widget,1",
103      "$ xns" : "Gtk"
104     }
105    ]
106   }
107  ]
108 }