diff options
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/options.c b/src/options.c index 3ba0512..de72429 100644 --- a/src/options.c +++ b/src/options.c @@ -30,8 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static void check_options(void); static void feh_getopt_theme(int argc, char **argv); -static void feh_parse_option_array(int argc, char **argv); -static void feh_parse_environment_options(void); +static void feh_parse_option_array(int argc, char **argv, int finalrun); static void feh_check_theme_options(int arg, char **argv); static void feh_parse_options_from_string(char *opts); static void feh_load_options_for_theme(char *theme); @@ -95,7 +94,7 @@ void init_parse_options(int argc, char **argv) D(("About to parse commandline options\n")); /* Parse the cmdline args */ - feh_parse_option_array(argc, argv); + feh_parse_option_array(argc, argv, 1); /* If we have a filelist to read, do it now */ if (opt.filelistfile) { @@ -167,8 +166,10 @@ static void feh_load_options_for_theme(char *theme) free(rcpath); if (!fp && ((fp = fopen(oldrcpath, "r")) != NULL)) - weprintf("the config is now read from .config/feh/themes, " - "please update your path!"); + weprintf("The theme config file was moved from ~/.fehrc to " + "~/.config/feh/themes. Run\n" + " mkdir -p ~/.config/feh; mv ~/.fehrc ~/.config/feh/themes\n" + "to fix this."); free(oldrcpath); @@ -257,7 +258,7 @@ static void feh_parse_options_from_string(char *opts) last = *t; } - feh_parse_option_array(num, list); + feh_parse_option_array(num, list, 0); for (i = 0; i < num; i++) if (list[i]) @@ -319,7 +320,7 @@ static void feh_getopt_theme(int argc, char **argv) optind = 0; } -static void feh_parse_option_array(int argc, char **argv) +static void feh_parse_option_array(int argc, char **argv, int finalrun) { static char stropts[] = "a:A:b:B:cC:dD:e:E:f:Fg:GhH:iIj:J:kK:lL:mM:nNo:O:pPqrR:sS:tT:uUvVwW:xXy:YzZ" @@ -422,6 +423,7 @@ static void feh_parse_option_array(int argc, char **argv) {"index-dim" , 1, 0, 232}, {"thumb-redraw" , 1, 0, 'J'}, {"info" , 1, 0, 234}, + {"force-aliasing", 0, 0, 235}, {0, 0, 0, 0} }; @@ -518,7 +520,7 @@ static void feh_parse_option_array(int argc, char **argv) opt.full_screen = 1; break; case 'Z': - opt.zoom_mode = ZOOM_MODE_FILL; + opt.zoom_mode = ZOOM_MODE_MAX; break; case 'U': opt.loadables = 1; @@ -605,6 +607,7 @@ static void feh_parse_option_array(int argc, char **argv) case ')': free(opt.menu_bg); opt.menu_bg = estrdup(optarg); + weprintf("The --menu-bg option is deprecated and will be removed by 2012"); break; case 'B': free(opt.image_bg); @@ -686,7 +689,7 @@ static void feh_parse_option_array(int argc, char **argv) case 204: free(opt.menu_style); opt.menu_style = estrdup(optarg); - weprintf("--menu-style is deprecated and will be removed soon"); + weprintf("The --menu-style option is deprecated and will be removed by 2012"); break; case 205: if (!strcmp("fill", optarg)) @@ -771,6 +774,9 @@ static void feh_parse_option_array(int argc, char **argv) case 234: opt.info_cmd = estrdup(optarg); break; + case 235: + opt.force_aliasing = 1; + break; default: break; } @@ -784,6 +790,8 @@ static void feh_parse_option_array(int argc, char **argv) add_file_to_filelist_recursively(argv[optind++], FILELIST_FIRST); } } + else if (finalrun && !opt.filelistfile && !opt.bgmode) + add_file_to_filelist_recursively(".", FILELIST_FIRST); /* So that we can safely be called again */ optind = 1; |