Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds menu accelerators for copy image path in main/browser. #115

Merged
merged 1 commit into from
Nov 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frame.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@
(new menu-item%
[parent ivy-menu-bar-edit]
[label "Copy Image Path"]
[shortcut-prefix (if macosx?
(list 'cmd 'shift)
(list 'ctl 'shift))]
[shortcut #\C]
[help-string "Copy the current image's path"]
[callback (λ (i e)
(unless (eq? (image-path) +root-path+)
Expand Down
20 changes: 20 additions & 0 deletions tag-browser.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,26 @@
[callback (λ (button evt)
(edit-tags-callback img-lbox edit-tags-tfield))]))

(define browser-menu-bar-copy-separator
(new separator-menu-item%
[parent browser-menu-bar-edit]))

(define browser-menu-bar-edit-copy-path
(new menu-item%
[parent browser-menu-bar-edit]
[label "Copy Selected Image Path"]
[shortcut-prefix (if macosx?
(list 'cmd 'shift)
(list 'ctl 'shift))]
[shortcut #\C]
[help-string "Copy the current image's path"]
[callback (λ (i e)
(define selected-path (send img-lbox get-string-selection))
(when selected-path
(send the-clipboard set-clipboard-string
selected-path
(current-seconds))))]))

; end menu bar definitions

; begin tag filtering/search definitions
Expand Down