remove ql use

This commit is contained in:
David Botton 2024-07-23 11:20:26 -04:00
parent bfd5dd2648
commit d5a2d5dcd9
3 changed files with 43 additions and 68 deletions

View file

@ -73,6 +73,26 @@ create-div's"
(template-copy fname www-dir dir :base-dir nil))
(asdf:clear-source-registry)))
(defun add-template-dir (panel target)
(declare (ignore target))
(let ((*default-title-class* *builder-title-class*)
(*default-border-class* *builder-border-class*))
(input-dialog panel "Add Project Directory"
(lambda (result)
(when result
(pushnew result
(symbol-value (read-from-string "ql:*local-project-directories*"))
:test #'equalp)
(add-select-option (project-list panel) result result :selected t)
(let ((*default-title-class* *builder-title-class*)
(*default-border-class* *builder-border-class*))
(alert-dialog panel (format nil "~A added to ql:*local-project-directories* temporarily.~% ~
Use the generated run-ql or run-ocicl scripts in the created project ~%
or add to Options -> Edit preferences.lisp to work with your project in ~%
future."
result)
:width 500 :height 250)))))))
;; Handle panel-clog-templates events
(defun fill-button-clicked (panel)

View file

@ -1,33 +1,6 @@
<data id="I3930209047" data-in-package="clog-tools"
data-custom-slots="(on-done :accessor on-done :initform nil)"
data-clog-next-id="6" data-clog-title="project-dir"></data>
<div data-clog-type="flex-col" data-clog-name="frame"
style="display: flex; flex-direction: column; box-sizing: content-box; position: absolute; inset: 10px; justify-content: normal; align-items: center;">
<select data-clog-type="listbox" size="4" data-clog-name="project-list"
style="box-sizing: content-box; position: static; width: 90%; height: 80%;"
data-on-create="(add-select-options (project-list panel) (projects-local-directories))
(setf (value (project-list panel)) (car (projects-local-directories)))"
data-on-double-click="(funcall (on-done panel) panel)"></select><button
data-clog-type="button" data-clog-name="select-button"
style="box-sizing: content-box; position: static; width: 220px;"
data-on-click="(funcall (on-done panel) panel)" class="w3-margin">Select
Project Directory</button><button data-clog-type="button"
data-clog-name="other-button"
style="box-sizing: content-box; position: static; left: 31px; top: 3px; width: 220px; height: 22px;"
class="" data-on-click="(let ((*default-title-class* *builder-title-class*)
(*default-border-class* *builder-border-class*))
(input-dialog panel &quot;Add Project Directory&quot;
(lambda (result)
(when result
(pushnew result ql:*local-project-directories* :test #'equalp)
(add-select-option (project-list panel) result result :selected t)
(let ((*default-title-class* *builder-title-class*)
(*default-border-class* *builder-border-class*))
(alert-dialog panel (format nil &quot;~A added to ql:*local-project-directories* temporarily.~% ~
Use the generated run-ql or run-ocicl scripts in the created project ~%
or add to Options -> Edit preferences.lisp to work with your project in ~%
future.&quot;
result)
:width 500 :height 250))))))
">Add Alternative Directory</button>
<data id="I3930736324" data-in-package="clog-tools" data-custom-slots="(on-done :accessor on-done :initform nil)" data-clog-next-id="6" data-clog-title="project-dir"></data>
<div data-clog-type="flex-col" data-clog-name="frame" style="display: flex; flex-direction: column; box-sizing: content-box; position: absolute; inset: 10px; justify-content: normal; align-items: center;">
<select data-clog-type="listbox" size="4" data-clog-name="project-list" style="box-sizing: content-box; position: static; width: 90%; height: 80%;" data-on-create="(add-select-options (project-list panel) (projects-local-directories))
(setf (value (project-list panel)) (car (projects-local-directories)))" data-on-double-click="(funcall (on-done panel) panel)"></select><button data-clog-type="button" data-clog-name="select-button" style="box-sizing: content-box; position: static; width: 220px;" data-on-click="(funcall (on-done panel) panel)" class="w3-margin">Select
Project Directory</button><button data-clog-type="button" data-clog-name="other-button" style="box-sizing: content-box; position: static; left: 31px; top: 3px; width: 220px; height: 22px;" class="" data-on-click="(add-template-dir panel target)">Add Alternative Directory</button>
</div>

View file

@ -9,34 +9,37 @@
(clog-obj &key hidden class style html-id (auto-place t))
(let ((panel
(change-class
(clog:create-div clog-obj :content
"<div style=\"display: flex; flex-direction: column; box-sizing: content-box; position: absolute; inset: 10px; justify-content: normal; align-items: center;\"
id=\"CLOGB3930207069\" data-clog-name=\"frame\">
<select size=\"4\"
(clog:create-div clog-obj :content "<div data-clog-name=\"frame\"
style=\"display: flex; flex-direction: column; box-sizing: content-box; position: absolute; inset: 10px; justify-content: normal; align-items: center;\"
id=\"CLOGB3930736269\">
<select size=\"4\" data-clog-name=\"project-list\"
style=\"box-sizing: content-box; position: static; width: 90%; height: 80%;\"
id=\"CLOGB3930207070\" data-clog-name=\"project-list\"></select><button
id=\"CLOGB3930736270\"></select>
<button data-clog-name=\"select-button\"
style=\"box-sizing: content-box; position: static; width: 220px;\"
class=\"w3-margin\" id=\"CLOGB3930207071\"
data-clog-name=\"select-button\">Select
Project Directory</button><button
class=\"w3-margin\" id=\"CLOGB3930736271\">Select
Project Directory</button>
<button data-clog-name=\"other-button\"
style=\"box-sizing: content-box; position: static; left: 31px; top: 3px; width: 220px; height: 22px;\"
class=\"\" id=\"CLOGB3930207072\" data-clog-name=\"other-button\">Add
Alternative Directory</button>
class=\"\" id=\"CLOGB3930736272\">Add Alternative Directory</button>
</div>"
:hidden hidden :class class :style style :html-id
html-id :auto-place auto-place)
'project-dir)))
(setf (slot-value panel 'other-button)
(attach-as-child clog-obj "CLOGB3930207072" :clog-type
(attach-as-child clog-obj "CLOGB3930736272" :clog-type
'clog:clog-button :new-id t))
(setf (slot-value panel 'select-button)
(attach-as-child clog-obj "CLOGB3930207071" :clog-type
(attach-as-child clog-obj "CLOGB3930736271" :clog-type
'clog:clog-button :new-id t))
(setf (slot-value panel 'project-list)
(attach-as-child clog-obj "CLOGB3930207070" :clog-type
(attach-as-child clog-obj "CLOGB3930736270" :clog-type
'clog:clog-select :new-id t))
(setf (slot-value panel 'frame)
(attach-as-child clog-obj "CLOGB3930207069" :clog-type
(attach-as-child clog-obj "CLOGB3930736269" :clog-type
'clog:clog-div :new-id t))
(let ((target (project-list panel)))
(declare (ignorable target))
@ -53,26 +56,5 @@
(clog:set-on-click (other-button panel)
(lambda (target)
(declare (ignorable target))
(let ((*default-title-class* *builder-title-class*)
(*default-border-class* *builder-border-class*))
(input-dialog panel "Add Project Directory"
(lambda (result)
(when result
(pushnew result
quicklisp-client:*local-project-directories*
:test #'equalp)
(add-select-option (project-list panel) result
result :selected t)
(let ((*default-title-class*
*builder-title-class*)
(*default-border-class*
*builder-border-class*))
(alert-dialog panel
(format nil
"~A added to ql:*local-project-directories* temporarily.~% ~
Use the generated run-ql or run-ocicl scripts in the created project ~%
or add to Options -> Edit preferences.lisp to work with your project in ~%
future."
result)
:width 500 :height 250))))))))
(add-template-dir panel target)))
panel))