This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7667 - Split shortcuts plugin into a viewer and an appender
Attached to Project:
Rockbox
Opened by Alexander Levin (fml2) - Monday, 27 August 2007, 22:37 GMT+2
Last edited by Peter D'Hoye (petur) - Tuesday, 04 September 2007, 00:25 GMT+2
Opened by Alexander Levin (fml2) - Monday, 27 August 2007, 22:37 GMT+2
Last edited by Peter D'Hoye (petur) - Tuesday, 04 September 2007, 00:25 GMT+2
|
DetailsThis simplifies code, we don't have to analyse whether it's a .link file etc -- each part has its own little task.
Also, two options are introduced: 1. In the link file, you can specify the display name for the entry. It should be separated from the path by the TAB. E.g. /my/path/<TAB>My favourite songs 2. In the file, you can write #Display last path segments=N and then only the last N path segments will be displayed. This is handy if your music is in a deep folder. Explicit name (with a TAB) has higher priority than N, i.e. if N=2 and you have /aa/bb/cc/x.mp3<TAB>YYY then the item will be displayed as YYY and not as bb/cc/x.mp3 I get some strange linker errors. Before I split the plugin into two everything worked OK. |
This task depends upon
Closed by Peter D'Hoye (petur)
Tuesday, 04 September 2007, 00:25 GMT+2
Reason for closing: Accepted
Additional comments about closing: I did find two tabs and a too long line :p
Tuesday, 04 September 2007, 00:25 GMT+2
Reason for closing: Accepted
Additional comments about closing: I did find two tabs and a too long line :p
Out of these three files, two .rocks should be produced:
1. shortcuts_common.c + shortcuts_view.c -> shortcuts_view.rock
2. shortcuts_common.c + shortcuts_append.c -> shortcuts_append.rock
How can this be done?
I somehow managed to produce a patch file with duplicated patches. Attached is the corrected patch.
Since I was one of the initiators for the creation of the plugin and am one of its very few users (if not the only one :-) could you please commit it asap.
@petur: after the splitting, each part has its own little but well defined task. Before splitting, if you selected a .link file and wanted to add it to the shortcuts, it was shown instead -> not the principle of the least surprise IMHO. Another thing was that the association of the plugin with .link files was hard coded in the plugin. IMHO it should be done in viewers.config only.
1) the opening braces of a function should be on a new line (this is not yet in CONTRIBUTING but it will be soon)
2) I do not understand how the shortcuts to shortcuts works. With your patch you can add it but afterwards it doesn't look like you can do much with it (I thought it would open the shortcut file)
to 2) Shortcuts are just a way to quickly go to a certaint dir/file. It doesn't dictate what you should do with it then, just takes you there in the file browser. Just a shortcut. It doesn't "play" the file. So you could put a reference to a link file into another link file and quickly jump from dir to dir :-)
thanks for clarifying 2)
1. Corrected braces
2. Removed malloc, work with an array instead
3. After deleting an entry, stay in the list
4. If an item with no more existing path/file is selected, display a splash but stay in the list
5. Properly handle connecting to USB