From ec124418d1155a2a952f2ca6db1b01e5ab0e1009 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 5 Nov 2018 15:09:52 +0800 Subject: [PATCH] sync --- GitMonitor.vala | 5 +---- NewBranch.bjs | 2 +- NewBranch.vala | 14 +++++++------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/GitMonitor.vala b/GitMonitor.vala index 864e0462..78663103 100644 --- a/GitMonitor.vala +++ b/GitMonitor.vala @@ -716,12 +716,9 @@ public class GitMonitor : Monitor if (cmd_d.shouldIgnore()) { this.onDeleted(src); - - return; } - - + GLib.debug("RM: %s", cmd_s.vname); cmd_s.action = "rm"; this.queue.add(cmd_s); diff --git a/NewBranch.bjs b/NewBranch.bjs index c7adea2a..78c314c8 100644 --- a/NewBranch.bjs +++ b/NewBranch.bjs @@ -10,7 +10,7 @@ { "listeners" : { "delete_event" : "(self, event) => {\n this.el.hide();\n this.running = false;\n return true; \n //test \n}\n ", - "response" : " (self, response_id) => { \n \n\tGLib.debug(\"got %d\", (int) response_id);\n\tif (response_id == 0) {\n\t _this.el.hide();\t\n\t this.running = false; \n\t\tGitMonitor.gitmonitor.start();\t \n\t \treturn;\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\tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\n\tvar success = true;\n if (this.repo != null) {\n \tvar bn = _this.name.el.get_text();\n \tif (ticket_id != \"\" ) {\n\t\t\tsuccess = this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn);\n\t\t} else {\n\t\t\tsuccess = this.repo.createBranchNamed(bn);\n\t\t}\n }\n \n GitMonitor.gitmonitor.restoreQueue( this.queue );\n GitMonitor.gitmonitor.runQueue(); \n\tGitMonitor.gitmonitor.start();\n this.running = false; \n\n\t \n\t \n\t \n\n\t \n}", + "response" : " (self, response_id) => { \n \n\tGLib.debug(\"got %d\", (int) response_id);\n\tif (response_id == 0) {\n\t _this.el.hide();\t\n\t this.running = false; \n\t\tGitMonitor.gitmonitor.start();\t \n\t \treturn;\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\tvar ticket_id = _this.ticketsel.selectedTicketId();\n\t\n\tvar success = true;\n if (this.repo != null) {\n \tvar bn = _this.name.el.get_text();\n \tif (ticket_id != \"\" ) {\n\t\t\tsuccess = this.repo.setActiveTicket( RooTicket.singleton().getById(ticket_id), bn);\n\t\t} else {\n\t\t\tsuccess = this.repo.createBranchNamed(bn);\n\t\t}\n }\n if (success) {\n\t\tGitMonitor.gitmonitor.restoreQueue( this.queue );\n\t\tGitMonitor.gitmonitor.runQueue(); \n\t\tGitMonitor.gitmonitor.start();\n\t}\n this.running = false; \t \n\t_this.el.hide();\n\t \n\t \n\n\t \n}", "show" : "(self) => {\n \n\n //test\n}" }, "default_width" : 500, diff --git a/NewBranch.vala b/NewBranch.vala index 5173aa3b..3ef225a9 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -84,13 +84,13 @@ public class NewBranch : Object success = this.repo.createBranchNamed(bn); } } - - GitMonitor.gitmonitor.restoreQueue( this.queue ); - GitMonitor.gitmonitor.runQueue(); - GitMonitor.gitmonitor.start(); - this.running = false; - - + if (success) { + GitMonitor.gitmonitor.restoreQueue( this.queue ); + GitMonitor.gitmonitor.runQueue(); + GitMonitor.gitmonitor.start(); + } + this.running = false; + _this.el.hide(); -- 2.39.2