X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=NewBranch.bjs;h=8d39c3785ad581232a831899aa4299da8e712f99;hb=48b3d2b4281bfa78ae11b4dfb5f91d5475aefd90;hp=973bd4680c47bb7ad6cbd7e39d46ee74b09a3229;hpb=629cbba854e1d1c4e5518e4c179308f9ed8a0918;p=gitlive diff --git a/NewBranch.bjs b/NewBranch.bjs index 973bd468..8d39c378 100644 --- a/NewBranch.bjs +++ b/NewBranch.bjs @@ -28,12 +28,14 @@ "$ xns" : "Gtk", "items" : [ { + "bool homogeneous" : false, "* pack" : "pack_start,false,false,0", "xtype" : "Table", + "uint column_spacing" : 2, "n_columns" : 2, "$ xns" : "Gtk", "n_rows" : 2, - "$ homogeneous" : true, + "int margin" : 2, "items" : [ { "label" : "Select Ticket", @@ -46,6 +48,9 @@ "$ xns" : "Gtk" }, { + "listeners" : { + "changed" : "() => {\n\tGtk.TreeIter iter;\n\tValue val1;\n\tValue val2;\n \n\tthis.el.get_active_iter (out iter);\n\t_this.dbmodel.el.get_value (iter, 0, out val1);\n\t_this.dbmodel.el.get_value (iter, 1, out val2);\n\n\tvar ticket_id = (string) val1;\n\t\n\tif (ticket_id == \"\") {\n\t\t_this.name.el.set_text(\"wip_NAME_DATE\");\n\t\treturn;\n\t}\n\t\n\tvar ticket = RooTicket.singleton().getById(ticket_id);\n \n\t_this.name.el.set_text(\"wip_NAME_T%s_%s\".printf(ticket.id, ticket.summaryToBranchName()));\n\t\n\t//GLib.debug (\"Selection: %s, %s\\n\", (string) val1, (string) val2);\n}" + }, "id" : "build_module", "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );", "* pack" : "attach_defaults,1,2,0,1",