[gsharp-cvs] CVS update: gsharp/buffer.lisp gsharp/gui.lisp gsharp/packages.lisp

Robert Strandh rstrandh at common-lisp.net
Mon Oct 31 20:16:56 UTC 2005


Update of /project/gsharp/cvsroot/gsharp
In directory common-lisp.net:/tmp/cvs-serv11680

Modified Files:
	buffer.lisp gui.lisp packages.lisp 
Log Message:
Removed the function MAKE-FIVELINE-STAFF in favor of 
MAKE-INSTANCE 'FIVELINE-STAFF.

Date: Mon Oct 31 21:16:54 2005
Author: rstrandh

Index: gsharp/buffer.lisp
diff -u gsharp/buffer.lisp:1.14 gsharp/buffer.lisp:1.15
--- gsharp/buffer.lisp:1.14	Mon Oct 31 20:55:30 2005
+++ gsharp/buffer.lisp	Mon Oct 31 21:16:51 2005
@@ -75,16 +75,15 @@
 
 (defclass fiveline-staff (staff)
   ((print-character :allocation :class :initform #\=)
-   (clef :accessor clef :initarg :clef :initform nil)
+   (clef :accessor clef :initarg :clef :initform (make-instance 'clef :name :treble))
    (keysig :accessor keysig :initarg :keysig
-	   :initform (make-array 7 :initial-element :natural))))
+	   :initform (make-array 7 :initial-element :natural)))
+  (:default-initargs
+      :name "default staff"))
 	   
 (defmethod print-object :after ((s fiveline-staff) stream)
   (format stream ":clef ~W :keysig ~W " (clef s) (keysig s)))
 
-(defun make-fiveline-staff (name &optional (clef (make-instance 'clef :name :treble)))
-  (make-instance 'fiveline-staff :name name :clef clef))
-
 (defun read-fiveline-staff-v3 (stream char n)
   (declare (ignore char n))
   (apply #'make-instance 'fiveline-staff (read-delimited-list #\] stream t)))
@@ -874,7 +873,7 @@
 (defclass buffer (gsharp-object)
   ((print-character :allocation :class :initform #\B)
    (segments :initform '() :initarg :segments :accessor segments)
-   (staves :initform (list (make-fiveline-staff "default staff"))
+   (staves :initform (list (make-instance 'fiveline-staff))
 	   :initarg :staves :accessor staves)
    (min-width :initform *default-min-width* :initarg :min-width :accessor min-width)
    (spacing-style :initform *default-spacing-style* :initarg :spacing-style :accessor spacing-style)


Index: gsharp/gui.lisp
diff -u gsharp/gui.lisp:1.30 gsharp/gui.lisp:1.31
--- gsharp/gui.lisp:1.30	Mon Oct 31 20:55:30 2005
+++ gsharp/gui.lisp	Mon Oct 31 21:16:51 2005
@@ -1050,9 +1050,10 @@
 (defun acquire-new-staff ()
   (let ((name (acquire-unique-staff-name "Name of new staff")))
     (ecase (accept 'staff-type :prompt "Type")
-      (:fiveline (let ((clef (accept 'clef-type :prompt "Clef type of new staff"))
-		       (line (accept 'integer :prompt "Line of clef")))
-		   (make-fiveline-staff name (make-instance 'clef :name clef :lineno line))))
+      (:fiveline (let* ((clef-name (accept 'clef-type :prompt "Clef type of new staff"))
+			(line (accept 'integer :prompt "Line of clef"))
+			(clef (make-instance 'clef :name clef-name :lineno line)))
+		   (make-instance 'fiveline-staff :name name :clef clef)))
       (:lyrics (make-lyrics-staff name)))))
 
 (define-gsharp-command (com-insert-staff-before :name t) ()


Index: gsharp/packages.lisp
diff -u gsharp/packages.lisp:1.16 gsharp/packages.lisp:1.17
--- gsharp/packages.lisp:1.16	Mon Oct 31 20:55:30 2005
+++ gsharp/packages.lisp	Mon Oct 31 21:16:51 2005
@@ -37,7 +37,7 @@
   (:use :common-lisp :gsharp-utilities)
   (:shadow #:rest)
   (:export #:clef #:name #:lineno
-	   #:staff #:fiveline-staff #:make-fiveline-staff
+	   #:staff #:fiveline-staff
 	   #:lyrics-staff #:make-lyrics-staff
 	   #:gsharp-condition
 	   #:pitch #:accidentals #:dots #:note




More information about the Gsharp-cvs mailing list