branch: elpa/hyperdrive
commit bd252024df6fae10a725dca2462cfd60b0debcb5
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>

    Change: (h/menu-bar-menu) Add "Install gateway"
---
 hyperdrive.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 27826ec4c9..67ce945c95 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -823,8 +823,6 @@ The return value of this function is the retrieval buffer."
 
 ;;;;; `easy-menu' integration
 
-;; TODO: Add install button
-
 (defvar h/menu-bar-menu
   '(("Gateway"
      ["Start Gateway" h/start
@@ -832,7 +830,15 @@ The return value of this function is the retrieval buffer."
      ["Stop Gateway" h/stop
       :help "Stop hyper-gateway-ushin"]
      ["Gateway version" h/gateway-version
-      :help "Say hyper-gateway-ushin version"])
+      :help "Say hyper-gateway-ushin version"]
+     ["Install gateway" h/install
+      :label (cond ((and (h//gateway-ready-p)
+                         (not (equal h/gateway-version-expected
+                                     (h//gateway-version))))
+                    "Upgrade gateway")
+                   ((h/gateway-installed-p) "Reinstall gateway")
+                   (t "Install gateway"))
+      :help "Download and install gateway"])
     "---"
     ["Open URL" h/open-url
      :help "Load a hyperdrive URL"]

Reply via email to