aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-08-12 13:25:08 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-08-12 13:25:38 +0200
commit389257e31dc99d8d20c73aacffd8ec026ee59c93 (patch)
tree581883679cf0a4b386d309dcf4ebdb169623445f /module/vcomponent
parentMove run-server to (server server). (diff)
downloadcalp-389257e31dc99d8d20c73aacffd8ec026ee59c93.tar.gz
calp-389257e31dc99d8d20c73aacffd8ec026ee59c93.tar.xz
Event edit within calendar now works.
Diffstat (limited to 'module/vcomponent')
-rw-r--r--module/vcomponent/base.scm10
1 files changed, 9 insertions, 1 deletions
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)))