From 269526b1b6aeadb57033ab0e02d20b900d71a690 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 26 Feb 2019 22:41:41 +0100 Subject: Skeleton GtkNarrativeView --- src/narrative_window.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/narrative_window.c b/src/narrative_window.c index f864fa2..45f20c5 100644 --- a/src/narrative_window.c +++ b/src/narrative_window.c @@ -34,6 +34,7 @@ #define _(x) gettext(x) #include +#include #include "colloquium.h" #include "narrative_window.h" @@ -41,7 +42,6 @@ //#include "pr_clock.h" //#include "print.h" //#include "stylesheet_editor.h" -typedef struct _nw GtkNarrativeView; /* FIXME placeholder */ typedef struct _ss SCSlideshow; /* FIXME placeholder */ typedef struct _sw SlideWindow; /* FIXME placeholder */ typedef struct _pc PRClock; /* FIXME placeholder */ @@ -681,11 +681,6 @@ NarrativeWindow *narrative_window_new(Presentation *p, GApplication *papp) GtkWidget *image; Colloquium *app = COLLOQUIUM(papp); -// if ( p->narrative_window != NULL ) { -// fprintf(stderr, "Narrative window is already open!\n"); -// return NULL; -// } - nw = calloc(1, sizeof(NarrativeWindow)); if ( nw == NULL ) return NULL; @@ -694,7 +689,6 @@ NarrativeWindow *narrative_window_new(Presentation *p, GApplication *papp) nw->n_slidewindows = 0; nw->window = gtk_application_window_new(GTK_APPLICATION(app)); -// p->narrative_window = nw; update_titlebar(nw); g_action_map_add_action_entries(G_ACTION_MAP(nw->window), nw_entries, @@ -703,7 +697,9 @@ NarrativeWindow *narrative_window_new(Presentation *p, GApplication *papp) vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_container_add(GTK_CONTAINER(nw->window), vbox); - nw->nv = NULL; //sc_editor_new(nw->dummy_top, p->stylesheet, p->lang, colloquium_get_imagestore(app)); + /* FIXME: Language should be a property of the presentation */ + nw->nv = gtk_narrative_view_new(p, pango_language_get_default(), + colloquium_get_imagestore(app)); toolbar = gtk_toolbar_new(); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); -- cgit v1.2.3