This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#8543 - Action API for the clock plugin
Attached to Project:
Rockbox
Opened by Kévin Ferrare (TiMiD) - Friday, 01 February 2008, 16:52 GMT+2
Last edited by Marianne Arnold (pixelma) - Monday, 22 November 2010, 01:37 GMT+2
Opened by Kévin Ferrare (TiMiD) - Friday, 01 February 2008, 16:52 GMT+2
Last edited by Marianne Arnold (pixelma) - Monday, 22 November 2010, 01:37 GMT+2
|
DetailsThis patch only concerns the clock plugin for now.
Instead of using the pluglib generic actions which proved to be somehow unflexible, difficult to maintain and to have issues with contexts overlaping on some targets, let's redefine the whole button mappings per plugin using the action API Could make some people happy |
This task depends upon
Closed by Marianne Arnold (pixelma)
Monday, 22 November 2010, 01:37 GMT+2
Reason for closing: Rejected
Additional comments about closing: Obsolete since the pluginlib actions were simplified (only one context) and I'm not aware of any problems left in the clock plugin. The patch is also outdated due to this rework and being left alone for over 2.5 years.
Monday, 22 November 2010, 01:37 GMT+2
Reason for closing: Rejected
Additional comments about closing: Obsolete since the pluginlib actions were simplified (only one context) and I'm not aware of any problems left in the clock plugin. The patch is also outdated due to this rework and being left alone for over 2.5 years.
Anyway this patch follows what we discussed on the irc last week :
- don't use the pluginlib_actions which is difficult to maintain and somehow broken on some targets because of key mappings overlap
- use the action API which is more powerful to express the keymaps than the old way with the buttons (action API != pluginlib_actions)
Please read the logs again (20080123 if I recall), and please stop being so bossy
I'm open to discussion and willing to fix the problem.
Does someone have any technical comment on this patch ?
Edit: Took the former second comment out because I didn't read correctly. *rubs eyes*
(at least if I believe what's written there : http://www.rockbox.org/twiki/bin/view/Main/ArchosOndio)
With all the new builds coming in, it will make the task of the developer to get plugins working for new targets much easier. Also it would be possible for targets with more buttons to assign additional functionality without having to resort to in-code #ifdefs.
However I would still like to see a set of default actions shared between all plugins (most importantly the OFF button, to overcome the current situation with no consistent way to exit plugins, but probably menu, select and directional keys.) I would expect that plugins could override these actions if the nature of the plugin and/or the device's button layout require it.
The default actions idea was seducing, a few lines of code and no need to think about the keymap instead of a big bulky 200 lines keymap repeated for every plugin and increasing with the number of targets.
The problem with default actions is that they make the plugins more difficult to maintain :
- it's not obvious to see whether an action defined will collide with another one (even if it works on your target it could cause problems on others)
- even if when the collisions are carefully avoided, it can break when someone changes the keymap, or add a new target
- it's not flexible, some plugins that uses standard actions are now getting #ifdefs as well regarding the target to behave properly ...
A default action for quit button would be great, however there are still risks of collision so I wonder if it's a practicable solution