diff options
Diffstat (limited to 'libstorycode')
-rw-r--r-- | libstorycode/presentation.c | 14 | ||||
-rw-r--r-- | libstorycode/presentation.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libstorycode/presentation.c b/libstorycode/presentation.c index d862ac0..817a55a 100644 --- a/libstorycode/presentation.c +++ b/libstorycode/presentation.c @@ -50,6 +50,7 @@ struct _presentation int n_slides; Slide **slides; int max_slides; + int saved; const char *language; }; @@ -65,6 +66,7 @@ Presentation *presentation_new() p->n_slides = 0; p->max_slides = 0; p->imagestore = NULL; + p->saved = 1; #ifdef HAVE_PANGO p->language = pango_language_to_string(pango_language_get_default()); #else @@ -102,6 +104,18 @@ int presentation_save(Presentation *p, GFile *file) } +void presentation_set_unsaved(Presentation *p) +{ + p->saved = 0; +} + + +int presentation_get_unsaved(Presentation *p) +{ + return !p->saved; +} + + void presentation_free(Presentation *p) { /* FIXME: Free narrative, slides, imagestore */ diff --git a/libstorycode/presentation.h b/libstorycode/presentation.h index ad01382..444024b 100644 --- a/libstorycode/presentation.h +++ b/libstorycode/presentation.h @@ -39,6 +39,8 @@ extern Presentation *presentation_new(void); extern Presentation *presentation_load(GFile *file); extern int presentation_save(Presentation *p, GFile *file); extern void presentation_free(Presentation *p); +extern void presentation_set_unsaved(Presentation *p); +extern int presentation_get_unsaved(Presentation *p); extern void presentation_add_stylesheet(Presentation *p, Stylesheet *ss); extern void presentation_add_narrative(Presentation *p, Narrative *n); |