aboutsummaryrefslogtreecommitdiff
path: root/module/vcalendar.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-24 23:24:15 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-24 23:46:48 +0100
commitee1abd5ada9b670791f7dd2d306bdbf9228fa439 (patch)
tree67c530a4918506b3c0389ec403c3abbf0a606868 /module/vcalendar.scm
parentSet up better test for recurring events. (diff)
downloadcalp-ee1abd5ada9b670791f7dd2d306bdbf9228fa439.tar.gz
calp-ee1abd5ada9b670791f7dd2d306bdbf9228fa439.tar.xz
Add VIRTUAL vcomponents.
VIRTUAL vcomponents are vcomponents created without a source. Their primiary purpose is for creating brand new events, which will later be dumped to the proper files. They can however also be used in testing for great effect.
Diffstat (limited to 'module/vcalendar.scm')
-rw-r--r--module/vcalendar.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/vcalendar.scm b/module/vcalendar.scm
index 3f7ba6ba..c978f3fc 100644
--- a/module/vcalendar.scm
+++ b/module/vcalendar.scm
@@ -42,7 +42,10 @@
;; (set! (attr ev "KEY") 10)
(define-public attr (make-procedure-with-setter get-attr set-attr!))
-(define-public type %vcomponent-type)
+;; (define-public type %vcomponent-get-type)
+(define-public type (make-procedure-with-setter
+ %vcomponent-get-type
+ %vcomponent-set-type!))
(define-public parent %vcomponent-parent)
(define-public push-child! %vcomponent-push-child!)
(define-public (attributes component) (map string->symbol (%vcomponent-attribute-list component)))
@@ -71,7 +74,7 @@
(let* ((root (%vcomponent-make path))
(component
(parse-dates!
- (case (string->symbol (or (attr root "TYPE") "no-type"))
+ (case (string->symbol (or (attr root "X-HNH-SOURCETYPE") "no-type"))
;; == Single ICS file ==
;; Remove the abstract ROOT component,
;; returning the wanted VCALENDAR component