diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index 6f90de5..f2d08e9 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -648,7 +648,7 @@ (lambda () (with-accessors ((tool-bar tool-bar)) main-window (with-accessors ((iri-entry iri-entry)) tool-bar - (let* ((iri (trim-blanks (gui:text iri-entry)))) + (let ((iri (trim-blanks (gui:text iri-entry)))) (gui-mw::hide-candidates iri-entry) (open-iri iri main-window use-cache)))))) @@ -692,7 +692,15 @@ (toc-callback-clsr main-window)) (setf (gui:command go-button) (open-iri-clsr main-window t)))))) -(defmethod initialize-instance :after ((object tool-bar) &key &allow-other-keys) +(defun reload-iri-clsr (main-window) + (lambda () + (with-accessors ((tool-bar tool-bar)) main-window + (with-accessors ((iri-entry iri-entry)) tool-bar + (let* ((iri (trim-blanks (gui:text iri-entry)))) + (open-iri iri main-window nil)))))) + +(defmethod initialize-instance :after ((object tool-bar) + &key (main-window nil) &allow-other-keys) (with-accessors ((iri-entry iri-entry) (back-button back-button) (reload-button reload-button) @@ -703,7 +711,10 @@ :master object :autocomplete-function (autocomplete-iri-clsr object))) (setf back-button (make-instance 'gui:button :master object :image icons:*back*)) - (setf reload-button (make-instance 'gui:button :master object :image icons:*refresh*)) + (setf reload-button (make-instance 'gui:button + :master object + :image icons:*refresh* + :command (reload-iri-clsr main-window))) (setf go-button (make-instance 'gui:button :master object :image icons:*open-iri*)) (setf up-button (make-instance 'gui:button :master object :image icons:*up*)) (gui-goodies:attach-tooltips (back-button (_ "go back")) @@ -784,7 +795,7 @@ (info-frame info-frame) (info-text info-text) (gemtext-widget gemtext-widget)) object - (setf tool-bar (make-instance 'tool-bar :master object)) + (setf tool-bar (make-instance 'tool-bar :master object :main-window object)) (setf toc-frame (make-instance 'toc-frame :master object)) (setf gemtext-widget (make-instance 'gui:scrolled-text :master object