diff options
author | Thomas White <taw@physics.org> | 2018-03-18 17:03:57 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-03-18 21:32:59 +0100 |
commit | 61394e51a92e28963d82ded391ccf402a0157b5d (patch) | |
tree | 489ef30600867a40b4601528809db28e580b9c93 /src/print.c | |
parent | 0cf5b0a52dfc1134806c56fdd9940d9e2a564cc8 (diff) |
Remove \callback
Make the callback mechanism into one of general interception of any
Storycode command. This way, the narrative rendering (the only thing
using this functionality) doesn't have to do its horrible stylesheet
thing. That's necessary so that the rendering function gets the actual
SCBlock, not the definition of the macro.
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/print.c b/src/print.c index 18402fc..8275f23 100644 --- a/src/print.c +++ b/src/print.c @@ -186,14 +186,6 @@ static cairo_surface_t *print_render_thumbnail(int w, int h, void *bvp, void *vp } -static SCBlock *print_narrative_stylesheet() -{ - return sc_parse("\\stylesheet{" - "\\ss[slide]{\\callback[sthumb]}" - "}"); -} - - static void begin_narrative_print(GtkPrintOperation *op, GtkPrintContext *ctx, struct print_stuff *ps) { @@ -205,18 +197,16 @@ static void begin_narrative_print(GtkPrintOperation *op, GtkPrintContext *ctx, cbl = sc_callback_list_new(); ps->slide_number = 1; - sc_callback_list_add_callback(cbl, "sthumb", print_create_thumbnail, + sc_callback_list_add_callback(cbl, "slide", print_create_thumbnail, print_render_thumbnail, NULL, ps); ps->is = imagestore_new(ps->storename); if ( ps->p->stylesheet != NULL ) { stylesheets[0] = ps->p->stylesheet; - stylesheets[1] = print_narrative_stylesheet(); - stylesheets[2] = NULL; - } else { - stylesheets[0] = print_narrative_stylesheet(); stylesheets[1] = NULL; + } else { + stylesheets[0] = NULL; } pc = gtk_print_context_create_pango_context(ctx); |