diff --git a/source/changelog.lisp b/source/changelog.lisp index 23c6b4a8cb5..bf994f79314 100644 --- a/source/changelog.lisp +++ b/source/changelog.lisp @@ -100,6 +100,7 @@ elements are scaled accordingly.") (define-version "3.11.8" (:nsection :title "UI/UX" (:ul + (:li "Review UI of " (:nxref :command 'nyxt/mode/bookmark:bookmarks-panel) ".") (:li "Fix mode menu bar.")))) (define-version "3.11.7" diff --git a/source/mode/bookmark.lisp b/source/mode/bookmark.lisp index 89b9a2d1c26..75aef4fb62d 100644 --- a/source/mode/bookmark.lisp +++ b/source/mode/bookmark.lisp @@ -220,7 +220,7 @@ against date, given `prompter:active-attributes-keys' configuration.")) (:nsection :title (or tag "Unsorted") :id (or tag "unsorted") - :open-p t + :open-p nil :anchor-p nil (dolist (bookmark bookmarks) (:a :href (render-url (url bookmark)) diff --git a/source/mode/buffer-listing.lisp b/source/mode/buffer-listing.lisp index 19c7392b52e..74ba47c415a 100644 --- a/source/mode/buffer-listing.lisp +++ b/source/mode/buffer-listing.lisp @@ -120,28 +120,26 @@ shown linearly instead." :class "success" `(reload-panel-buffer ,panel-buffer)))))) -(defun reload-panel-buffer (panel-buffer) +(defun reload-panel-buffer (panel-buffer &optional (window (current-window))) (reload-buffer (find (render-url (url panel-buffer)) - (nyxt::panel-buffers (current-window)) + (nyxt::panel-buffers window) :test #'string= :key (compose #'render-url #'url)))) -(defun buffers-panel-handler-set-buffer (window buffer) - (declare (ignore buffer)) - (alex:when-let ((panel-buffer (first (nyxt::panel-buffers window)))) - (reload-panel-buffer panel-buffer))) +;; Doesn't take into account the multi-window case. That would require a +;; refactor of the `panel-buffer' class and how panel buffers are found in (setf +;; form) of `internal-page'. +(defun reload-buffers-panel-handler (window buffer) + (declare (ignore window buffer)) + (alex:when-let ((buffers-panel (find-panel-buffer 'buffers-panel))) + (reload-panel-buffer buffers-panel))) (define-configuration window ((window-set-buffer-hook - (hooks:add-hook %slot-default% 'buffers-panel-handler-set-buffer)))) - -(defun buffers-panel-reload-handler (buffer) - (declare (ignore buffer)) - (alex:when-let ((panel-buffer (first (nyxt::panel-buffers (current-window))))) - (reload-panel-buffer panel-buffer))) + (hooks:add-hook %slot-default% 'reload-buffers-panel-handler)))) (define-configuration network-buffer ((buffer-loaded-hook - (hooks:add-hook %slot-default% 'buffers-panel-reload-handler)) + (hooks:add-hook %slot-default% (curry #'reload-buffers-panel-handler nil))) (buffer-delete-hook - (hooks:add-hook %slot-default% 'buffers-panel-reload-handler)))) + (hooks:add-hook %slot-default% (curry #'reload-buffers-panel-handler nil))))) diff --git a/source/panel.lisp b/source/panel.lisp index 36726340182..d6db8c2e231 100644 --- a/source/panel.lisp +++ b/source/panel.lisp @@ -201,6 +201,7 @@ When provided, PANELS are deleted instead." The main difference from `internal-page' is that panel command toggles the panel.")) +(export-always 'find-panel-buffer) (defun find-panel-buffer (name) "Return first panel buffer which URL is a NAME `panel-page'." (find name (panel-buffers (current-window)) :key (compose #'internal-page-name #'url)))