Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#7729 - adds delete option to menu for jpeg viewer

Attached to Project: Rockbox
Opened by Gerritt Gonzales (GRaTT) - Saturday, 08 September 2007, 05:49 GMT+2
Last edited by Steve Bavin (pondlife) - Wednesday, 10 October 2007, 12:47 GMT+2
Task Type Patches
Category Plugins
Status Unconfirmed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

Delete current file from within the jpeg viewer plugin.
Adds delete to the options in the menu
Also highlights the last file viewed in the file browser on quit.
GRaTT
   jpeg_delete.diff (3.1 KiB)
 jpeg.c |   54 ++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 48 insertions(+), 6 deletions(-)

This task depends upon

Comment by Gerritt Gonzales (GRaTT) - Saturday, 08 September 2007, 17:35 GMT+2
Plugin now exits after delete of last file.
GRaTT
Comment by Gerritt Gonzales (GRaTT) - Saturday, 08 September 2007, 17:36 GMT+2
Here is the patch
   jpeg_delete1.1.diff (154.6 KiB)
 apps/gui/backdrop.c                         |    8 
 apps/gui/gwps-common.c                      |  102 ++++
 apps/gui/gwps.c                             |   17 
 apps/gui/gwps.h                             |   33 +
 apps/gui/icon.c                             |    4 
 apps/gui/wps_parser.c                       |  199 +++++++
 apps/lang/english.lang                      |  140 +++++
 apps/main.c                                 |   26 +
 apps/menus/display_menu.c                   |    8 
 apps/metadata.c                             |  164 ++++++
 apps/metadata.h                             |    2 
 apps/misc.c                                 |   39 +
 apps/misc.h                                 |    5 
 apps/onplay.c                               |   51 +-
 apps/playback.c                             |    4 
 apps/playlist.h                             |    4 
 apps/plugin.c                               |   13 
 apps/plugin.h                               |   20 
 apps/plugins/CATEGORIES                     |   10 
 apps/plugins/SOURCES                        |   13 
 apps/plugins/SUBDIRS                        |    1 
 apps/plugins/calendar.c                     |   78 ++-
 apps/plugins/chessbox/chessbox.c            |   29 +
 apps/plugins/jpeg.c                         |   54 +-
 apps/plugins/lib/bmp.h                      |    1 
 apps/plugins/lib/configfile.c               |   75 ++
 apps/plugins/lib/configfile.h               |   32 +
 apps/plugins/mpegplayer/alloc.c             |    6 
 apps/plugins/mpegplayer/header.c            |    7 
 apps/plugins/mpegplayer/idct.c              |    6 
 apps/plugins/mpegplayer/mpeg_settings.c     |  388 ++++++++++++++-
 apps/plugins/mpegplayer/mpeg_settings.h     |   16 
 apps/plugins/mpegplayer/mpegplayer.c        |  704 +++++++++++++++++++++-------
 apps/plugins/mpegplayer/video_out.h         |    2 
 apps/plugins/mpegplayer/video_out_rockbox.c |  111 ++++
 apps/plugins/pong.c                         |  179 ++++++-
 apps/plugins/properties.c                   |    2 
 apps/plugins/rockpaint.c                    |    4 
 apps/plugins/viewer.c                       |    7 
 apps/plugins/viewers.config                 |   10 
 apps/recorder/bmp.c                         |  491 ++++++++++++-------
 apps/recorder/bmp.h                         |   20 
 apps/settings.h                             |    5 
 apps/settings_list.c                        |   39 +
 apps/tagcache.c                             |    2 
 apps/tagcache.h                             |   10 
 apps/tree.c                                 |    6 
 bootloader/main-pp.c                        |    2 
 firmware/drivers/button.c                   |    5 
 firmware/export/button.h                    |    1 
 firmware/export/id3.h                       |   11 
 tools/buildzip.pl                           |    2 
 tools/genlang                               |   12 
 uisimulator/sdl/button.c                    |    5 
 54 files changed, 2731 insertions(+), 454 deletions(-)

Comment by Nils Wallménius (nls) - Saturday, 08 September 2007, 18:14 GMT+2
That last patch includes lots of unrelated changes
Comment by Gerritt Gonzales (GRaTT) - Saturday, 08 September 2007, 19:35 GMT+2
Sorry about that here is jpeg_delete1.1.diff
only jpeg stuff.
GRaTT
   jpeg_delete1.1.diff (3.1 KiB)
 jpeg.c |   54 ++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 48 insertions(+), 6 deletions(-)

Comment by Nils Wallménius (nls) - Sunday, 09 September 2007, 15:00 GMT+2
I tried the patch and I do not like the two splashes that follow each other when you try to delete a file, I think you should do something like the delete_handler() function in onplay.c maybe just adding that function to the plugin api would be easiest and would also make the ui more consistent.

When deleting a file and try to jump to the next I sometimes got "err opening /G: -1" and sometimes right after deleting "unsupported" splashed for files which are supported and view just fine.

This was all on the simulator for iriver h300.
Comment by Gerritt Gonzales (GRaTT) - Monday, 10 September 2007, 00:21 GMT+2
Fixed the delete menu, no more splashes.
Error handling fixed, does no try to open deleted file.
Tested on target sansa and in sim.
GRaTT
   jpeg_delete1.2.diff (3.7 KiB)
 jpeg.c |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 55 insertions(+), 10 deletions(-)

Comment by Victor (BukTop) - Sunday, 07 October 2007, 17:41 GMT+2
Good one. Works fine. I like the feature.
Comment by Gerritt Gonzales (GRaTT) - Wednesday, 10 October 2007, 07:36 GMT+2
Some small changes to the delete screen
to make it more like the delete_handler
screen.
I could not successfully use delete_handler
function in plugin.c/h. Trouble with static.
GRaTT
   jpeg_delete1.3.diff (4 KiB)
 jpeg.c |   73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 62 insertions(+), 11 deletions(-)

Comment by Corwyn Simpson (siber_cat) - Wednesday, 21 January 2009, 20:13 GMT+2
Any chance someone wants to adapt this patch to the split up jpeg plugin?
Comment by Gerritt Gonzales (GRaTT) - Friday, 20 March 2009, 06:26 GMT+2
Updated for the split up jpeg plugin.
Two patches
jpeg_delete1.4.diff just the delete option,
jpeg-rotate-delete1.0.diff includes fs#9497 the rotate option.
GRaTT
   jpeg_delete1.4.diff (4.2 KiB)
 plugins/jpeg/jpeg.c |   70 +++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 61 insertions(+), 9 deletions(-)

   jpeg-rotate-delete_1.0.diff (31.9 KiB)
 jpeg.c    |  267 ++++++++++++++++++++++++++++++++++-------
 jpeg.h    |    1 
 yuv2rgb.c |  401 ++++++++++++++++++++++++++++++++++++++++++++------------------
 yuv2rgb.h |    4 
 4 files changed, 517 insertions(+), 156 deletions(-)

Comment by Gerritt Gonzales (GRaTT) - Saturday, 20 June 2009, 07:27 GMT+2
updated for June 19 2009 Version: r21362M-090620
menu changes.
GRaTT
   jpeg_delete1.5.diff (4 KiB)
 jpeg.c |   70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 60 insertions(+), 10 deletions(-)

Comment by Gman (Thecoolgman) - Saturday, 20 June 2009, 08:25 GMT+2
Thank you.

Loading...