summaryrefslogtreecommitdiff
path: root/src/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/menu.c b/src/menu.c
index c50f015..f12f4ed 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1,6 +1,7 @@
/* menu.c
Copyright (C) 1999-2003 Tom Gilbert.
+Copyright (C) 2010-2011 Daniel Friesel.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
@@ -1267,7 +1268,7 @@ void feh_menu_cb_opt_fullscreen(feh_menu * m, feh_menu_item * i)
winwidget_destroy_xwin(m->fehwin);
winwidget_create_window(m->fehwin, m->fehwin->im_w, m->fehwin->im_h);
- winwidget_render_image(m->fehwin, 1, 1);
+ winwidget_render_image(m->fehwin, 1, 0);
winwidget_show(m->fehwin);
#ifdef HAVE_LIBXINERAMA
@@ -1342,7 +1343,7 @@ void feh_menu_cb(feh_menu * m, feh_menu_item * i, int action, void *data)
winwidget_resize(m->fehwin, m->fehwin->im_w, m->fehwin->im_h);
}
winwidget_reset_image(m->fehwin);
- winwidget_render_image(m->fehwin, 1, 1);
+ winwidget_render_image(m->fehwin, 1, 0);
break;
case CB_RELOAD:
feh_reload_image(m->fehwin, 0, 0);
@@ -1403,7 +1404,7 @@ void feh_menu_cb(feh_menu * m, feh_menu_item * i, int action, void *data)
opt.draw_filename = TRUE;
else
opt.draw_filename = FALSE;
- winwidget_rerender_all(0, 1);
+ winwidget_rerender_all(0);
break;
case CB_OPT_DRAW_ACTIONS:
MENU_ITEM_TOGGLE(i);
@@ -1411,7 +1412,7 @@ void feh_menu_cb(feh_menu * m, feh_menu_item * i, int action, void *data)
opt.draw_actions = TRUE;
else
opt.draw_actions = FALSE;
- winwidget_rerender_all(0, 1);
+ winwidget_rerender_all(0);
break;
case CB_OPT_KEEP_HTTP:
MENU_ITEM_TOGGLE(i);
@@ -1435,8 +1436,11 @@ 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);
- opt.auto_zoom = MENU_ITEM_IS_ON(i) ? 1 : 0;
- winwidget_rerender_all(1, 1);
+ if (MENU_ITEM_IS_ON(i))
+ opt.zoom_mode = ZOOM_MODE_FILL;
+ else
+ opt.zoom_mode = 0;
+ winwidget_rerender_all(1);
break;
}
return;
@@ -1487,7 +1491,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.auto_zoom);
+ 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, "Freeze Window Size", NULL, NULL,
CB_OPT_FREEZE_WINDOW, NULL, NULL, opt.geom_flags);
feh_menu_add_toggle_entry(mm, "Fullscreen", NULL, NULL,