From 013f650a3ddccd1b2f23840bee909236b7a03a35 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 7 Sep 2014 15:42:53 +0200 Subject: Factorise style sheet --- src/presentation.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/presentation.c') diff --git a/src/presentation.c b/src/presentation.c index 919aad2..f490539 100644 --- a/src/presentation.c +++ b/src/presentation.c @@ -38,6 +38,7 @@ #include "notes.h" #include "inhibit_screensaver.h" #include "render.h" +#include "sc_interp.h" static int num_presentations = 0; @@ -295,6 +296,8 @@ struct presentation *new_presentation() new->completely_empty = 1; + new->stylesheet = NULL; + new->n_menu_rebuild = 0; new->menu_rebuild_list = NULL; new->menu_path_list = NULL; @@ -433,6 +436,8 @@ int load_presentation(struct presentation *p, const char *filename) return r; /* Error */ } + find_stylesheet(p); + block = p->scblocks; while ( block != NULL ) { @@ -446,9 +451,9 @@ int load_presentation(struct presentation *p, const char *filename) if ( s != NULL ) { - s->scblocks = block; + s->scblocks = sc_block_child(block); s->top = frame_new(); - s->top->scblocks = s->scblocks; + s->top->scblocks = sc_block_child(block); } -- cgit v1.2.3