aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/slide.c
diff options
context:
space:
mode:
Diffstat (limited to 'libstorycode/slide.c')
-rw-r--r--libstorycode/slide.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/libstorycode/slide.c b/libstorycode/slide.c
index eaf5f4e..f24e713 100644
--- a/libstorycode/slide.c
+++ b/libstorycode/slide.c
@@ -55,10 +55,16 @@ void slide_free(Slide *s)
static struct slide_item *add_item(Slide *s)
{
struct slide_item *new_items;
+ struct slide_item *item;
+
new_items = realloc(s->items, (s->n_items+1)*sizeof(struct slide_item));
if ( new_items == NULL ) return NULL;
s->items = new_items;
- return &s->items[s->n_items++];
+ item = &s->items[s->n_items++];
+
+ item->layouts = NULL;
+
+ return item;
}
@@ -72,6 +78,7 @@ int slide_add_image(Slide *s, char *filename, struct frame_geom geom)
item->type = SLIDE_ITEM_IMAGE;
item->geom = geom;
item->filename = filename;
+ item->resizable = 1;
return 0;
}
@@ -103,6 +110,12 @@ int add_text_item(Slide *s, char **text, int n_text, struct frame_geom geom,
item->geom = geom;
item->align = alignment;
+ if ( slide_item == SLIDE_ITEM_TEXT ) {
+ item->resizable = 1;
+ } else {
+ item->resizable = 0;
+ }
+
return 0;
}