From 6c1942c3c890501843b9a04db038c335562f7906 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 21 Mar 2019 14:35:07 +0800 Subject: [PATCH] NewBranch.bjs NewBranch.vala --- NewBranch.bjs | 2 +- NewBranch.vala | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NewBranch.bjs b/NewBranch.bjs index de659294..0c1fe9cd 100644 --- a/NewBranch.bjs +++ b/NewBranch.bjs @@ -10,7 +10,7 @@ { "listeners" : { "delete_event" : "(self, event) => {\n this.el.hide();\n return true; \n //test \n}\n ", - "response" : " (self, response_id) => { \n \n\tGLib.debug(\"got %d\", (int) response_id);\n\t\n\t \n\t\n\t \n\t// have they selected a ticket..\n\t// make that the current active ticket?\n\t// we really need to store locally what ticket is being worked on..\n\t// in theory we could be working on multiple project and not merging..\n\t// -- each repo would have their active ticket (only one per repo)\n\t// -- so we could just store that in there\n\t// -- initial load can check the contents of the ticket files on first scan.\n\n\t \n\tif (response_id < 1) {\n\t _this.el.hide();\t\n\t this.running = false; \n\t \treturn;\n\t}\n\t\n\tswitch(response_id) {\n\t\tcase 1: \n\t\n\t\t\t\n\t\t\tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\t\t\n\t\t\tif (this.repo != null) {\n\t\t\t\tvar bn = _this.name.el.get_text();\n\n\t\t\t\tvar res = this.repo.setActiveTicket(\t\t\t\n\t\t\t\t\t RooTicket.singleton().getById(ticket_id != \"\" ? ticket_id : \"-1\"), bn\n\t\t\t\t );\n\t\t\t\t if (res) {\n\t\t\t\t \t// start the monitoring..\n\t\t\t\t \t GitMonitor.gitmonitor.start();\n\t\t\t\t \t \n\t\t\t\t }\n\t\t\t}\n \t\tbreak;\n \t\tcase 2: // create ticket + branch\n\t \t\tbreak;\n \t\t\n \t\tcase 3: // just commit...\n \t\t\n \t\t\tbreak;\n\n this.running = false; \n\n\tthis.el.hide();\n\t \n\t \n\n\t \n}" + "response" : " (self, response_id) => { \n \n\tGLib.debug(\"got %d\", (int) response_id);\n\t\n\t \n\t\n\t \n\t// have they selected a ticket..\n\t// make that the current active ticket?\n\t// we really need to store locally what ticket is being worked on..\n\t// in theory we could be working on multiple project and not merging..\n\t// -- each repo would have their active ticket (only one per repo)\n\t// -- so we could just store that in there\n\t// -- initial load can check the contents of the ticket files on first scan.\n\n\t \n\tif (response_id < 1) {\n\t _this.el.hide();\t\n\t this.running = false; \n\t \treturn;\n\t}\n\t\n\tswitch(response_id) {\n\t\tcase 1: \n\t\n\t\t\t\n\t\t\tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\t\t\n\t\t\tif (this.repo != null) {\n\t\t\t\tvar bn = _this.name.el.get_text();\n\n\t\t\t\tvar res = this.repo.setActiveTicket(\t\t\t\n\t\t\t\t\t RooTicket.singleton().getById(ticket_id != \"\" ? ticket_id : \"-1\"), bn\n\t\t\t\t );\n\t\t\t\t if (res) {\n\t\t\t\t \t// start the monitoring..\n\t\t\t\t \t GitMonitor.gitmonitor.start();\n\t\t\t\t \t \n\t\t\t\t }\n\t\t\t}\n \t\tbreak;\n \t\tcase 2: // create ticket + branch\n\t \t\tbreak;\n \t\t\n \t\tcase 3: // just commit...\n \t\t\n \t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n this.running = false; \n\n\tthis.el.hide();\n\t \n\t \n\n\t \n}" }, "default_width" : 500, "$ deletable" : true, diff --git a/NewBranch.vala b/NewBranch.vala index 8c392c48..7985727f 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -131,7 +131,9 @@ public class NewBranch : Object case 3: // just commit... break; - + default: + break; + } this.running = false; this.el.hide(); -- 2.39.2