diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-12-26 18:59:59 +0000 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-12-26 18:59:59 +0000 |
commit | 53bd923c2aed887c7e2b3af6ccaca08455da3351 (patch) | |
tree | 4f7dd1e4e46e21bcdf8d15e6f7ce695bbf6b0079 /src | |
parent | 70ac64f01776bb8eeae49a12de9f6b11bc9ef69e (diff) |
Grab notes before saving
Diffstat (limited to 'src')
-rw-r--r-- | src/loadsave.c | 2 | ||||
-rw-r--r-- | src/notes.c | 6 | ||||
-rw-r--r-- | src/notes.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/loadsave.c b/src/loadsave.c index a4c2891..0ce38d8 100644 --- a/src/loadsave.c +++ b/src/loadsave.c @@ -759,6 +759,8 @@ int save_presentation(struct presentation *p, const char *filename) struct serializer ser; char *old_fn; + grab_current_notes(p); + fh = fopen(filename, "w"); if ( fh == NULL ) return 1; diff --git a/src/notes.c b/src/notes.c index 90e3987..b213a1f 100644 --- a/src/notes.c +++ b/src/notes.c @@ -75,6 +75,12 @@ static void grab_notes(struct notes *n, struct slide *s) } +void grab_current_notes(struct presentation *p) +{ + grab_notes(p->notes, p->cur_notes_slide); +} + + void notify_notes_slide_changed(struct presentation *p, struct slide *np) { grab_notes(p->notes, p->cur_notes_slide); diff --git a/src/notes.h b/src/notes.h index f6fba5c..82d1355 100644 --- a/src/notes.h +++ b/src/notes.h @@ -37,4 +37,5 @@ extern void notify_notes_slide_changed(struct presentation *p, extern void write_notes(struct slide *s, struct serializer *ser); extern void load_notes(struct ds_node *node, struct slide *s); +extern void grab_current_notes(struct presentation *p); #endif /* NOTES_H */ |