[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 73e8e8ab68 20/33: Change: (hyperdrive-global-ea
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 73e8e8ab68 20/33: Change: (hyperdrive-global-easy-menu) WIP |
Date: |
Wed, 11 Oct 2023 22:00:45 -0400 (EDT) |
branch: elpa/hyperdrive
commit 73e8e8ab68ed71798f42f3313c507bcfcede3c6f
Author: Adam Porter <adam@alphapapa.net>
Commit: Joseph Turner <joseph@ushin.org>
Change: (hyperdrive-global-easy-menu) WIP
---
hyperdrive.el | 36 +++++++++++++++++++++++++++++-------
1 file changed, 29 insertions(+), 7 deletions(-)
diff --git a/hyperdrive.el b/hyperdrive.el
index aeca7c93ed..16580a2987 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -798,7 +798,8 @@ The return value of this function is the retrieval buffer."
;;;;; `easy-menu' integration
-(defvar hyperdrive--easy-menu-contents
+(easy-menu-define hyperdrive-global-easy-menu global-map
+ "Menu with all Hyperdrive commands."
'("Hyperdrive"
("Gateway"
:label
@@ -812,6 +813,32 @@ The return value of this function is the retrieval buffer."
"---"
["New Drive" hyperdrive-new
:help "Create a new hyperdrive"]
+ ("Drives"
+ :filter (lambda (_)
+ (cl-loop for drive in (hash-table-values hyperdrive-hyperdrives)
+ collect (list (hyperdrive--format-host drive
:with-label t)
+ (vector "Petname"
#'hyperdrive-set-petname
+ :help "Set petname for
hyperdrive"
+ :label
+ (format "Set petname: «%s»"
+ (pcase
(hyperdrive-petname drive)
+ (`nil "none")
+ (it it))))
+ (vector "Nickname"
#'hyperdrive-set-nickname
+ :help "Set nickname for
hyperdrive"
+ :active (hyperdrive-writablep
drive)
+ :label
+ (format "Set nickname: «%s»"
+ (pcase (alist-get 'name
(hyperdrive-metadata drive))
+ (`nil "none")
+ (it it))))
+ ;; FIXME: Enable these.
+ ;; "---"
+ ;; ["Describe"
hyperdrive-describe-hyperdrive
+ ;; :help "Display information about
hyperdrive"]
+ ;; ["Purge" hyperdrive-purge
+ ;; :help "Purge all local data about
hyperdrive"]
+ ))))
;; TODO: Add "Drives" section with dynamically generated
;; sub-submenus, e.g. "Drives">"petname:foo">(["Set Petname"
;; :label (hyperdrive-entry-petname drive)] ["Purge"])
@@ -963,12 +990,7 @@ The return value of this function is the retrieval buffer."
["Customize" hyperdrive-customize
:help "Customize hyperdrive options"]
["Manual" hyperdrive-info-manual
- :help "Open hyperdrive.el info manual"])
- "Contents of the Hyperdrive menu.")
-
-(easy-menu-define hyperdrive-global-easy-menu global-map
- "Menu with all Hyperdrive commands."
- hyperdrive--easy-menu-contents)
+ :help "Open hyperdrive.el info manual"]))
;;;;; Miscellaneous commands
- [nongnu] elpa/hyperdrive 6740906e5f 07/33: Change: (hyperdrive--easy-menu-contents) Move "Gateway" to top, (continued)
- [nongnu] elpa/hyperdrive 6740906e5f 07/33: Change: (hyperdrive--easy-menu-contents) Move "Gateway" to top, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 14718b1018 16/33: Comment: Add TODO, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive f9542ce234 03/33: Add: (hyperdrive-global-easy-menu) Add easy menu, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive a36f4fe719 08/33: Add: (hyperdrive-{customize, info-manual}) Miscellaneous commands, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 34c5f384a2 18/33: Change: (--easy-menu-contents) Move "Version" submenu to end, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive e82e9db0b2 22/33: Change: Make "Drives" subcommands use appropriate drive, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 0e17d571f6 28/33: Comment: Add to TODO, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive b1402fe8d8 29/33: Change: (-global-easy-menu) Allow copying URL of current directory, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 46e3e034ac 13/33: Change: (--easy-menu-contents) Add "Current" > "Version" submenu, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive fae8e08978 19/33: Change: (--easy-menu-contents) Move "Current Drive" into "Current", ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 73e8e8ab68 20/33: Change: (hyperdrive-global-easy-menu) WIP,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 1d911fee7f 33/33: Change: (hyperdrive-global-easy-menu) Add "Sort Directory" submenu, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive a416692858 01/33: Change: (hyperdrive-menu) "Hyperdrives" -> "Hyperdrive", ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 5100391bdd 05/33: Change: (hyperdrive--easy-menu-contents) Add "Bookmark" submenu, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive a971395216 09/33: Change: (--easy-menu-contents) Add "Customize" and "Info Manual", ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive c47455dbe7 21/33: Add workaround for Emacs bug, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive dc59d7f775 23/33: Change: (-global-easy-menu) Move find/view file into "Drives", ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 77301eeddb 25/33: Change: (-global-easy-menu) Move "Describe" to top of submenu, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 029f2b12aa 27/33: Comment: Remove TODO, ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive 1001388732 15/33: Change: (hyperdrive--easy-menu-contents) Use :active in "Bookmark", ELPA Syncer, 2023/10/11
- [nongnu] elpa/hyperdrive bfa91f271b 04/33: Change: (hyperdrive--easy-menu-contents) Add "Gateway" submenu, ELPA Syncer, 2023/10/11