From 8899df700027280ad34c7ee64f2aadfc3ae8e6c8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 14 Mar 2012 20:30:30 +0100 Subject: changelog --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 170e89b..6d21cd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +git HEAD + + * Add R, * and / aliases for , and + * Try to convert unloadable files with imagemagick for up to 6 seconds + * Add --magick-timeout option to set imagemagick conversion timeout or + disable it altogether + * Clean up temporary / to-delete files when receiveng SIG{INT,TERM,QUIT} + Tue, 06 Mar 2012 13:13:35 +0100 Daniel Friesel * Release v2.4 -- cgit v1.2.3 From 489b73d5f479dce3c70bab50b8663bdf1527b2cf Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 15 Mar 2012 17:40:42 +0100 Subject: scroll keys: Sanitise offsets before rendering --- ChangeLog | 1 + src/keyevents.c | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 6d21cd7..4bf4a4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ git HEAD * Add --magick-timeout option to set imagemagick conversion timeout or disable it altogether * Clean up temporary / to-delete files when receiveng SIG{INT,TERM,QUIT} + * Do not scroll past image borders when using key bindings Tue, 06 Mar 2012 13:13:35 +0100 Daniel Friesel diff --git a/src/keyevents.c b/src/keyevents.c index 6327320..343b5d1 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -479,34 +479,42 @@ void feh_event_handle_keypress(XEvent * ev) } else if (feh_is_kp(&keys.scroll_right, keysym, state)) { winwid->im_x -= 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_left, keysym, state)) { winwid->im_x += 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_down, keysym, state)) { winwid->im_y -= 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_up, keysym, state)) { winwid->im_y += 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_right_page, keysym, state)) { winwid->im_x -= winwid->w; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.scroll_left_page, keysym, state)) { winwid->im_x += winwid->w; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.scroll_down_page, keysym, state)) { winwid->im_y -= winwid->h; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.scroll_up_page, keysym, state)) { winwid->im_y += winwid->h; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.jump_back, keysym, state)) { -- cgit v1.2.3 From 29cd868898660c58b1925bf3647c4c63b7bd3151 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 15 Mar 2012 21:16:16 +0100 Subject: --(un|)loadable: indicate results in exit code --- ChangeLog | 1 + man/feh.pre | 2 ++ src/list.c | 7 ++++++- src/main.c | 2 +- test/feh.t | 12 ++++++------ 5 files changed, 16 insertions(+), 8 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 4bf4a4b..9ea7774 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ git HEAD disable it altogether * Clean up temporary / to-delete files when receiveng SIG{INT,TERM,QUIT} * Do not scroll past image borders when using key bindings + * --loadable / --unloadable: indicate result in exit status Tue, 06 Mar 2012 13:13:35 +0100 Daniel Friesel diff --git a/man/feh.pre b/man/feh.pre index 48d7778..ecd35ec 100644 --- a/man/feh.pre +++ b/man/feh.pre @@ -383,6 +383,7 @@ size/resolution/type etc. . Don't display images. Just print out their names if imlib2 can successfully load them. +Returns false if at least one image failed to load. . .It Cm -M , --menu-font Ar font . @@ -550,6 +551,7 @@ mode. See . Don't display images. Just print out their names if imlib2 can NOT successfully load them. +Returns false if at least one image was loadable. . .It Cm -V , --verbose . diff --git a/src/list.c b/src/list.c index 17fcbcc..2affe85 100644 --- a/src/list.c +++ b/src/list.c @@ -77,6 +77,7 @@ void real_loadables_mode(int loadable) { feh_file *file; gib_list *l; + char ret = 0; opt.quiet = 1; @@ -91,6 +92,8 @@ void real_loadables_mode(int loadable) puts(file->filename); feh_action_run(file, opt.actions[0]); } + else + ret = 1; gib_imlib_free_image_and_decache(im); } else { /* Oh dear. */ @@ -98,7 +101,9 @@ void real_loadables_mode(int loadable) puts(file->filename); feh_action_run(file, opt.actions[0]); } + else + ret = 1; } } - exit(0); + exit(ret); } diff --git a/src/main.c b/src/main.c index a5694fb..e6239e1 100644 --- a/src/main.c +++ b/src/main.c @@ -44,12 +44,12 @@ int main(int argc, char **argv) init_parse_options(argc, argv); init_imlib_fonts(); + setup_signal_handlers(); if (opt.display) { init_x_and_imlib(); init_keyevents(); init_buttonbindings(); - setup_signal_handlers(); } feh_event_init(); diff --git a/test/feh.t b/test/feh.t index 1c6556c..8746362 100644 --- a/test/feh.t +++ b/test/feh.t @@ -45,7 +45,7 @@ $cmd->stderr_is_eq(''); $cmd = Test::Command->new(cmd => "$feh --loadable $images"); -$cmd->exit_is_num(0); +$cmd->exit_is_num(1); $cmd->stdout_like($re_loadable); $cmd->stderr_is_eq(''); @@ -53,7 +53,7 @@ $cmd = Test::Command->new( cmd => "$feh --loadable --action 'echo touch %f' $images" ); -$cmd->exit_is_num(0); +$cmd->exit_is_num(1); $cmd->stdout_is_file('test/nx_action/loadable_action'); $cmd->stderr_is_eq(''); @@ -61,7 +61,7 @@ $cmd = Test::Command->new( cmd => "$feh --loadable --action ';echo touch %f' $images" ); -$cmd->exit_is_num(0); +$cmd->exit_is_num(1); $cmd->stdout_is_file('test/nx_action/loadable_naction'); $cmd->stderr_is_eq(''); @@ -69,7 +69,7 @@ $cmd = Test::Command->new( cmd => "$feh --unloadable --action 'echo rm %f' $images" ); -$cmd->exit_is_num(0); +$cmd->exit_is_num(1); $cmd->stdout_is_file('test/nx_action/unloadable_action'); $cmd->stderr_is_eq(''); @@ -77,13 +77,13 @@ $cmd = Test::Command->new( cmd => "$feh --unloadable --action ';echo rm %f' $images" ); -$cmd->exit_is_num(0); +$cmd->exit_is_num(1); $cmd->stdout_is_file('test/nx_action/unloadable_naction'); $cmd->stderr_is_eq(''); $cmd = Test::Command->new(cmd => "$feh --unloadable $images"); -$cmd->exit_is_num(0); +$cmd->exit_is_num(1); $cmd->stdout_like($re_unloadable); $cmd->stderr_is_eq(''); -- cgit v1.2.3