Commit 15f955d5 authored by David O'Toole's avatar David O'Toole

pre-fix

parent d651bd17
......@@ -185,13 +185,12 @@
((type :initform :system)
(running :initform nil)))
(defun show-dialog (dialog title &optional instance)
(defun show-dialog (dialog title)
(let ((frame (make-frame title dialog)))
(add-node (current-buffer) frame)
(center frame)
(freeze dialog)
(when instance
(setf (slot-value dialog 'instance) instance))
(mapc #'freeze (inputs dialog))
nil))
(defun edit-cut ()
......@@ -288,6 +287,13 @@
(switch-to-buffer (make-instance 'buffer :name (arg 'buffer-name)))
(paste (current-buffer))
(trim (current-buffer)))
(define-properties-dialog buffer-properties
(name height width z-sort-p background-image background-color
window-scrolling-speed horizontal-scrolling-margin vertical-scrolling-margin)
(with-slots (height width name) self
(resize self height width)
(rename self name)))
;; User dialogs:1 ends here
;; Menu bar structure
......
......@@ -4405,13 +4405,12 @@ supported compiler.
(export ',(action-name))
(defun ,(show-name) (&rest args)
(show-dialog (apply #'make-instance ',(dialog-class-name) args)
,(command-name-string name)
*instance*))
,(command-name-string name)))
(export ',(show-name))
(define-visual-macro ,(dialog-class-name)
(:super phrase
:slots ((orientation :initform :vertical)
(instance :initform nil :initarg :instance))
(instance :initform *instance* :initarg :instance))
:inputs ,(command-inputs name arglist)))
(export ',(dialog-class-name))
(defmethod evaluate ((self ,(dialog-class-name)))
......@@ -4439,7 +4438,7 @@ supported compiler.
(let ((slot (pop ^args^))
(value (pop ^args^)))
(setf (slot-value self slot) value))))))
(defparameter *minimum-shell-width* 400)
(defparameter *shell-background-color* "gray20")
......@@ -4665,14 +4664,12 @@ supported compiler.
((type :initform :system)
(running :initform nil)))
(defun show-dialog (dialog title &optional instance)
(defun show-dialog (dialog title)
(let ((frame (make-frame title dialog)))
(add-node (current-buffer) frame)
(center frame)
(freeze dialog)
(mapc #'freeze (inputs dialog))
(when instance
(setf (slot-value dialog 'instance) instance))
nil))
(defun edit-cut ()
......@@ -4768,6 +4765,14 @@ supported compiler.
(switch-to-buffer (make-instance 'buffer :name (arg 'buffer-name)))
(paste (current-buffer))
(trim (current-buffer)))
(define-properties-dialog buffer-properties
(name height width z-sort-p background-image background-color
window-scrolling-speed horizontal-scrolling-margin vertical-scrolling-margin)
(with-slots (height width name) self
(resize self height width)
(rename self name)))
#+end_src
** Menu bar structure
......
......@@ -195,13 +195,12 @@
(export ',(action-name))
(defun ,(show-name) (&rest args)
(show-dialog (apply #'make-instance ',(dialog-class-name) args)
,(command-name-string name)
*instance*))
,(command-name-string name)))
(export ',(show-name))
(define-visual-macro ,(dialog-class-name)
(:super phrase
:slots ((orientation :initform :vertical)
(instance :initform nil :initarg :instance))
(instance :initform *instance* :initarg :instance))
:inputs ,(command-inputs name arglist)))
(export ',(dialog-class-name))
(defmethod evaluate ((self ,(dialog-class-name)))
......@@ -229,7 +228,7 @@
(let ((slot (pop ^args^))
(value (pop ^args^)))
(setf (slot-value self slot) value))))))
(defparameter *minimum-shell-width* 400)
(defparameter *shell-background-color* "gray20")
......
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