From b9e892f20fa0a15950a35d91acf3a6d2ecde51af Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 21 Mar 2019 13:57:39 +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 5530b9e6..9300afa8 100644 --- a/NewBranch.bjs +++ b/NewBranch.bjs @@ -26,7 +26,7 @@ "items" : [ { "listeners" : { - "switch_page" : "" + "switch_page" : "(page, page_num) => {\n\tGLib.debug(\"Switch to page: %d\", page_num);\n}\n" }, "* pack" : "get_content_area().add", "xtype" : "Notebook", diff --git a/NewBranch.vala b/NewBranch.vala index 9ad41cac..6fb86f43 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -204,7 +204,9 @@ public class NewBranch : Object this.el.append_page ( child_5.el , _this.label_quick_commit.el ); //listeners - this.el.switch_page.connect( ); + this.el.switch_page.connect( (page, page_num) => { + GLib.debug("Switch to page: %d", page_num); + }); } // user defined functions -- 2.39.2