mirror of https://codeberg.org/cage/tinmop/
- [GUI] removed menu shortcuts;
- [GUI] unfocus autocomplete entry when an url has been chosen; - [GUI] unfocus gemtext window when a link has been clicked.
This commit is contained in:
parent
b237e4bd91
commit
f2af236b78
|
@ -204,12 +204,12 @@
|
|||
|
||||
(defun initialize-menu (parent main-window)
|
||||
(let* ((bar (gui:make-menubar parent))
|
||||
(file (gui:make-menu bar (_ "File") :underline 0))
|
||||
(tools (gui:make-menu bar (_ "Tools") :underline 0))
|
||||
(tour (gui:make-menu bar (_ "Tour") :underline 1))
|
||||
(bookmarks (gui:make-menu bar (_ "Bookmarks") :underline 0))
|
||||
(gemlogs (gui:make-menu bar (_ "Gemlogs") :underline 0))
|
||||
(help (gui:make-menu bar (_ "Help") :underline 0)))
|
||||
(file (gui:make-menu bar (_ "File")))
|
||||
(tools (gui:make-menu bar (_ "Tools")))
|
||||
(tour (gui:make-menu bar (_ "Tour")))
|
||||
(bookmarks (gui:make-menu bar (_ "Bookmarks")))
|
||||
(gemlogs (gui:make-menu bar (_ "Gemlogs")))
|
||||
(help (gui:make-menu bar (_ "Help"))))
|
||||
(gui:make-menubutton tools
|
||||
(_ "Certificates")
|
||||
#'menu:show-certificates
|
||||
|
@ -329,6 +329,7 @@
|
|||
(with-accessors ((iri-entry iri-entry)) tool-bar
|
||||
(lambda ()
|
||||
(set-address-bar-text main-window link-value)
|
||||
(gui:focus (toc-frame main-window))
|
||||
(open-iri link-value main-window use-cache :status status)))))
|
||||
|
||||
(defun absolutize-link (request-iri link-value)
|
||||
|
@ -1030,6 +1031,7 @@
|
|||
#$<KeyPress-Return>$
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(gui:focus toc-frame)
|
||||
(funcall (open-iri-clsr main-window t)))
|
||||
:append nil)
|
||||
(gui:bind toc-listbox
|
||||
|
@ -1262,32 +1264,38 @@
|
|||
(client-configuration:get-keybinding :search)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(funcall (menu:show-search-frame-clsr main-window))))
|
||||
(funcall (menu:show-search-frame-clsr main-window)))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:get-keybinding :stream)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(menu:show-streams)))
|
||||
(menu:show-streams))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:get-keybinding :certificates)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(menu:show-certificates)))
|
||||
(menu:show-certificates))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:config-keybinding-tour-manage)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(menu:show-tour)))
|
||||
(menu:show-tour))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:get-keybinding :gemlog)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(menu:manage-gemlogs)))
|
||||
(menu:manage-gemlogs))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:get-keybinding :about)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(menu:help-about)))
|
||||
(menu:help-about))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:get-keybinding :type-address)
|
||||
(lambda (e)
|
||||
|
@ -1295,28 +1303,31 @@
|
|||
(let* ((autocomplete-entry (iri-entry (tool-bar main-window)))
|
||||
(entry (nodgui.mw:autocomplete-entry-widget autocomplete-entry)))
|
||||
(gui:focus entry)
|
||||
(gui:set-selection entry 0 :end))))
|
||||
(gui:set-selection entry 0 :end)))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:config-keybinding-tour-shuffle)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(client-tour-window:enqueue-shuffle-tour)))
|
||||
(client-tour-window:enqueue-shuffle-tour))
|
||||
:exclusive t)
|
||||
(gui:bind (gui:root-toplevel)
|
||||
(client-configuration:config-keybinding-tour-next)
|
||||
(lambda (e)
|
||||
(declare (ignore e))
|
||||
(funcall (tour-visit-next-iri-clsr main-window)))))
|
||||
(funcall (tour-visit-next-iri-clsr main-window)))
|
||||
:exclusive t))
|
||||
|
||||
(defun init-main-window ()
|
||||
(let ((gui:*debug-tk* nil))
|
||||
(gui:with-nodgui (:title +program-name+)
|
||||
(icons:load-icons)
|
||||
(setf gui-goodies:*toplevel* gui:*tk*)
|
||||
(setf gui-goodies:*gui-server* gui:*wish*)
|
||||
(client-events:start-events-loop)
|
||||
(let ((main-frame (make-instance 'main-frame)))
|
||||
(setf gui-goodies:*main-frame* main-frame)
|
||||
(initialize-menu gui:*tk* main-frame)
|
||||
(gui:grid main-frame 0 0 :sticky :nswe)
|
||||
(initialize-keybindings main-frame)
|
||||
(gui-goodies:gui-resize-grid-all gui-goodies:*toplevel*)))))
|
||||
(setf gui:*debug-tk* nil)
|
||||
(gui:with-nodgui (:title +program-name+)
|
||||
(icons:load-icons)
|
||||
(setf gui-goodies:*toplevel* gui:*tk*)
|
||||
(setf gui-goodies:*gui-server* gui:*wish*)
|
||||
(client-events:start-events-loop)
|
||||
(let ((main-frame (make-instance 'main-frame)))
|
||||
(setf gui-goodies:*main-frame* main-frame)
|
||||
(initialize-menu gui:*tk* main-frame)
|
||||
(gui:grid main-frame 0 0 :sticky :nswe)
|
||||
(initialize-keybindings main-frame)
|
||||
(gui-goodies:gui-resize-grid-all gui-goodies:*toplevel*))))
|
||||
|
|
Loading…
Reference in New Issue