mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-17 08:10:36 +01:00
- [GUI] chaged code to match the new nodgui API related to both modal and non-modal toplevel;
- [GUI] fixed callback to make visible the next matched text in a gemtext search.
This commit is contained in:
parent
1a886affa3
commit
be04ddc99c
@ -114,7 +114,7 @@
|
|||||||
cert-file
|
cert-file
|
||||||
key-file)
|
key-file)
|
||||||
(resync-rows certificate-frame (all-rows))
|
(resync-rows certificate-frame (all-rows))
|
||||||
(gui:break-mainloop))
|
(gui:exit-from-toplevel (gui:master import-window)))
|
||||||
(error (e)
|
(error (e)
|
||||||
(client-main-window::notify-request-error e)))))))
|
(client-main-window::notify-request-error e)))))))
|
||||||
|
|
||||||
@ -175,9 +175,10 @@
|
|||||||
:command
|
:command
|
||||||
(import-certificate-clsr object certificate-frame)))
|
(import-certificate-clsr object certificate-frame)))
|
||||||
(setf cancel-button (make-instance 'gui:button
|
(setf cancel-button (make-instance 'gui:button
|
||||||
:text (_ "Cancel")
|
:text (_ "Cancel")
|
||||||
:master buttons-frame
|
:master buttons-frame
|
||||||
:command (lambda () (gui:break-mainloop))))
|
:command
|
||||||
|
(lambda () (gui:exit-from-toplevel (gui:master object)))))
|
||||||
(gui:grid url-label 0 0)
|
(gui:grid url-label 0 0)
|
||||||
(gui:grid url-entry 1 0)
|
(gui:grid url-entry 1 0)
|
||||||
(gui:grid cert-label 3 0)
|
(gui:grid cert-label 3 0)
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
:master toplevel
|
:master toplevel
|
||||||
:command (lambda ()
|
:command (lambda ()
|
||||||
(setf res (gui-mw:secret-string widget))
|
(setf res (gui-mw:secret-string widget))
|
||||||
(gui:break-mainloop)))))
|
(gui:exit-from-modal-toplevel toplevel)))))
|
||||||
(gui:grid label 0 0 :sticky :news)
|
(gui:grid label 0 0 :sticky :news)
|
||||||
(gui:grid widget 1 0 :sticky :news)
|
(gui:grid widget 1 0 :sticky :news)
|
||||||
(gui:grid ok-button 1 1 :sticky :news)))
|
(gui:grid ok-button 1 1 :sticky :news)))
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
(gui:wait-complete-redraw)))))
|
(gui:wait-complete-redraw)))))
|
||||||
|
|
||||||
(defun quit ()
|
(defun quit ()
|
||||||
(gui:break-mainloop)
|
(gui:exit-nodgui)
|
||||||
(client-events:stop-events-loop)
|
(client-events:stop-events-loop)
|
||||||
(comm:close-server))
|
(comm:close-server))
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
(gui:grid case-sensitive-checkbox 0 4 :sticky :nws :padx +minimum-padding+)
|
(gui:grid case-sensitive-checkbox 0 4 :sticky :nws :padx +minimum-padding+)
|
||||||
(gui:grid button-close 0 5 :sticky :ne)
|
(gui:grid button-close 0 5 :sticky :ne)
|
||||||
(gui:grid-columnconfigure frame 5 :weight 1)
|
(gui:grid-columnconfigure frame 5 :weight 1)
|
||||||
(gui-goodies:attach-tooltips ((button-next frame) (_ "next matched text"))
|
(gui-goodies:attach-tooltips ((button-next frame) (_ "make next match visible"))
|
||||||
((button-previous frame) (_ "previous matched text"))
|
((button-previous frame) (_ "make previous match visible"))
|
||||||
(button-close (_ "end searching")))
|
(button-close (_ "end searching")))
|
||||||
(gui:bind (entry frame)
|
(gui:bind (entry frame)
|
||||||
#$<KeyPress-Return>$
|
#$<KeyPress-Return>$
|
||||||
@ -66,8 +66,7 @@
|
|||||||
(lambda ()
|
(lambda ()
|
||||||
(when (matches frame)
|
(when (matches frame)
|
||||||
(setf (counter frame) (rem (1+ (counter frame)) (length (matches frame))))
|
(setf (counter frame) (rem (1+ (counter frame)) (length (matches frame))))
|
||||||
(gui:see gemtext-widget `(:tag ,(gui:match-start (elt (matches frame) (counter frame)))
|
(gui:see gemtext-widget (gui:match-start (elt (matches frame) (counter frame)))))))
|
||||||
:first)))))
|
|
||||||
(setf (gui:command (button-previous frame))
|
(setf (gui:command (button-previous frame))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (matches frame)
|
(when (matches frame)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user