aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/gtk/gtknarrativeview.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-03-04 23:46:47 +0100
committerThomas White <taw@bitwiz.me.uk>2019-03-04 23:46:47 +0100
commit915fcacee4c49f017ab2599b4307198ca3f713d3 (patch)
treeed4c7a8f8aec7327934f86d9f3100f982ee1d624 /libstorycode/gtk/gtknarrativeview.c
parent373d5183849c2855345ea45c964479086d67a7d2 (diff)
Thumbnail slide rendering in narrative
Diffstat (limited to 'libstorycode/gtk/gtknarrativeview.c')
-rw-r--r--libstorycode/gtk/gtknarrativeview.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libstorycode/gtk/gtknarrativeview.c b/libstorycode/gtk/gtknarrativeview.c
index 5d89ae5..90915ab 100644
--- a/libstorycode/gtk/gtknarrativeview.c
+++ b/libstorycode/gtk/gtknarrativeview.c
@@ -126,6 +126,8 @@ static gboolean resize_sig(GtkWidget *widget, GdkEventConfigure *event,
GtkNarrativeView *e)
{
PangoContext *pc;
+ PangoLanguage *lang;
+ const char *langname;
pc = gdk_pango_context_get();
@@ -133,10 +135,14 @@ static gboolean resize_sig(GtkWidget *widget, GdkEventConfigure *event,
e->visible_width = event->width;
e->w = e->visible_width;
+ langname = presentation_get_language(e->p);
+ lang = pango_language_from_string(langname);
+
/* Wrap everything with the current width, to get the total height */
narrative_wrap(presentation_get_narrative(e->p),
presentation_get_stylesheet(e->p),
- pango_language_get_default(), pc, e->w);
+ lang, gtk_widget_get_pango_context(widget), e->w,
+ presentation_get_imagestore(e->p));
e->w = e->visible_width;
e->h = narrative_get_height(presentation_get_narrative(e->p));
@@ -1012,8 +1018,7 @@ static void update_size_request(GtkNarrativeView *e)
}
-GtkNarrativeView *gtk_narrative_view_new(Presentation *p, PangoLanguage *lang,
- const char *storename)
+GtkNarrativeView *gtk_narrative_view_new(Presentation *p)
{
GtkNarrativeView *nview;
GtkTargetEntry targets[1];
@@ -1023,7 +1028,6 @@ GtkNarrativeView *gtk_narrative_view_new(Presentation *p, PangoLanguage *lang,
nview->w = 100;
nview->h = 100;
nview->scroll_pos = 0;
- nview->lang = lang;
nview->p = p;
nview->para_highlight = 0;