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\tthis.el.move((Gdk.Screen.width() / 2)- 250 ,0);\n       \tGLib.debug(\"Loading tickets\"); \n \t_this.dbmodel.loadTickets();\n\n    this.el.show_all();\n\n\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        "bool homogeneous" : false,
32        "* pack" : "pack_start,false,false,0",
33        "xtype" : "Table",
34        "n_columns" : 2,
35        "$ xns" : "Gtk",
36        "n_rows" : 2,
37        "int margin" : 2,
38        "items" : [
39         {
40          "label" : "Select Ticket",
41          "$ visible" : true,
42          "xalign" : 0.90000000000000002,
43          "* pack" : "attach_defaults,0,1,0,1",
44          "xtype" : "Label",
45          "$ justify" : "Gtk.Justification.RIGHT",
46          "x_options" : 4,
47          "$ xns" : "Gtk"
48         },
49         {
50          "id" : "build_module",
51          "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
52          "* pack" : "attach_defaults,1,2,0,1",
53          "xtype" : "ComboBox",
54          "$ xns" : "Gtk",
55          "items" : [
56           {
57            "id" : "dbcellrenderer",
58            "xtype" : "CellRendererText",
59            "* pack" : "pack_start,true",
60            "$ xns" : "Gtk"
61           },
62           {
63            "id" : "dbmodel",
64            "xtype" : "ListStore",
65            "* pack" : "set_model",
66            "| 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",
67            "$ columns" : "typeof(string),typeof(string)",
68            "n_columns" : 2,
69            "$ xns" : "Gtk"
70           }
71          ]
72         },
73         {
74          "label" : "or use this as branch name",
75          "xalign" : 0.90000000000000002,
76          "* pack" : "attach_defaults,0,1,1,2",
77          "xtype" : "Label",
78          "$ justify" : "Gtk.Justification.RIGHT",
79          "x_options" : 4,
80          "$ xns" : "Gtk"
81         },
82         {
83          "id" : "name",
84          "$ visible" : true,
85          "xtype" : "Entry",
86          "* pack" : "attach_defaults,1,2,1,2",
87          "$ xns" : "Gtk"
88         }
89        ]
90       }
91      ]
92     },
93     {
94      "label" : "Do not create Branch",
95      "xtype" : "Button",
96      "* pack" : "add_action_widget,0",
97      "Gtk.ReliefStyle relief" : "Gtk.ReliefStyle.NONE",
98      "$ xns" : "Gtk"
99     },
100     {
101      "label" : "Create Branch",
102      "xtype" : "Button",
103      "* pack" : "add_action_widget,1",
104      "$ xns" : "Gtk"
105     }
106    ]
107   }
108  ]
109 }