diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-12-11 10:16:23 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-12-11 10:16:23 +0100 |
commit | fdac2c8fc30153b103212e92c78885edc1134fb7 (patch) | |
tree | a9a9dff708c939686c1a2c4bc83df13dfa6043c6 /src/narrative_window.c | |
parent | 7e210f51ff3eac1392247d523904b885081e5a59 (diff) |
WIP on Narrative stylesheet
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r-- | src/narrative_window.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c index 5976ada..df52390 100644 --- a/src/narrative_window.c +++ b/src/narrative_window.c @@ -188,6 +188,12 @@ static void update_toolbar(NarrativeWindow *nw) } +static SCBlock *narrative_stylesheet() +{ + return sc_parse("\\ss[slide]{\nSLIDE\n}"); +} + + NarrativeWindow *narrative_window_new(struct presentation *p, GApplication *app) { NarrativeWindow *nw; @@ -195,6 +201,7 @@ NarrativeWindow *narrative_window_new(struct presentation *p, GApplication *app) GtkWidget *scroll; GtkWidget *toolbar; GtkToolItem *button; + SCBlock *stylesheets[3]; if ( p->narrative_window != NULL ) { fprintf(stderr, "Narrative window is already open!\n"); @@ -218,7 +225,10 @@ 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); - nw->sceditor = sc_editor_new(nw->p->scblocks, p->stylesheet); + stylesheets[0] = p->stylesheet; + stylesheets[1] = narrative_stylesheet(); + stylesheets[2] = NULL; + nw->sceditor = sc_editor_new(nw->p->scblocks, stylesheets); toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); |