fix panel naming issues and residual properties on close

This commit is contained in:
David Botton 2024-06-24 21:25:00 -04:00
parent 118da225e4
commit 754fab359c
3 changed files with 22 additions and 7 deletions

View file

@ -8,9 +8,7 @@
`(:name "clog-data"
:description "Panel Properties"
:events nil
:properties ((:name "panel name"
:attr "data-clog-name")
(:name "in-package"
:properties ((:name "in-package"
:attr "data-in-package")
(:name "custom slots"
:attr "data-custom-slots")

View file

@ -43,6 +43,10 @@
obj))
(placer (when control
(get-placer control)))
(panel-id (attribute placer "data-panel-id"))
(panel (if (current-control app)
(attach-as-child obj panel-id)
obj))
(table (properties-list app)))
(when prop-win
(setf (inner-html table) "")
@ -75,12 +79,24 @@
(setf (attribute control (getf prop :attr)) (text obj))))
props))
(t (print "Configuration error."))))
(when (equal (getf info :name) "clog-data")
(push
`("panel name" ,(attribute control "data-clog-name")
nil
,(lambda (obj)
(let ((vname (text obj)))
(unless (equal vname "")
(when (equal (subseq vname 0 1) "(")
(setf vname (format nil "|~A|" vname)))
(setf (attribute control "data-clog-name") vname)
(on-populate-control-list-win panel :win win)
(when win
(setf (window-title win) vname))))))
props))
(when (current-control app)
(let* (panel-controls
(cname (attribute control "data-clog-name"))
(ctype (attribute control "data-clog-type"))
(panel-id (attribute placer "data-panel-id"))
(panel (attach-as-child obj panel-id)))
(ctype (attribute control "data-clog-type")))
(maphash (lambda (k v)
(declare (ignore k))
(let ((n (attribute v "data-clog-name"))

View file

@ -829,10 +829,11 @@ not a temporarily attached one when using select-control."
(setf is-dirty nil)
(clrhash (get-control-list app panel-id))
(on-populate-loaded-window content :win win)
(setf (window-title win) (attribute content "data-clog-name"))
(when ext-panel
(setf (title (html-document ext-panel)) (attribute content "data-clog-name")))
(setf (window-param win) fname)
(setf (window-title win) (attribute content "data-clog-name"))
(on-populate-control-properties-win content :win win)
(on-populate-control-list-win content :win win))
(load-file (obj)
(server-file-dialog obj "Load Panel" (directory-namestring (if (equal file-name "")