From 389257e31dc99d8d20c73aacffd8ec026ee59c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 12 Aug 2020 13:25:08 +0200 Subject: Event edit within calendar now works. --- module/vcomponent/base.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'module/vcomponent/base.scm') diff --git a/module/vcomponent/base.scm b/module/vcomponent/base.scm index 3e75e566..7b81fb05 100644 --- a/module/vcomponent/base.scm +++ b/module/vcomponent/base.scm @@ -148,7 +148,7 @@ (hash-map->list cons (get-component-properties component))) (define-public (property-keys component) - (map car (get-component-properties component))) + (hash-map->list (lambda (a _) a) (get-component-properties component))) (define (copy-vline vline) (make-vline (vline-key vline) @@ -169,6 +169,14 @@ (copy-vline value)))) (get-component-properties component))))) +;; updates target with all fields from source. +;; fields in target but not in source left unchanged. +;; parent and children unchanged +(define-public (vcomponent-update! target source) + (for key in (property-keys source) + (set! (prop* target key) + (prop* source key)))) + (define-public (extract field) (lambda (e) (prop e field))) -- cgit v1.2.3