aboutsummaryrefslogtreecommitdiff
path: root/src/narrative_window.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2016-04-24 00:18:01 +0200
committerThomas White <taw@bitwiz.org.uk>2016-04-24 00:18:01 +0200
commitfff161db9febf4035782f12aab8b3e0f38fd7c79 (patch)
treeab44b1e7a917ef504a726c97c0b98d5989b3d558 /src/narrative_window.c
parent1301823d553447149114f48beed4f13b5e57619a (diff)
Fix narrative stylesheet when there is no presentation stylesheet
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r--src/narrative_window.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c
index 5a352f7..2c79185 100644
--- a/src/narrative_window.c
+++ b/src/narrative_window.c
@@ -481,9 +481,14 @@ NarrativeWindow *narrative_window_new(struct presentation *p, GApplication *app)
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(nw->window), vbox);
- stylesheets[0] = p->stylesheet;
- stylesheets[1] = narrative_stylesheet();
- stylesheets[2] = NULL;
+ if ( p->stylesheet != NULL ) {
+ stylesheets[0] = p->stylesheet;
+ stylesheets[1] = narrative_stylesheet();
+ stylesheets[2] = NULL;
+ } else {
+ stylesheets[0] = narrative_stylesheet();
+ stylesheets[1] = NULL;
+ }
nw->sceditor = sc_editor_new(nw->p->scblocks, stylesheets, p->lang);
cbl = sc_callback_list_new();
sc_callback_list_add_callback(cbl, "sthumb", create_thumbnail,