From: Alan Knowles Date: Wed, 19 Dec 2018 05:48:48 +0000 (+0800) Subject: RepoStatusPopover.bjs X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=88e4ccabb4fd464e3a01d2126cf82d5aef6f1d6d RepoStatusPopover.bjs RepoStatusPopover.vala --- diff --git a/RepoStatusPopover.bjs b/RepoStatusPopover.bjs index f34844e6..049ce310 100644 --- a/RepoStatusPopover.bjs +++ b/RepoStatusPopover.bjs @@ -53,7 +53,7 @@ }, { "listeners" : { - "button_press_event" : "() => {\n _this.repo.git({ \"commit\" , \"-a\" ,\"-m\", \"Uncommited changes synced\" });\n _this.repo.push();\n _this.repo.loadStatus();\n \n _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);\n _this.status_view.el.get_buffer().set_text(_this.repo.git_status);\n \n _this.el.hide();\n Clones.singleton().reposStore.load();\n \n return false;\n}" + "clicked" : "() => {\n _this.repo.git({ \"commit\" , \"-a\" ,\"-m\", \"Uncommited changes synced\" });\n _this.repo.push();\n _this.repo.loadStatus();\n \n _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);\n _this.status_view.el.get_buffer().set_text(_this.repo.git_status);\n \n _this.el.hide();\n Clones.singleton().reposStore.load();\n \n return false;\n}" }, "label" : "Commit Changes", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-save\", Gtk.IconSize.SMALL_TOOLBAR), null);", @@ -65,7 +65,7 @@ }, { "listeners" : { - "button_press_event" : "() => {\n \n \n GitMonitor.gitmonitor.stop();\n _this.repo.git({ \"reset\" , \"--hard\" });\n _this.repo.loadStatus();\n GitMonitor.gitmonitor.start();\n _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);\n _this.status_view.el.get_buffer().set_text(_this.repo.git_status);\n Clones.singleton().reposStore.load();\n \n _this.el.hide();\n return false;\n}" + "clicked" : "() => {\n \n \n GitMonitor.gitmonitor.stop();\n _this.repo.git({ \"reset\" , \"--hard\" });\n _this.repo.loadStatus();\n GitMonitor.gitmonitor.start();\n _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);\n _this.status_view.el.get_buffer().set_text(_this.repo.git_status);\n Clones.singleton().reposStore.load();\n \n _this.el.hide();\n return false;\n}" }, "label" : "Reset / clear changes", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-revert-to-saved\", Gtk.IconSize.SMALL_TOOLBAR), null);", @@ -77,7 +77,7 @@ }, { "listeners" : { - "button_press_event" : "() => {\n \n \n GitMonitor.gitmonitor.stop();\n _this.repo.git({ \"pull\" , \"--all\" });\n _this.repo.loadStatus();\n GitMonitor.gitmonitor.start();\n _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);\n _this.status_view.el.get_buffer().set_text(_this.repo.git_status);\n Clones.singleton().reposStore.load();\n \n _this.el.hide();\n return false;\n}" + "clicked" : "() => {\n \n \n GitMonitor.gitmonitor.stop();\n _this.repo.git({ \"pull\" , \"--all\" });\n _this.repo.loadStatus();\n GitMonitor.gitmonitor.start();\n _this.diff_view.el.get_buffer().set_text(_this.repo.git_diff);\n _this.status_view.el.get_buffer().set_text(_this.repo.git_status);\n Clones.singleton().reposStore.load();\n \n _this.el.hide();\n return false;\n}" }, "label" : "Pull updates", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-goto-bottom\", Gtk.IconSize.SMALL_TOOLBAR), null);", @@ -177,7 +177,7 @@ "items" : [ { "listeners" : { - "button_press_event" : "() => {\n var oldq = new Gee.ArrayList(); \n\n\tClones.singleton().el.response(-1);\n\tNewBranch.singleton().show(_this.repo, oldq);\n\n return false;\n}" + "clicked" : "() => {\n var oldq = new Gee.ArrayList(); \n\n\tClones.singleton().el.response(-1);\n\tNewBranch.singleton().show(_this.repo, oldq);\n\n return false;\n}" }, "label" : "Create Branch / Start ticket", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-add\", Gtk.IconSize.SMALL_TOOLBAR), null);", @@ -201,7 +201,7 @@ }, { "listeners" : { - "button_press_event" : "() => {\n \n\n\n Clones.singleton().el.response(-1);\n \n _this.el.hide();\n Ticket.singleton().show( _this.repo);\n \n return false;\n}" + "clicked" : "() => {\n \n\n\n Clones.singleton().el.response(-1);\n \n _this.el.hide();\n Ticket.singleton().show( _this.repo);\n \n return false;\n}" }, "label" : "Create Ticket", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-new\", Gtk.IconSize.SMALL_TOOLBAR), null);", diff --git a/RepoStatusPopover.vala b/RepoStatusPopover.vala index 1975bfcf..c8974e30 100644 --- a/RepoStatusPopover.vala +++ b/RepoStatusPopover.vala @@ -241,7 +241,7 @@ public class RepoStatusPopover : Object this.el.is_important = true; //listeners - this.el.button_press_event.connect( () => { + this.el.clicked.connect( () => { _this.repo.git({ "commit" , "-a" ,"-m", "Uncommited changes synced" }); _this.repo.push(); _this.repo.loadStatus(); @@ -281,7 +281,7 @@ public class RepoStatusPopover : Object this.el.is_important = true; //listeners - this.el.button_press_event.connect( () => { + this.el.clicked.connect( () => { GitMonitor.gitmonitor.stop(); @@ -322,7 +322,7 @@ public class RepoStatusPopover : Object this.el.is_important = true; //listeners - this.el.button_press_event.connect( () => { + this.el.clicked.connect( () => { GitMonitor.gitmonitor.stop(); @@ -659,7 +659,7 @@ public class RepoStatusPopover : Object this.el.is_important = true; //listeners - this.el.button_press_event.connect( () => { + this.el.clicked.connect( () => { var oldq = new Gee.ArrayList(); Clones.singleton().el.response(-1); @@ -729,7 +729,7 @@ public class RepoStatusPopover : Object this.el.is_important = true; //listeners - this.el.button_press_event.connect( () => { + this.el.clicked.connect( () => {