diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-03-27 17:57:31 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-03-27 17:57:31 +0100 |
commit | 47764e46296e8c6921bbc00b95c05ff153699dc2 (patch) | |
tree | b8f0f1b9b13309207a973d94e851103c4abb2877 /libstorycode/presentation.c | |
parent | 86f73eac9bd24cde5be223b9973296d479a8deb7 (diff) |
Show modified status in narrative title bar
Diffstat (limited to 'libstorycode/presentation.c')
-rw-r--r-- | libstorycode/presentation.c | 14 |
1 files changed, 14 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 */ |