1
0
Fork 0

- [GUI] bound return event for the address bar to a dummy function.

This commit is contained in:
cage 2023-02-18 14:28:57 +01:00
parent 9802b18dc9
commit 811c3c9824
2 changed files with 23 additions and 9 deletions

View File

@ -56,11 +56,11 @@
,(elt filter 2))))
,@body))
(defun attach-tooltip (widget text)
(defun attach-tooltip (widget tootltip-message)
(let ((tooltip (make-instance 'nodgui.mw:tooltip
:borderwidth 1
:relief :solid)))
(nodgui.mw:register-tooltip tooltip widget text)))
(nodgui.mw:register-tooltip tooltip widget tootltip-message)))
(defmacro attach-tooltips (&rest widget-text)
`(progn

View File

@ -176,6 +176,20 @@
(getf match-results :indices))))
hint)))
(defun setup-main-window-events (main-window)
(with-accessors ((iri-entry iri-entry)
(back-button back-button)
(reload-button reload-button)
(up-button up-button)
(go-button go-button)) main-window
(let ((entry-autocomplete (gui-mw::entry-widget iri-entry)))
(gui:bind entry-autocomplete
#$<KeyPress-Return>$
(lambda (e)
(declare (ignore e))
(gui-goodies:info-dialog main-window (gui:text entry-autocomplete)))
:append nil))))
(defmethod initialize-instance :after ((object tool-bar) &key &allow-other-keys)
(with-accessors ((iri-entry iri-entry)
(back-button back-button)
@ -200,6 +214,7 @@
(gui:grid reload-button 0 4 :sticky :e)
(gui:grid up-button 0 5 :sticky :e)
(gui:grid-columnconfigure object 2 :weight 2)
(setup-main-window-events object)
object))
(defclass toc-frame (gui:frame)
@ -258,13 +273,12 @@
object))
(defun init-main-window ()
(let ((gui:*debug-tk* nil))
(gui:with-nodgui (:title +program-name+)
(icons:load-icons)
(initialize-menu gui:*tk*)
(let ((main-frame (make-instance 'main-frame)))
(gui:grid main-frame 0 0 :sticky :nswe)
(gui-goodies:gui-resize-grid-all gui:*tk*)))))
(gui:with-nodgui (:title +program-name+)
(icons:load-icons)
(initialize-menu gui:*tk*)
(let ((main-frame (make-instance 'main-frame)))
(gui:grid main-frame 0 0 :sticky :nswe)
(gui-goodies:gui-resize-grid-all gui:*tk*))))
;; (let ((test-iri "gemini://omg.pebcak.club/"))
;; (slurp-gemini-stream test-iri