mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
menu option for emacs, about box, confirm dialog fix
This commit is contained in:
parent
da9ad8c83c
commit
0d87519b64
5 changed files with 29 additions and 12 deletions
|
|
@ -1671,7 +1671,10 @@ Calls on-input with t if confirmed or nil if canceled."
|
||||||
(focus ok)
|
(focus ok)
|
||||||
(set-on-click cancel (lambda (obj)
|
(set-on-click cancel (lambda (obj)
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
(window-close win))
|
(when modal
|
||||||
|
(window-end-modal win))
|
||||||
|
(window-close win)
|
||||||
|
(funcall on-input nil))
|
||||||
:one-time t)
|
:one-time t)
|
||||||
(set-on-click ok (lambda (obj)
|
(set-on-click ok (lambda (obj)
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
l))))
|
l))))
|
||||||
l)))
|
l)))
|
||||||
:meta "swank"))
|
:meta "swank"))
|
||||||
;; run apropos on symbol
|
;; find symbol in sys-browser
|
||||||
(js-execute editor
|
(js-execute editor
|
||||||
(format nil
|
(format nil
|
||||||
"~A.commands.addCommand({
|
"~A.commands.addCommand({
|
||||||
|
|
@ -254,10 +254,8 @@ var endRange = ~:*~A.session.doc.indexToPosition(endIndex);
|
||||||
(return (string-downcase (second form)))))))))
|
(return (string-downcase (second form)))))))))
|
||||||
|
|
||||||
;; Expand region
|
;; Expand region
|
||||||
|
|
||||||
(defun scan-exps (text)
|
(defun scan-exps (text)
|
||||||
"Scan all expressions (and strings) in the text, return a list of start-end cons.
|
"Scan all expressions (and strings) in the text, return a list of start-end cons.
|
||||||
|
|
||||||
It parse the string TEXT without using READ functions."
|
It parse the string TEXT without using READ functions."
|
||||||
(let ((char-count 0)
|
(let ((char-count 0)
|
||||||
(backslash 0)
|
(backslash 0)
|
||||||
|
|
|
||||||
|
|
@ -170,13 +170,14 @@
|
||||||
(alert-dialog win
|
(alert-dialog win
|
||||||
"<table>
|
"<table>
|
||||||
<tr><td>cmd/ctrl-,</td><td>Configure editor</td></tr>
|
<tr><td>cmd/ctrl-,</td><td>Configure editor</td></tr>
|
||||||
|
<tr><td>F1</td><td>Command Palette</td></tr>
|
||||||
<tr><td>cmd/alt-.</td><td> Launch system browser</td></tr>
|
<tr><td>cmd/alt-.</td><td> Launch system browser</td></tr>
|
||||||
<tr><td>cmd/alt-[</td><td> Evaluate form</td></tr>
|
<tr><td>cmd/alt-[</td><td> Evaluate form</td></tr>
|
||||||
<tr><td>cmd/ctrl-s</td><td> Save</td></tr>
|
<tr><td>cmd/ctrl-s</td><td> Save</td></tr>
|
||||||
<tr><td>ctl-=</td><td>Expand region</td></tr>
|
<tr><td>ctl-=</td><td>Expand region</td></tr>
|
||||||
<tr><td>opt/alt-m</td><td>Macroexpand</td></tr>
|
<tr><td>opt/alt-m</td><td>Macroexpand</td></tr>
|
||||||
</table><p><a target='_blank' href='https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts'>Default Keybindings</a>"
|
</table><p><a target='_blank' href='https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts'>Default Keybindings</a>"
|
||||||
:width 400 :height 300
|
:width 400 :height 350
|
||||||
:title "Help")))
|
:title "Help")))
|
||||||
(set-on-click btn-help #'on-help)
|
(set-on-click btn-help #'on-help)
|
||||||
(set-on-click m-helpk #'on-help))
|
(set-on-click m-helpk #'on-help))
|
||||||
|
|
|
||||||
|
|
@ -976,9 +976,9 @@ not a temporarily attached one when using select-control."
|
||||||
(set-on-mouse-down content
|
(set-on-mouse-down content
|
||||||
(lambda (obj data)
|
(lambda (obj data)
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
(unless in-simulation
|
(when (drop-new-control app content data :win win)
|
||||||
(when (drop-new-control app content data :win win)
|
(setf is-dirty t)
|
||||||
(incf-next-id content))))))))
|
(incf-next-id content)))))))
|
||||||
|
|
||||||
(defun on-new-builder-page (obj)
|
(defun on-new-builder-page (obj)
|
||||||
"Open new page"
|
"Open new page"
|
||||||
|
|
|
||||||
|
|
@ -161,12 +161,17 @@ clog-builder window.")
|
||||||
<center>CLOG</center>
|
<center>CLOG</center>
|
||||||
<center>The Common Lisp Omnificent GUI</center></div>
|
<center>The Common Lisp Omnificent GUI</center></div>
|
||||||
<div><p><center>
|
<div><p><center>
|
||||||
<a target=_blank href='https://github.com/sponsors/rabbibotton'>CLOG Builder</a>
|
<a target=_blank href='https://github.com/rabbibotton/clog'>CLOG Builder</a>
|
||||||
</center>
|
</center>
|
||||||
<center>(c) 2022-2024 - David Botton</center></p></div>"
|
<center>(c) 2022-2024 - David Botton</center></p>
|
||||||
|
<p>
|
||||||
|
<center>
|
||||||
|
<a target=_blank href='https://github.com/sponsors/rabbibotton'>Sponsor CLOG</a>
|
||||||
|
</center>
|
||||||
|
</div>"
|
||||||
img-clog-icon)
|
img-clog-icon)
|
||||||
:width 220
|
:width 400
|
||||||
:height 230
|
:height 250
|
||||||
:hidden t)))
|
:hidden t)))
|
||||||
(add-class about "w3-animate-opacity")
|
(add-class about "w3-animate-opacity")
|
||||||
(window-center about)
|
(window-center about)
|
||||||
|
|
@ -375,6 +380,16 @@ clog-builder window.")
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
(open-window (window body) "/dbadmin")))
|
(open-window (window body) "/dbadmin")))
|
||||||
(create-gui-menu-item opts :content "Edit preferences.lisp" :on-click 'on-opts-edit)
|
(create-gui-menu-item opts :content "Edit preferences.lisp" :on-click 'on-opts-edit)
|
||||||
|
(let ((exter (create-button opts :content "-" :class *builder-menu-button-class*)))
|
||||||
|
(flet ((exter-text ()
|
||||||
|
(if *open-external-with-emacs*
|
||||||
|
"open external files in emacs"
|
||||||
|
"open all files in builder")))
|
||||||
|
(setf (text-value exter) (exter-text))
|
||||||
|
(set-on-click exter (lambda (obj)
|
||||||
|
(declare (ignore obj))
|
||||||
|
(setf *open-external-with-emacs* (not *open-external-with-emacs*))
|
||||||
|
(setf (text-value exter) (exter-text))))))
|
||||||
(create-gui-menu-item win :content "Maximize" :on-click
|
(create-gui-menu-item win :content "Maximize" :on-click
|
||||||
(lambda (obj)
|
(lambda (obj)
|
||||||
(when (current-window obj)
|
(when (current-window obj)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue