Commit 3ea35cc8 authored by Robert Strandh's avatar Robert Strandh

Simplified implementation of com-single-window and made it independent

of the clim-internals package.
parent 3996ed82
......@@ -992,25 +992,10 @@ as two values"
(define-named-command com-single-window ()
(unless (null (cdr (windows *application-frame*)))
(let* ((saver (parent3 (current-window)))
(top-level (do
((n saver (setf n (sheet-parent n))))
((clim-internals::top-level-sheet-pane-p n) n)))
(level1 (car (sheet-children top-level))) ;; should be the only thing on level1
(level2 (if (typep (car (sheet-children level1)) 'vrack-pane) ;;don't select raised pane
(car (sheet-children level1))
(cadr (sheet-children level1))))
(level2-children (sheet-children level2))
(junker (if (typep (car level2-children) 'vrack-pane) ;;don't select minibuffer
(car level2-children)
(cadr level2-children))))
(sheet-disown-child (sheet-parent saver) saver)
(sheet-disown-child level2 junker)
(sheet-adopt-child level2 saver)
(reorder-sheets level2 (reverse (sheet-children level2))) ;;minibuffer goes on bottom
(setf (windows *application-frame*) (list (car (windows *application-frame*)))))))
(loop until (null (cdr (windows *application-frame*)))
do (rotatef (car (windows *application-frame*))
(cadr (windows *application-frame*)))
;; (define-named-command com-delete-window ()
;; (unless (null (cdr (windows *application-frame*)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment