mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
context menu for folders
This commit is contained in:
parent
798ad3a201
commit
828a1a5fad
2 changed files with 17 additions and 1 deletions
|
|
@ -107,6 +107,22 @@
|
||||||
(project-tree-dir-select obj (format nil "~A" item)))
|
(project-tree-dir-select obj (format nil "~A" item)))
|
||||||
:indent-level (1+ (indent-level node))
|
:indent-level (1+ (indent-level node))
|
||||||
:visible nil
|
:visible nil
|
||||||
|
:on-context-menu
|
||||||
|
(lambda (obj)
|
||||||
|
(let* ((disp (text-value (content obj)))
|
||||||
|
(menu (create-panel obj
|
||||||
|
:left (left obj) :top (top obj)
|
||||||
|
:width (width obj)
|
||||||
|
:class *builder-window-desktop-class*))
|
||||||
|
(title (create-div menu :content disp))
|
||||||
|
(op (create-div menu :content "Toggle Open" :class *builder-menu-context-item-class*))
|
||||||
|
(opo (create-div menu :content "Open in OS" :class *builder-menu-context-item-class*)))
|
||||||
|
(declare (ignore title op))
|
||||||
|
(set-on-click opo (lambda (i)
|
||||||
|
(declare (ignore i))
|
||||||
|
(open-file-with-os item))
|
||||||
|
:cancel-event t)
|
||||||
|
(set-on-mouse-leave menu (lambda (obj) (destroy obj)))))
|
||||||
:content (first (last (pathname-directory item))))))
|
:content (first (last (pathname-directory item))))))
|
||||||
(dolist (item (sort (uiop:directory-files (directory-namestring dir))
|
(dolist (item (sort (uiop:directory-files (directory-namestring dir))
|
||||||
(lambda (a b)
|
(lambda (a b)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"Open a shell"
|
"Open a shell"
|
||||||
(let* ((*default-title-class* *builder-title-class*)
|
(let* ((*default-title-class* *builder-title-class*)
|
||||||
(*default-border-class* *builder-border-class*)
|
(*default-border-class* *builder-border-class*)
|
||||||
(win (create-gui-window obj :title (format nil "OS Shell - ~A - ~A"
|
(win (create-gui-window obj :title (format nil "OS Pseudo Shell - ~A - ~A"
|
||||||
(uiop:operating-system)
|
(uiop:operating-system)
|
||||||
(uiop:hostname))
|
(uiop:hostname))
|
||||||
:top 40 :left 225
|
:top 40 :left 225
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue