aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/slide.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-04-26 21:21:07 +0200
committerThomas White <taw@bitwiz.me.uk>2019-04-26 21:21:07 +0200
commit823d0b3160d95b02b5f2d886dd576f0f5e0293d5 (patch)
treee1274fd0117a6fd276f6bc26a1630dd92e8c06d9 /libstorycode/slide.c
parent40ad4aee216acf59fb0bba82fc1ad5de8c180e5e (diff)
Get rid of "enum style_element"
Diffstat (limited to 'libstorycode/slide.c')
-rw-r--r--libstorycode/slide.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libstorycode/slide.c b/libstorycode/slide.c
index 3bf88a9..0e11785 100644
--- a/libstorycode/slide.c
+++ b/libstorycode/slide.c
@@ -232,29 +232,29 @@ int slide_get_logical_size(Slide *s, Stylesheet *ss, double *w, double *h)
}
-static enum style_element styel_for_slideitem(enum slide_item_type t)
+static const char *style_name_for_slideitem(enum slide_item_type t)
{
switch ( t ) {
case SLIDE_ITEM_TEXT :
- return STYEL_SLIDE_TEXT;
+ return "SLIDE.TEXT";
case SLIDE_ITEM_IMAGE :
- return STYEL_SLIDE_IMAGE;
+ return "SLIDE.IMAGE";
case SLIDE_ITEM_PRESTITLE :
- return STYEL_SLIDE_PRESTITLE;
+ return "SLIDE.PRESTITLE";
case SLIDE_ITEM_SLIDETITLE :
- return STYEL_SLIDE_SLIDETITLE;
+ return "SLIDE.SLIDETITLE";
case SLIDE_ITEM_FOOTER :
- return STYEL_SLIDE_FOOTER;
+ return "SLIDE.FOOTER";
}
fprintf(stderr, "Invalid slide item %i\n", t);
- return STYEL_SLIDE_TEXT;
+ return "SLIDE.TEXT";
}
@@ -279,7 +279,7 @@ void slide_item_get_geom(SlideItem *item, Stylesheet *ss,
{
geom = item->geom;
} else {
- if ( stylesheet_get_geometry(ss, styel_for_slideitem(item->type), &geom) ) {
+ if ( stylesheet_get_geometry(ss, style_name_for_slideitem(item->type), &geom) ) {
*x = 0.0; *y = 0.0;
*w = 0.0; *h = 0.0;
return;
@@ -300,7 +300,7 @@ void slide_item_get_padding(SlideItem *item, Stylesheet *ss,
struct length padding[4];
double frx, fry, frw, frh;
- if ( stylesheet_get_padding(ss, styel_for_slideitem(item->type), padding) ) {
+ if ( stylesheet_get_padding(ss, style_name_for_slideitem(item->type), padding) ) {
*l = 0.0; *r = 0.0; *t = 0.0; *b = 0.0;
return;
}