From 64e9c952f0bbd5c23fd775620f3df1c261799ed6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 11 Aug 2011 20:30:06 +0200 Subject: Show correct file number after deleting image In the image_remove function, slideshow_change_image needs to be called before removing the image from the filelist. Because of this, the "x of y" displayed by --draw-filename is wrong (y is 1 too high). This commit introduces a new 'render' argument to slideshow_chingae_image. The image_remove function calls it with render=0, edits the filelist and then runs by winwidget_render_image itself. Patch by Yu-Jie Lin. --- src/events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/events.c') diff --git a/src/events.c b/src/events.c index 30b6b1a..f76de9f 100644 --- a/src/events.c +++ b/src/events.c @@ -130,12 +130,12 @@ static void feh_event_handle_ButtonPress(XEvent * ev) D(("Prev Button Press event\n")); if ((winwid != NULL) && (winwid->type == WIN_TYPE_SLIDESHOW)) - slideshow_change_image(winwid, SLIDE_PREV); + slideshow_change_image(winwid, SLIDE_PREV, 1); } else if (ev->xbutton.button == opt.next_button) { D(("Next Button Press event\n")); if ((winwid != NULL) && (winwid->type == WIN_TYPE_SLIDESHOW)) - slideshow_change_image(winwid, SLIDE_NEXT); + slideshow_change_image(winwid, SLIDE_NEXT, 1); } else { D(("Received other ButtonPress event\n")); } @@ -191,7 +191,7 @@ static void feh_event_handle_ButtonRelease(XEvent * ev) winwid->mode = MODE_NORMAL; if ((winwid != NULL) && (winwid->type == WIN_TYPE_SLIDESHOW)) { - slideshow_change_image(winwid, SLIDE_NEXT); + slideshow_change_image(winwid, SLIDE_NEXT, 1); } else if ((winwid != NULL) && (winwid->type == WIN_TYPE_THUMBNAIL)) { feh_file *thumbfile; -- cgit v1.2.3