1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-15 07:50:36 +01:00

- [GUI] ensured to hide window that shows candidates for autocompletion, before a new window (cetrificate, tour etc.) is created.

This commit is contained in:
cage 2024-06-02 14:46:20 +02:00
parent 6e1274faf2
commit 342eda7eb2
8 changed files with 35 additions and 20 deletions

View File

@ -70,7 +70,8 @@
(gui:grid buttons-frame 6 0 :sticky :s :padx +minimum-padding+) (gui:grid buttons-frame 6 0 :sticky :s :padx +minimum-padding+)
(gui:grid add-button 0 0 :sticky :s)))) (gui:grid add-button 0 0 :sticky :s))))
(defun init-window (master iri) (defun init-window (master main-window iri)
(client-main-window:hide-autocomplete-candidates main-window)
(make-edit-window master iri)) (make-edit-window master iri))
(defun bookmarks-table->lisbox-items (bookmarks-table) (defun bookmarks-table->lisbox-items (bookmarks-table)

View File

@ -256,7 +256,8 @@
:master toplevel))) :master toplevel)))
(gui:grid frame 0 0 :sticky :news))))) (gui:grid frame 0 0 :sticky :news)))))
(defun init-window (master) (defun init-window (master main-window)
(client-main-window:hide-autocomplete-candidates main-window)
(gui:with-toplevel (toplevel :master master :title (_ "Certificates")) (gui:with-toplevel (toplevel :master master :title (_ "Certificates"))
(gui:transient toplevel master) (gui:transient toplevel master)
(let* ((table (make-instance 'certificate-frame :master toplevel)) (let* ((table (make-instance 'certificate-frame :master toplevel))

View File

@ -160,6 +160,7 @@
(gui:popup popup-menu x y))))) (gui:popup popup-menu x y)))))
(defun init-window (master main-window) (defun init-window (master main-window)
(client-main-window:hide-autocomplete-candidates main-window)
(gui:with-toplevel (toplevel :master master :title (_ "Gemlogs")) (gui:with-toplevel (toplevel :master master :title (_ "Gemlogs"))
(let* ((table (make-instance 'gemlog-frame :master toplevel)) (let* ((table (make-instance 'gemlog-frame :master toplevel))
(buttons-frame (make-instance 'gui:frame :master toplevel)) (buttons-frame (make-instance 'gui:frame :master toplevel))

View File

@ -241,7 +241,7 @@
(help (gui:make-menu bar (_ "Help")))) (help (gui:make-menu bar (_ "Help"))))
(gui:make-menubutton tools (gui:make-menubutton tools
(_ "Certificates") (_ "Certificates")
#'menu:show-certificates (menu:show-certificates-clsr main-window)
:accelerator (client-configuration:get-keybinding :certificates)) :accelerator (client-configuration:get-keybinding :certificates))
(gui:make-menubutton tools (gui:make-menubutton tools
(_ "Search") (_ "Search")
@ -278,7 +278,7 @@
(gui:make-menubutton bookmarks (_ "Manage") (menu:manage-bookmarks-clsr main-window)) (gui:make-menubutton bookmarks (_ "Manage") (menu:manage-bookmarks-clsr main-window))
(gui:make-menubutton tour (gui:make-menubutton tour
(_ "Manage") (_ "Manage")
#'menu:show-tour (menu:show-tour-clsr main-window)
:accelerator (client-configuration:config-keybinding-tour-manage)) :accelerator (client-configuration:config-keybinding-tour-manage))
(gui:make-menubutton tour (gui:make-menubutton tour
(_ "Shuffle") (_ "Shuffle")
@ -620,7 +620,9 @@ local file paths."
(_ "~s already bookmarked") (_ "~s already bookmarked")
link-value) link-value)
:bold t) :bold t)
(client-bookmark-window:init-window main-window link-value)))) (client-bookmark-window:init-window main-window
main-window
link-value))))
(open-inline-clsr (line-number) (open-inline-clsr (line-number)
(lambda () (lambda ()
(if (inline-possible-p link-value) (if (inline-possible-p link-value)
@ -1089,7 +1091,7 @@ local file paths."
((iri:iri= actual-iri (internal-iri-gemlogs)) ((iri:iri= actual-iri (internal-iri-gemlogs))
(menu:manage-gemlogs)) (menu:manage-gemlogs))
((gemini-client:absolute-titan-url-p actual-iri) ((gemini-client:absolute-titan-url-p actual-iri)
(client-titan-window:init-window main-window actual-iri)) (client-titan-window:init-window main-window main-window actual-iri))
((gemini-parser:gemini-iri-p actual-iri) ((gemini-parser:gemini-iri-p actual-iri)
(let ((stream-frame (stream-frame main-window))) (let ((stream-frame (stream-frame main-window)))
(start-stream-iri (iri-ensure-path actual-iri) (start-stream-iri (iri-ensure-path actual-iri)
@ -1411,7 +1413,9 @@ local file paths."
(ev:with-enqueued-process-and-unblock () (ev:with-enqueued-process-and-unblock ()
(comm:make-request :gemini-bookmark-delete 1 iri) (comm:make-request :gemini-bookmark-delete 1 iri)
(set-bookmark-button-false main-window)) (set-bookmark-button-false main-window))
(client-bookmark-window:init-window main-window (gui:text iri-entry)))))))) (client-bookmark-window:init-window main-window
main-window
(gui:text iri-entry))))))))
(defun toggle-subscribtion-iri-clsr (main-window) (defun toggle-subscribtion-iri-clsr (main-window)
(lambda () (lambda ()
@ -1872,13 +1876,13 @@ local file paths."
(client-configuration:get-keybinding :certificates) (client-configuration:get-keybinding :certificates)
(lambda (e) (lambda (e)
(declare (ignore e)) (declare (ignore e))
(menu:show-certificates)) (funcall (menu:show-certificates-clsr main-window)))
:exclusive t) :exclusive t)
(gui:bind target (gui:bind target
(client-configuration:config-keybinding-tour-manage) (client-configuration:config-keybinding-tour-manage)
(lambda (e) (lambda (e)
(declare (ignore e)) (declare (ignore e))
(menu:show-tour)) (funcall (menu:show-tour-clsr main-window)))
:exclusive t) :exclusive t)
(gui:bind target (gui:bind target
(client-configuration:get-keybinding :gemlog) (client-configuration:get-keybinding :gemlog)
@ -1999,3 +2003,6 @@ local file paths."
(set-address-bar-text main-frame starting-iri))) (set-address-bar-text main-frame starting-iri)))
(open-iri starting-iri main-frame nil)) (open-iri starting-iri main-frame nil))
(client-scheduler:start)))) (client-scheduler:start))))
(defun hide-autocomplete-candidates (main-window)
(gui-mw:hide-candidates (iri-entry (tool-bar main-window))))

View File

@ -50,9 +50,10 @@
(client-events:stop-events-loop) (client-events:stop-events-loop)
(comm:close-server)) (comm:close-server))
(defun show-certificates () (defun show-certificates-clsr (main-window)
(lambda ()
(let ((master gui-goodies:*toplevel*)) (let ((master gui-goodies:*toplevel*))
(client-certificates-window:init-window master))) (client-certificates-window:init-window master main-window))))
(defun show-streams () (defun show-streams ()
(let* ((master gui-goodies:*main-frame*) (let* ((master gui-goodies:*main-frame*)
@ -129,9 +130,10 @@
(gui:grid (client-main-window::search-frame main-window) 2 0 :sticky :news) (gui:grid (client-main-window::search-frame main-window) 2 0 :sticky :news)
(gui:focus (client-search-frame::entry (client-main-window::search-frame main-window))))) (gui:focus (client-search-frame::entry (client-main-window::search-frame main-window)))))
(defun show-tour () (defun show-tour-clsr (main-window)
(lambda ()
(let ((master gui-goodies:*toplevel*)) (let ((master gui-goodies:*toplevel*))
(client-tour-window:init-window master))) (client-tour-window:init-window master main-window))))
(defun manage-gemlogs () (defun manage-gemlogs ()
(let ((master gui-goodies:*toplevel*) (let ((master gui-goodies:*toplevel*)

View File

@ -230,7 +230,8 @@
(gui:grid ok-button 0 0) (gui:grid ok-button 0 0)
(gui:grid cancel-button 0 1)))) (gui:grid cancel-button 0 1))))
(defun init-window (master &optional (titan-url nil)) (defun init-window (master main-window &optional (titan-url nil))
(client-main-window:hide-autocomplete-candidates main-window)
(gui:with-toplevel (toplevel :master master :title (_ "Titan request window")) (gui:with-toplevel (toplevel :master master :title (_ "Titan request window"))
(gui:transient toplevel master) (gui:transient toplevel master)
(let* ((frame (make-instance 'titan-frame (let* ((frame (make-instance 'titan-frame

View File

@ -64,7 +64,8 @@
(let ((new-rows (all-rows))) (let ((new-rows (all-rows)))
(resync-rows tour-frame new-rows)))) (resync-rows tour-frame new-rows))))
(defun init-window (master) (defun init-window (master main-window)
(client-main-window:hide-autocomplete-candidates main-window)
(gui:with-toplevel (toplevel :master master :title (_ "Tour")) (gui:with-toplevel (toplevel :master master :title (_ "Tour"))
(gui:transient toplevel master) (gui:transient toplevel master)
(let* ((table (make-instance 'tour-frame :master toplevel)) (let* ((table (make-instance 'tour-frame :master toplevel))

View File

@ -3552,14 +3552,14 @@
(:export (:export
:help-about :help-about
:quit :quit
:show-certificates :show-certificates-clsr
:show-streams :show-streams
:show-bookmarks-clsr :show-bookmarks-clsr
:export-bookmarks-clsr :export-bookmarks-clsr
:import-bookmarks-clsr :import-bookmarks-clsr
:manage-bookmarks-clsr :manage-bookmarks-clsr
:show-search-frame-clsr :show-search-frame-clsr
:show-tour :show-tour-clsr
:manage-gemlogs :manage-gemlogs
:show-page-source-clsr)) :show-page-source-clsr))
@ -3750,7 +3750,8 @@
:print-info-message :print-info-message
:make-internal-iri :make-internal-iri
:internal-iri-bookmark :internal-iri-bookmark
:show-bookmarks-page)) :show-bookmarks-page
:hide-autocomplete-candidates))
(defpackage :main (defpackage :main
(:use (:use