From 55ef7ccc4b6b945f7bbcba982f04cc7df27b47ca Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 24 Jun 2010 15:24:16 +0200 Subject: Disable filelist saving from thumbnail mode (buggy and probably not useful) --- ChangeLog | 3 +++ TODO | 4 ++-- man/feh.1 | 2 -- src/keyevents.c | 6 +++++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 41abda2..ca1a182 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ git HEAD * Rename --screen-clip 0 to --no-screen-clip * Allow multiline theme definitions (via backslash, like in the shell) * Center the image after pressing or + * Saving the filelist from thumbnail mode caused undefined behaviour due + to handling of uninitialised memory. Since I consider this a rarely + useful action, the feature has been disabled for thumbnail mode. Thu Jun 10 12:12:04 CEST 2010 diff --git a/TODO b/TODO index b0d1ffc..92ad7e7 100644 --- a/TODO +++ b/TODO @@ -24,8 +24,8 @@ A workaround (--thumb-redraw) exists, but at some point a rewrite with a GUI-toolkit or similar (or maybe writing a completely new tool for that and removing the feature from feh) would be due. -Saving the filelist from thumbnail mode will access uninitialized memory if a -file was removed from the filelist. +Saving the filelist from thumbnail mode is not possible. I wonder if this +matters enough to be fixed. Maybe: Zoom mode like --bg-fill? diff --git a/man/feh.1 b/man/feh.1 index fba25e0..b68e91d 100644 --- a/man/feh.1 +++ b/man/feh.1 @@ -753,8 +753,6 @@ available or use the builtin HTTP client .Sh BUGS Xinerama support does not really work on Xinerama screens != 0. .Pp -Saving the filelist after editing it from thumbnail mode does not work. -.Pp If you find a bug, please report it to .Aq derf@chaosdorf.de . diff --git a/src/keyevents.c b/src/keyevents.c index aa18d02..8937e91 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -336,7 +336,11 @@ void feh_event_handle_keypress(XEvent * ev) slideshow_save_image(winwid); break; case 'f': - feh_save_filelist(); + if ((winwid->type == WIN_TYPE_THUMBNAIL) + || (winwid->type == WIN_TYPE_THUMBNAIL_VIEWER)) + weprintf("Filelist saving is not supported in thumbnail mode\n"); + else + feh_save_filelist(); break; case 'w': winwidget_size_to_image(winwid); -- cgit v1.2.3