Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by TiMiD - 2008-02-01
Last edited by pixelma - 2010-11-22

FS#8543 - Action API for the clock plugin

This 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

Closed by  pixelma
2010-11-22 00:37
Reason for closing:  Rejected
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

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.

petur commented on 2008-02-03 13:17

TiMiD, it would do good to follow some discussions in the IRC from time to time: many have expressed the feeling that the action-api is not wanted for plugins it its current form….

TiMiD commented on 2008-02-03 13:32

I'm busy and I cannot always be on the irc, I have a life that takes me a lot of time.

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

petur commented on 2008-02-03 13:39

long toes, have we?

TiMiD commented on 2008-02-03 15:27

OK so anyway an action should be taken regarding the actual state of the buttons management in the plugins that are using pluginlib_actions.
I'm open to discussion and willing to fix the problem.
Does someone have any technical comment on this patch ?

Yes, the Ondio keypad is missing… ;)

Edit: Took the former second comment out because I didn't read correctly. *rubs eyes*

TiMiD commented on 2008-02-04 11:02

The ondio keypad is indeed missing … because this is the clock plugin and ondios don't have an RTC :)
(at least if I believe what's written there : http://www.rockbox.org/twiki/bin/view/Main/ArchosOndio)

Oops, that's true. For some stupid reason it mixed up with metronome in my head; guess I shouldn't comment on something in the morning before getting enough coffee. :)

I am in favour of this.

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.

TiMiD commented on 2008-02-21 01:55

Well the action API is obviously more powerful and convenient to express a keymap than the #define way.

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

TiMiD commented on 2008-02-21 01:56

Updated keymap

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing