diff options
Diffstat (limited to 'libstorycode/gtk')
-rw-r--r-- | libstorycode/gtk/gtkslideview.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libstorycode/gtk/gtkslideview.c b/libstorycode/gtk/gtkslideview.c index 339723f..6cf0ec5 100644 --- a/libstorycode/gtk/gtkslideview.c +++ b/libstorycode/gtk/gtkslideview.c @@ -827,19 +827,23 @@ static SlideItem *create_image(GtkSlideView *e, const char *filename, double cx, double cy, double w, double h) { struct frame_geom geom; + SlideItem *item; char *fn = strdup(filename); if ( fn == NULL ) return NULL; geom.x.len = cx; geom.x.unit = LENGTH_UNIT; geom.y.len = cy; geom.y.unit = LENGTH_UNIT; geom.w.len = w; geom.w.unit = LENGTH_UNIT; geom.h.len = h; geom.h.unit = LENGTH_UNIT; - return slide_add_image(e->slide, fn, geom); + item = slide_item_image(fn, geom); + slide_add_item(e->slide, item); + return item; } static SlideItem *create_frame(GtkSlideView *e, double cx, double cy, double w, double h) { + SlideItem *item; struct frame_geom geom; struct text_run *runs; int nruns = 1; @@ -865,7 +869,9 @@ static SlideItem *create_frame(GtkSlideView *e, double cx, double cy, geom.y.len = cy; geom.y.unit = LENGTH_UNIT; geom.w.len = w; geom.w.unit = LENGTH_UNIT; geom.h.len = h; geom.h.unit = LENGTH_UNIT; - return slide_add_text(e->slide, &runs, &nruns, 1, geom, ALIGN_INHERIT); + item = slide_item_text(&runs, &nruns, 1, geom, ALIGN_INHERIT); + slide_add_item(e->slide, item); + return item; } |