From 5a1e588c3fbdce549e0b3c487e2671c679890675 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 30 Mar 2019 17:32:24 +0100 Subject: Get rid of Presentation structure It doesn't have any reason to exist. A Narrative defines the top-level object already. This is, after all, a narrative-based presentation system. This removes a lot of faff surrounding retrieving the Narrative from the Presentation. It also removes a gigantic place for bugs to hide in keeping the Presentation's view of the slides in sync with the Narrative's opinion. What was that quote? "Code is terrible, and we want as little of it as possible in our program." --- src/testcard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/testcard.c') diff --git a/src/testcard.c b/src/testcard.c index 2975187..9febf90 100644 --- a/src/testcard.c +++ b/src/testcard.c @@ -33,7 +33,7 @@ #include #define _(x) gettext(x) -#include +#include struct testcard @@ -236,7 +236,7 @@ static gboolean tc_key_press_sig(GtkWidget *da, GdkEventKey *event, } -void show_testcard(Presentation *p) +void show_testcard(Narrative *n) { GdkDisplay *display; int n_monitors; @@ -246,7 +246,7 @@ void show_testcard(Presentation *p) if ( tc == NULL ) return; tc->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - stylesheet_get_slide_default_size(presentation_get_stylesheet(p), + stylesheet_get_slide_default_size(narrative_get_stylesheet(n), &tc->slide_width, &tc->slide_height); tc->drawingarea = gtk_drawing_area_new(); -- cgit v1.2.3