From a0ec8a45c3f658481ca0862e52c737efbc6bd79f Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 31 Oct 2018 16:10:22 +0800 Subject: [PATCH] NewBranch.bjs NewBranch.vala --- NewBranch.bjs | 2 +- NewBranch.vala | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/NewBranch.bjs b/NewBranch.bjs index 3a7c3934..53dc270f 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\t GLib.debug(\"got %d\", (int) response_id);\n\t _this.el.hide();\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 \treturn;\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\n\t \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 13e34ec9..e65ba333 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -51,8 +51,25 @@ public class NewBranch : Object }); this.el.response.connect( (self, response_id) => { - GLib.debug("got %d", (int) response_id); - _this.el.hide(); + GLib.debug("got %d", (int) response_id); + if (response_id == 0) { + _this.el.hide(); + return; + } + // have they selected a ticket.. + // make that the current active ticket? + // we really need to store locally what ticket is being worked on.. + // in theory we could be working on multiple project and not merging.. + // -- each repo would have their active ticket (only one per repo) + // -- so we could just store that in there + // -- initial load can check the contents of the ticket files on first scan. + + + + + + + }); this.el.show.connect( (self) => { -- 2.39.2