From b2ffed93c6a40243ee7d284d237b6facabee8c4c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 10 Jul 2022 17:01:25 +0200 Subject: Don't send fix/attr/val to state update hook It's not used anywhere, and it doesn't work - there are many other kinds of update apart from setting an individual value. --- guile/starlet/midi-control/faders.scm | 2 +- guile/starlet/state.scm | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'guile') diff --git a/guile/starlet/midi-control/faders.scm b/guile/starlet/midi-control/faders.scm index d43a513..a3dcdee 100644 --- a/guile/starlet/midi-control/faders.scm +++ b/guile/starlet/midi-control/faders.scm @@ -358,7 +358,7 @@ ;; Value changed (add-update-hook! programmer-state - (lambda (fix attr value source) + (lambda (source) (unless (eq? source controller) (update-midi-controls controller (get-selection)))))) diff --git a/guile/starlet/state.scm b/guile/starlet/state.scm index 0047014..560df82 100644 --- a/guile/starlet/state.scm +++ b/guile/starlet/state.scm @@ -71,7 +71,7 @@ #:init-form (make-atomic-box (make-hash-table)) #:getter get-ht-box) (update-hook - #:init-form (make-hook 4) + #:init-form (make-hook 1) #:getter get-update-hook)) @@ -184,11 +184,7 @@ old-ht) (set-in-state! state fix attr)) ;; Try again - (run-hook (get-update-hook state) - fix - attr - value - source))) + (run-hook (get-update-hook state) source))) (define-method (set-in-state! (state ) @@ -371,8 +367,7 @@ pre-existing contents." old-ht) (clear-state! state))) ;; Try again - (run-hook (get-update-hook state) - '() #f #f #f)) + (run-hook (get-update-hook state) #f)) (define (partition3 pred1 pred2 input) -- cgit v1.2.3