diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-01-26 19:28:10 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-01-26 19:28:10 +0100 |
commit | 05f20c748e731f0ca79e6c3646c399940fe06578 (patch) | |
tree | 49d853b9aec891816c42fb24484822ab134a86b0 | |
parent | 0d4a5ee84a933e6652912dfd4228fc6f30c7ad5f (diff) |
Revert "Add --zoom fill as equivalent to --auto-zoom"
This reverts commit da92889e88a89e48cbcce134b6afa7c504e7569e.
-rw-r--r-- | src/menu.c | 7 | ||||
-rw-r--r-- | src/options.c | 9 | ||||
-rw-r--r-- | src/options.h | 5 | ||||
-rw-r--r-- | src/winwidget.c | 2 |
4 files changed, 6 insertions, 17 deletions
@@ -1436,10 +1436,7 @@ void feh_menu_cb(feh_menu * m, feh_menu_item * i, int action, void *data) break; case CB_OPT_AUTO_ZOOM: MENU_ITEM_TOGGLE(i); - if (MENU_ITEM_IS_ON(i)) - opt.zoom_mode = ZOOM_MODE_FILL; - else - opt.zoom_mode = 0; + opt.auto_zoom = MENU_ITEM_IS_ON(i) ? 1 : 0; winwidget_rerender_all(1, 1); break; } @@ -1491,7 +1488,7 @@ static feh_menu *feh_menu_func_gen_options(feh_menu * m) mm = feh_menu_new(); mm->name = estrdup("OPTIONS"); mm->fehwin = m->fehwin; - feh_menu_add_toggle_entry(mm, "Auto-Zoom", NULL, NULL, CB_OPT_AUTO_ZOOM, NULL, NULL, (opt.zoom_mode == ZOOM_MODE_FILL)); + feh_menu_add_toggle_entry(mm, "Auto-Zoom", NULL, NULL, CB_OPT_AUTO_ZOOM, NULL, NULL, opt.auto_zoom); feh_menu_add_toggle_entry(mm, "Freeze Window Size", NULL, NULL, CB_OPT_FREEZE_WINDOW, NULL, NULL, opt.geom_flags); feh_menu_add_toggle_entry(mm, "Fullscreen", NULL, NULL, diff --git a/src/options.c b/src/options.c index 6427597..586f626 100644 --- a/src/options.c +++ b/src/options.c @@ -524,7 +524,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.auto_zoom = 1; break; case 'U': opt.loadables = 1; @@ -694,12 +694,7 @@ static void feh_parse_option_array(int argc, char **argv) opt.menu_style = estrdup(optarg); break; case 205: - if (!strcmp("fill", optarg)) - opt.zoom_mode = ZOOM_MODE_FILL; - else if (!strcmp("max", optarg)) - opt.zoom_mode = ZOOM_MODE_MAX; - else - opt.default_zoom = atoi(optarg); + opt.default_zoom = atoi(optarg); break; case 206: opt.screen_clip = 0; diff --git a/src/options.h b/src/options.h index 283cf10..966169a 100644 --- a/src/options.h +++ b/src/options.h @@ -27,9 +27,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef OPTIONS_H #define OPTIONS_H -#define ZOOM_MODE_FILL 1 -#define ZOOM_MODE_MAX 2 - struct __fehoptions { unsigned char multiwindow; unsigned char montage; @@ -54,6 +51,7 @@ struct __fehoptions { unsigned char randomize; unsigned char jump_on_resort; unsigned char full_screen; + unsigned char auto_zoom; unsigned char draw_filename; unsigned char list; unsigned char quiet; @@ -122,7 +120,6 @@ struct __fehoptions { unsigned int geom_w; unsigned int geom_h; int default_zoom; - int zoom_mode; unsigned char adjust_reload; unsigned char mode; diff --git a/src/winwidget.c b/src/winwidget.c index 8192700..81f9ab6 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -426,7 +426,7 @@ void winwidget_render_image(winwidget winwid, int resize, int alias) smaller = ((winwid->im_w < max_w) && (winwid->im_h < max_h)); - if (!smaller || (opt.zoom_mode == ZOOM_MODE_FILL)) { + if (!smaller || opt.auto_zoom) { double ratio = 0.0; /* Image is larger than the screen (so wants shrinking), or it's |