From: Alan Knowles Date: Wed, 19 Dec 2018 05:50:28 +0000 (+0800) Subject: RepoStatusPopover.bjs X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=bd92ab60471d4265101702f1b46c7f1ff3137513 RepoStatusPopover.bjs RepoStatusPopover.vala --- diff --git a/RepoStatusPopover.bjs b/RepoStatusPopover.bjs index 049ce310..65fbf3f8 100644 --- a/RepoStatusPopover.bjs +++ b/RepoStatusPopover.bjs @@ -41,7 +41,7 @@ "items" : [ { "listeners" : { - "clicked" : "() => {\n \n \n GitMonitor.gitmonitor.stop();\n _this.repo.git({ \"stash\" , \"--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({ \"stash\" , \"--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 \n}" }, "label" : "Stash Changes", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-undo\", Gtk.IconSize.SMALL_TOOLBAR), null);", @@ -53,7 +53,7 @@ }, { "listeners" : { - "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}" + "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}" }, "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" : { - "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}" + "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 \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" : { - "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}" + "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 \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" : { - "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}" + "clicked" : "() => {\n var oldq = new Gee.ArrayList(); \n\n\tClones.singleton().el.response(-1);\n\tNewBranch.singleton().show(_this.repo, oldq);\n\n \n}" }, "label" : "Create Branch / Start ticket", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-add\", Gtk.IconSize.SMALL_TOOLBAR), null);", @@ -189,7 +189,7 @@ }, { "listeners" : { - "clicked" : "() => {\n\n _this.el.hide();\n Clones.singleton().el.response(-1);\n if (_this.repo.activeTicket != null) {\n\t MergeBranch.singleton().show(_this.repo.activeTicket, null); \n }\n return ;\n}" + "clicked" : "() => {\n\n _this.el.hide();\n Clones.singleton().el.response(-1);\n if (_this.repo.activeTicket != null) {\n\t MergeBranch.singleton().show(_this.repo.activeTicket, null); \n }\n \n}" }, "label" : "Merge branch / Complete ticket", "* ctor" : "new Gtk.ToolButton(new Gtk.Image.from_icon_name (\"gtk-goto-top\", Gtk.IconSize.SMALL_TOOLBAR), null);", @@ -201,7 +201,7 @@ }, { "listeners" : { - "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}" + "clicked" : "() => {\n \n\n\n Clones.singleton().el.response(-1);\n \n _this.el.hide();\n Ticket.singleton().show( _this.repo);\n \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 c8974e30..85ab04d7 100644 --- a/RepoStatusPopover.vala +++ b/RepoStatusPopover.vala @@ -212,7 +212,7 @@ public class RepoStatusPopover : Object Clones.singleton().reposStore.load(); _this.el.hide(); - return false; + }); } @@ -251,8 +251,7 @@ public class RepoStatusPopover : Object _this.el.hide(); Clones.singleton().reposStore.load(); - - return false; + }); } @@ -293,7 +292,7 @@ public class RepoStatusPopover : Object Clones.singleton().reposStore.load(); _this.el.hide(); - return false; + }); } @@ -334,7 +333,7 @@ public class RepoStatusPopover : Object Clones.singleton().reposStore.load(); _this.el.hide(); - return false; + }); } @@ -665,7 +664,7 @@ public class RepoStatusPopover : Object Clones.singleton().el.response(-1); NewBranch.singleton().show(_this.repo, oldq); - return false; + }); } @@ -701,7 +700,7 @@ public class RepoStatusPopover : Object if (_this.repo.activeTicket != null) { MergeBranch.singleton().show(_this.repo.activeTicket, null); } - return ; + }); } @@ -737,8 +736,7 @@ public class RepoStatusPopover : Object _this.el.hide(); Ticket.singleton().show( _this.repo); - - return false; + }); }