Skip to content

Commit

Permalink
Sequencer: Rename document type identifier symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
j-bresson committed Sep 25, 2020
1 parent b4b9a2b commit 3805ea4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/deliver.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
(("New Patch"
:callback #'(lambda () (om::open-new-document :patch)) :callback-type :none :accelerator "accelerator-n")
("New Maquette"
:callback #'(lambda () (om::open-new-document :maquette)) :callback-type :none)
:callback #'(lambda () (om::open-new-document :sequencer)) :callback-type :none)
("New Lisp function"
:callback #'(lambda () (om::open-new-document :lispfun)) :callback-type :none)
))
Expand Down
2 changes: 1 addition & 1 deletion help-patches/MIDI/midi-controllers.opat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
(:box
(:type :abstraction)
(:reference
(:maquette
(:sequencer
(:name "mymaquette")
(:doc "")
(:info (:created nil) (:modified nil) (:by nil) (:version nil))
Expand Down
2 changes: 1 addition & 1 deletion help-patches/MIDI/midi-events.opat
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
(:box
(:type :abstraction)
(:reference
(:maquette
(:sequencer
(:name "maquette")
(:doc "")
(:info (:created nil) (:modified nil) (:by nil) (:version nil))
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/windows/windows.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
(list (om-make-menu-comp
(list
(om-make-menu-item "New Patch" #'(lambda () (open-new-document :patch)) :key "n")
(om-make-menu-item "New Maquette" #'(lambda () (open-new-document :maquette)))
(om-make-menu-item "New Maquette" #'(lambda () (open-new-document :sequencer)))
(om-make-menu-item "New Lisp function" #'(lambda () (open-new-document :lispfun)))))
(om-make-menu-item "New Text/Lisp Buffer" #'(lambda () (om-lisp::om-open-text-editor :lisp t)) :key "N")
))
Expand Down
4 changes: 2 additions & 2 deletions src/packages/sequencer/maquette-compatibility.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

;;; only top-level patch acually load their contents:
(omng-load
`(:maquette
`(:sequencer
(:name ,name-loaded)
(:boxes .,(remove 'temp-marker
(loop for box-code in boxes-loaded collect (eval box-code))
Expand All @@ -47,7 +47,7 @@
;;; load the Maquette (internal)
(defun om-load-maq-abs1 (name boxes connections range markers &rest ignore)
(declare (ignore range markers ignore))
`(:maquette
`(:sequencer
(:name ,name)
(:boxes .,(loop for box-code in boxes collect (eval box-code)))
(:connections .,(loop for c in connections collect (format-imported-connection c)))
Expand Down
12 changes: 6 additions & 6 deletions src/packages/sequencer/sequencer-object.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
(:default-initargs :icon :maq-file)
(:metaclass omstandardclass))

(add-om-doctype :maquette "omaq" "Maquette")
(add-om-doctype :sequencer "omaq" "Maquette")

(defclass OMMaquetteInternal (OMMaquette) ()
(:default-initargs :icon :maq)
Expand All @@ -48,9 +48,9 @@
;;;===========================

(defmethod get-object-type-name ((self OMMaquette)) "Maquette")
(defmethod object-doctype ((self OMMaquette)) :maquette)
(defmethod object-doctype ((self OMMaquette)) :sequencer)

(defmethod make-new-om-doc ((type (eql :maquette)) name)
(defmethod make-new-om-doc ((type (eql :sequencer)) name)
(make-instance 'OMMaquetteFile :name name))


Expand All @@ -60,7 +60,7 @@
(defmethod externalized-icon ((self OMMaquette)) :maq-file)


(defmethod type-check ((type (eql :maquette)) obj)
(defmethod type-check ((type (eql :sequencer)) obj)
(let ((maq (ensure-type obj 'OMMaquette)))
(when maq
(change-class maq 'OMMaquetteFile)
Expand Down Expand Up @@ -472,7 +472,7 @@
(setf (looper maquette) loop-on)
maquette))

(defmethod om-load-from-id ((id (eql :maquette)) data)
(defmethod om-load-from-id ((id (eql :sequencer)) data)
(let ((maq (make-instance 'OMMaquetteInternal :name (find-value-in-kv-list data :name))))
(load-patch-contents maq data)
maq))
Expand All @@ -496,7 +496,7 @@

(if checked-path

(load-doc-from-file checked-path :maquette)
(load-doc-from-file checked-path :sequencer)

;;; no pathname-directory can occur while loading old patch abstractions from OM6
;;; in this case we look for a not-yet-save file with same name in registered documents
Expand Down

0 comments on commit 3805ea4

Please sign in to comment.