Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#10094 - Replace oldmenuapi menu/customed menu in plugins by standard menu

Attached to Project: Rockbox
Opened by Teruaki Kawashima (teru) - Saturday, 04 April 2009, 09:14 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Friday, 03 July 2009, 06:44 GMT+2
Task Type Patches
Category Plugins
Status Closed
Assigned To Jonathan Gordon (jdgordon)
Player Type All players
Severity Low
Priority Normal
Reported Version Version 3.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

this patch replaces menu of the following plugins by standard menu.

plugins using oldmenuapi:
doom
pacbox
reversi
solitaire
sudoku
random_folder_advance_config
fireworks
jpeg
mpegplayer
rockboy
viewer
zxbox
test_sampr
test_disk

plugins using its own menu:
jewels
chessclock

plugins whose menu is NOT replaced:
rockpaint
- this plugin has file browser and it needs some work to turn to standard menu.
   plugins_standard_menu.patch (76 KiB)
 apps/plugins/jpeg/jpeg.c                    |   45 --
 apps/plugins/random_folder_advance_config.c |   47 ---
 apps/plugins/sudoku/sudoku.c                |   42 --
 apps/plugins/zxbox/spmain.c                 |   89 +----
 apps/plugins/fireworks.c                    |   25 -
 apps/plugins/test_sampr.c                   |   22 -
 apps/plugins/rockboy/menu.c                 |   99 ++----
 apps/plugins/test_disk.c                    |   29 +
 apps/plugins/reversi/reversi-gui.c          |   23 -
 apps/plugins/viewer.c                       |   63 +---
 apps/plugins/pacbox/pacbox.c                |   22 -
 apps/plugins/doom/rockdoom.c                |  145 ++++-----
 apps/plugins/solitaire.c                    |   36 --
 apps/plugins/mpegplayer/mpegplayer.c        |    2 
 apps/plugins/mpegplayer/mpeg_settings.c     |  137 ++-------
 apps/plugins/mpegplayer/mpeg_settings.h     |    2 
 apps/plugins/jewels.c                       |  423 +++++++---------------------
 apps/plugins/chessclock.c                   |  171 +++--------
 18 files changed, 463 insertions(+), 959 deletions(-)

This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Friday, 03 July 2009, 06:44 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  this has been open for long enough... if any bugs come up new tasks can be opened
Comment by Teruaki Kawashima (teru) - Wednesday, 20 May 2009, 16:27 GMT+2
updated patch.
removed unrelated changes and fixed wrong changes.
   plugins_standard_menu.2.patch (74.8 KiB)
 apps/plugins/jpeg/jpeg.c                    |   45 --
 apps/plugins/random_folder_advance_config.c |   47 ---
 apps/plugins/test_disk.c                    |   29 +
 apps/plugins/reversi/reversi-gui.c          |   23 -
 apps/plugins/jewels.c                       |  431 ++++++++--------------------
 apps/plugins/pacbox/pacbox.c                |   22 -
 apps/plugins/zxbox/spmain.c                 |   95 +-----
 apps/plugins/sudoku/sudoku.c                |   42 --
 apps/plugins/fireworks.c                    |   25 -
 apps/plugins/test_sampr.c                   |   22 -
 apps/plugins/mpegplayer/mpegplayer.c        |    2 
 apps/plugins/mpegplayer/mpeg_settings.c     |  137 ++------
 apps/plugins/mpegplayer/mpeg_settings.h     |    2 
 apps/plugins/solitaire.c                    |   36 --
 apps/plugins/doom/rockdoom.c                |  142 +++------
 apps/plugins/rockboy/menu.c                 |  103 +++---
 apps/plugins/viewer.c                       |   61 +--
 apps/plugins/chessclock.c                   |  143 +++------
 18 files changed, 474 insertions(+), 933 deletions(-)

Comment by Teruaki Kawashima (teru) - Saturday, 23 May 2009, 15:10 GMT+2
attempt to replace rockpaint's menu by standard menu.
i'm not sure if i'm doing things correctly for browser, but it seems to work.
not done for font selection.
   rockpaint.diff (24.7 KiB)
 apps/plugins/rockpaint.c |  542 ++++++++++++++++++++---------------------------
 1 file changed, 233 insertions(+), 309 deletions(-)

Comment by Teruaki Kawashima (teru) - Wednesday, 03 June 2009, 14:59 GMT+2
update patches and divide to some parts.

*standard_menu_for_plugins.3.patch
this patch replaces oldmenuapi by standard menu simply and won't have any issue.

*standard_menu_for_plugins_with_tweak.3.patch
this patch replaces oldmenuapi by standard menu with smoll change.
-jpeg,viewer
move "Quit" from top to button item of menu just like other plugins.
-rockboy
use simplelist_info for loading/saving game.
-solitaire
use differt menu wheter being in game.
make "Draw Three Cards"/"Draw One Card" to option "Draw Cards Option".

*standard_menu_for_doom.3.patch
this patch replaces oldmenuapi by standard menu for doom.
this contains large change for creating item and selecting item for "Addons","Demos" witch may contain problem.

*standard_menu_for_mpegplayer.3.patch
i'm not sure if changes relating to mpeg_menu_sysevent_callback is correct.

*standard_menu_for_custom.3.diff
this is patch for replacing customed menu by standard menu.
   standard_menu_for_plugins.3.patch (19.8 KiB)
 apps/plugins/fireworks.c                    |   25 +------
 apps/plugins/pacbox/pacbox.c                |   22 +-----
 apps/plugins/random_folder_advance_config.c |   47 ++++---------
 apps/plugins/reversi/reversi-gui.c          |   23 +-----
 apps/plugins/sudoku/sudoku.c                |   42 ++----------
 apps/plugins/test_disk.c                    |   29 +++++---
 apps/plugins/test_sampr.c                   |   22 +-----
 apps/plugins/zxbox/spmain.c                 |   95 ++++++++--------------------
 8 files changed, 95 insertions(+), 210 deletions(-)

   standard_menu_for_plugins_with_tweak.3.patch (15.3 KiB)
 apps/plugins/jpeg/jpeg.c    |   55 ++++++++--------------
 apps/plugins/viewer.c       |   61 ++++++++++++-------------
 apps/plugins/rockboy/menu.c |  106 +++++++++++++++++++++-----------------------
 apps/plugins/solitaire.c    |   55 +++++++---------------
 4 files changed, 119 insertions(+), 158 deletions(-)

   standard_menu_for_doom.3.patch (8.2 KiB)
 apps/plugins/doom/rockdoom.c |  142 ++++++++++++++++++-------------------------
 1 file changed, 60 insertions(+), 82 deletions(-)

   standard_menu_for_mpegplayer.3.patch (8.8 KiB)
 apps/plugins/mpegplayer/mpegplayer.c    |    2 
 apps/plugins/mpegplayer/mpeg_settings.c |  137 ++++++++------------------------
 apps/plugins/mpegplayer/mpeg_settings.h |    2 
 3 files changed, 39 insertions(+), 102 deletions(-)

   standard_menu_for_custom.3.diff (48.9 KiB)
 apps/plugins/chessclock.c |  143 +++---------
 apps/plugins/jewels.c     |  431 ++++++++++--------------------------
 apps/plugins/rockpaint.c  |  541 +++++++++++++++++++---------------------------
 3 files changed, 405 insertions(+), 710 deletions(-)

Comment by Jonathan Gordon (jdgordon) - Wednesday, 03 June 2009, 18:25 GMT+2
are those all seperate patches that can be aplied in any order?
I cant see oldmenu.c being removed there.. does that mean not all plugins are converted after these? I'll look into commiting this before he weekend (hopefully)
Comment by Teruaki Kawashima (teru) - Thursday, 04 June 2009, 15:01 GMT+2
yes, they can. these patches are independent each other.
more strictly, independent against each plugin.
i converted all plugins using oldmenuapi unless i missed something.
the reason why removal of apps/plugins/lib/oldmenuapi.c is not included is that I thought that it's not late to remove oldmenuapi.c after these patches are commited and problems are not reported.
Comment by Teruaki Kawashima (teru) - Saturday, 06 June 2009, 05:51 GMT+2
I had uploaded wrong standard_menu_for_plugins_with_tweak.3.patch, sorry...
it dousen't do what i said for viewer.
> move "Quit" from top to button item of menu just like other plugins.
this is the correct one.
   standard_menu_for_plugins_with_tweak.3'.patch (15.6 KiB)
 apps/plugins/jpeg/jpeg.c    |   55 ++++++++--------------
 apps/plugins/viewer.c       |   69 ++++++++++++++--------------
 apps/plugins/rockboy/menu.c |  106 +++++++++++++++++++++-----------------------
 apps/plugins/solitaire.c    |   55 +++++++---------------
 4 files changed, 123 insertions(+), 162 deletions(-)

Comment by Jonathan Gordon (jdgordon) - Tuesday, 16 June 2009, 06:26 GMT+2
Accepted. Thanks....

I'm going to leave this open for a while in the hope that any problems that come up will get posted here.
Comment by Marko Pahlke (perfectdrug) - Tuesday, 16 June 2009, 13:07 GMT+2
I think it was more convenient to have the "quit" entry at the top of the list, in the jpegviewer, to easily exit the plugin without further keypresses, I think having "return" at the top is not intuitiv because if you press stop you normally don't want to undo this action.
Comment by Teruaki Kawashima (teru) - Wednesday, 17 June 2009, 16:47 GMT+2
"Quit" is at the bottom of the menu for (almost) all other plugins (if it has one), and it confused me that the "Quit" was not at where i expected (i.e. the bottom of the menu).
I'm wondering why there isn't key assigned to quit jpegviewer directly.
About "Return", maybe it can be dropped because user can return by pressing left?

Loading...