"title" : "Create a working branch ",
"xtype" : "Dialog",
"# GitRepo? repo" : "null",
- "| void show" : "( GitRepo repo, Gee.ArrayList<GitMonitorQueue> queue, string tid = \"\" ) \n{\n // this.el.set_gravity(Gdk.Gravity.NORTH);\n if (this.running) { // should not happen!!\n \tGLib.error(\"new branch show called, when already being displayed?\");\n\t}\n\t\n\t\n\tthis.queue = queue;\n\tthis.running = true;\n\tGitMonitor.gitmonitor.stop();\n\t\n\t\n this.repo = repo;\n\tthis.el.move((Gdk.Screen.width() / 2)- 250 ,0);\n\tthis.el.set_default_size( 500,200); // not sure why it grows..\n\t\n\t\n\t\n\t\n \n\n this.el.show_all();\n this.el.set_keep_above(true);\n\t\n\t_this.select_ticket_tab.load_data(tid);\n\t_this.create_ticket_tab.load_data();\n\t_this.quick_commit_tab.load_data();\n \n \n \n \n \n \n \n \tthis.el.run();\n\n}",
+ "| void show" : "( GitRepo repo, Gee.ArrayList<GitMonitorQueue> queue, string tid = \"\" ) \n{\n // this.el.set_gravity(Gdk.Gravity.NORTH);\n if (this.running) { // should not happen!!\n \tGLib.error(\"new branch show called, when already being displayed?\");\n\t}\n\t\n\t\n\tthis.queue = queue;\n\tthis.running = true;\n\tGitMonitor.gitmonitor.stop();\n\t\n\t\n this.repo = repo;\n\tthis.el.move((Gdk.Screen.width() / 2)- 250 ,0);\n\tthis.el.set_default_size( 500,200); // not sure why it grows..\n\t\n\t\n\t\n\t\n \n\n this.el.show_all();\n this.el.set_keep_above(true);\n\t\n\t_this.notebook.el.set_current_page(0);\n\t\n\t_this.select_ticket_tab.load_data(tid);\n\t//_this.create_ticket_tab.load_data();\n\t//_this.quick_commit_tab.load_data();\n \n \n \n \n \n \n \n \tthis.el.run();\n\n}",
"default_height" : 500,
"$ xns" : "Gtk",
"# bool running" : false,
"bool modal" : true,
"items" : [
{
+ "listeners" : {
+ "switch_page" : "(page, page_num) => {\n\tGLib.debug(\"Switch to page: %d\", (int)page_num);\n\tswitch(page_num) {\n\t\tcase 0: \n\t\t\tbreak; // do nothing.. it's already loaded at start.\n\t\tcase 1: \n\t\t\t_this.create_ticket_tab.load_data();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t_this.quick_commit_tab.load_data();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}\n"
+ },
+ "id" : "notebook",
"* pack" : "get_content_area().add",
"xtype" : "Notebook",
"$ xns" : "Gtk",
"bool homogeneous" : false,
"xtype" : "Box",
"* pack" : "append_page,_this.label_create_ticket.el",
+ "| void load_data" : "() {\n \n \t _this.table.el.hide();\n\t_this.spinner.el.show();\n\t_this.spinner.el.start();\t\n\t\n Timeout.add_seconds(1, () => {\n\t\t \n\t\tRooProject? curproj = null;\n\t\tif (_this.repo != null) {\n\t\t\tcurproj = RooProject.getProjectByRepo(_this.repo);\n\t\t}\n\t\t_this.tprmodel.loadProjects(curproj == null ? \"\" : curproj.id);\n\t\tif (curproj != null) {\n\t \n\t\t\t\n\t\t\tvar rt = RooTicket.singleton();\n\t\t\trt.loadProjectOptions(curproj.id);\n\t\t\t\n\t\t\t_this.msmodel.loadMilestones();\n\t\t\t_this.primodel.loadPriorities();\n\t\t\t_this.sevmodel.loadSeverities();\n\t\t\t_this.clmodel.loadClassifications();\t\n\t\t\t_this.devmodel.loadDevelopers();\t\n\t\t\t\n\t\t}\n\t\t_this.summary.el.set_text(\"\");\n\t\t_this.description.el.buffer.text = \"\"; \n\t\t_this.spinner.el.stop();\n\t\t_this.spinner.el.hide();\t\n\n\t\t_this.table.el.show();\n\t //_this.summary.el.grab_focus();\n \n\t \treturn false;\n \t});\n}\n",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
"$ xns" : "Gtk"
}
]
+ },
+ {
+ "id" : "spinner",
+ "bool hexpand" : true,
+ "* pack" : "add",
+ "xtype" : "Spinner",
+ "$ xns" : "Gtk",
+ "bool vexpand" : true
}
]
},
{
+ "id" : "quick_commit_tab",
"bool homogeneous" : false,
"* pack" : "append_page,_this.label_quick_commit.el",
"xtype" : "Box",
+ "| void load_data" : "() {\n _this.commit_message.el.set_text(\"\");\n _this.createbtn.updateState();\n}\n",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
"uint column_spacing" : 4,
"n_columns" : 5,
"$ xns" : "Gtk",
- "n_rows" : 2,
+ "n_rows" : 3,
"bool vexpand" : false,
"int margin" : 2,
"items" : [
"$ xns" : "Gtk"
},
{
+ "listeners" : {
+ "key_release_event" : "() => { \n\n\t_this.createbtn.updateState();\n}"
+ },
"id" : "commit_message",
"$ visible" : true,
"xtype" : "Entry",
- "* pack" : "attach_defaults,0,4,1,2",
+ "* pack" : "attach_defaults,0,5,1,2",
"$ xns" : "Gtk"
},
{
"listeners" : {
- "clicked" : "() => {\n\n\tGLib.debug(\"fire response = 1\");\n\t\n\tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\n\tif (ticket_id == \"\") {\n\t\t_this.ticketsel.el.get_child().get_style_context().add_class(\"warning\");\n\t\treturn;\n\t}\n\t \n\t_this.el.response(1);\n}"
+ "clicked" : "() => {\n\n\tGLib.debug(\"fire response = 1\");\n\t\n\t \n\t \n\t_this.el.response(3);\n}"
},
"label" : "Commit Changes",
"id" : "createbtn",
- "| void updateState" : "() {\n\n\tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\n\tif (ticket_id == \"\") {\n\t\tthis.el.set_sensitive(false);\n\t\treturn;\n\t}\n \n\tthis.el.set_sensitive(true);\n \n}\n",
+ "| void updateState" : "() {\n\n\tvar msg = _this.commit_message.el.get_text();\n\t\n\tif (msg == \"\") {\n\t\tthis.el.set_sensitive(false);\n\t\treturn;\n\t}\n \n\tthis.el.set_sensitive(true);\n \n}\n",
"* init" : "{\n this.el.get_style_context().add_class(\"suggested-action\");\n}\n",
"xtype" : "Button",
- "* pack" : "attach_defaults,4,5,1,2",
+ "* pack" : "attach_defaults,0,5,2,3",
"$ xns" : "Gtk"
}
]