- Status Closed
- Percent Complete
- Task Type Patches
- Category Music playback
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#7003 - Allow forward references of menus in tagnavi.config
Here is another patch that I consider useful. It allows to reference menus in the tagnavi.config that are defined later. I use this to reference the default main menu from my customized menus in tagnavi_custom.config (because they are defined below the %include statement, and copy’n’paste is not a smart solution
Technical details of change:
- Parsing of submenu entries (label =⇒ id): When no menu with that id specified yet, create a new empty menu with that id
- Parsing of menu start lines (%menu_start id title): First check if there is already a menu with that id (if found, append; if not found create new empty menu)
Side effect
- removed obsolete link to parent menu
- removed obsolete " menu→itemcount = 0; " (because menu is filled with zeros by memset)
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
After this patch I increased TAGMENU_MAX_MENUS (in tagtree.h) from 16 to 32 because 16 will be reached very fast this way.
Increasing the TAGMENU_MAX_MENUS does not really hurt as it just enlarges the array of pointers.
But I don't really understand why this should be necessary. Actually, this patch should *reduce* the number of necessary menus because you don't have to copy menus from the tagnavi.config to your tagnavi_custom.config if you want to reference them from there.
In the 'tagnavi.config' there are 6 menus, but in my 'tagnavi_custom.config' I have 14 menus (different "Search for…", Sortet by Years, different "Sortet by Genre", …). Now after you patch I selectet my '"Default view…" =⇒ "main"'-entry and it only showed a blank list. That means if you using a 'tagnavi_custom.config' you can only add 10 new menues, if you don't want to loose a menu of the 'tagnavi.config'. And if you loose the "main"-menu the forward definition of the old menus is obsolete.
Ah. Understood - I didn't expect that many own menus (but to be honest - I just started tweaking around my rockbox).
So in case anybody is going to integrate this into the main release, please use the attached version of the patch (which includes Pascal's suggestion).
Thanks a lot.