summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-13 17:42:16 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-13 17:42:16 +0200
commit2e017bbfbf3e9554bd54b98d11c5532d55b02f6c (patch)
tree46ad0f48dfcc71d01163f4361449f55fa4e60642 /src/options.c
parentaf2a44237a7b5cebbf0d03375ed742809da15a59 (diff)
Use enum for opt.image_bg, rename --image-bg default to --image-bg checks
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/options.c b/src/options.c
index fe0cf87..cf32bb0 100644
--- a/src/options.c
+++ b/src/options.c
@@ -58,7 +58,6 @@ void init_parse_options(int argc, char **argv)
opt.thumb_redraw = 10;
opt.menu_font = estrdup(DEFAULT_MENU_FONT);
opt.font = NULL;
- opt.image_bg = estrdup("default");
opt.menu_bg = estrdup(PREFIX "/share/feh/images/menubg_default.png");
opt.menu_style = estrdup(PREFIX "/share/feh/fonts/menu.style");
@@ -606,8 +605,14 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
weprintf("The --menu-bg option is deprecated and will be removed by 2012");
break;
case 'B':
- free(opt.image_bg);
- opt.image_bg = estrdup(optarg);
+ if (!strcmp(optarg, "checks"))
+ opt.image_bg = IMAGE_BG_CHECKS;
+ else if (!strcmp(optarg, "white"))
+ opt.image_bg = IMAGE_BG_WHITE;
+ else if (!strcmp(optarg, "black"))
+ opt.image_bg = IMAGE_BG_BLACK;
+ else
+ weprintf("Unknown argument to --image-bg: %s", optarg);
break;
case 'D':
opt.slideshow_delay = atof(optarg);