FS#7158 - Bookmark selection as a list.

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Saturday, 12 May 2007, 12:19 GMT
Last edited by Magnus Holmgren (learman) - Saturday, 26 May 2007, 10:45 GMT
Task Type Patches
Category User Interface
Status Closed
Assigned To Magnus Holmgren (learman)
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This is a first, rough implementation of having the bookmark selection screen as a list. It's not finished, but it is complete enough to be usable. A proper version would include at least the following:

* Properly hooked up delete bookmark button.
* Optimized bookmark file reading (currently the file is opened, scanned and closed twice for each displayed item).
* Proper lang strings.

And perhaps the following:

* Merge the "Load bookmark?" screen with the list (first item would be "Don't resume", with second item selected on entry).
* Context menu for Select bookmark, Delete bookmark, Exit screen.
* Different display of the bookmark items.
* Different voicing.

Originally I had though of indicating shuffle mode using the list icon, but that icon is currently not available to the list, so I added the "Shuffle" text instead.

Comments and suggestions are appriciated.

There's also a screenshot, showing what it can look like.
This task depends upon

Closed by  Magnus Holmgren (learman)
Saturday, 26 May 2007, 10:45 GMT
Reason for closing:  Accepted
Comment by Magnus Holmgren (learman) - Saturday, 12 May 2007, 14:46 GMT
Second alpha version. Changes:

* Small changes to bookmark display.
* Don't scroll all lines.
* Simple bookmark file buffering implemented, using the plugin buffer.

The buffering is quite simple, so list wrapping will always cause a reload (unless the file fits in the buffer). However, the plugin buffer should be larger that most bookmark files, so this shouldn't be a big problem.
Comment by Magnus Holmgren (learman) - Sunday, 13 May 2007, 12:26 GMT
First beta version. Changes:

* Context menu added (for Resume and Delete).
* "Load bookmark?" screen merged with bookmark list.
* Button mappings updated.
* English.lang updated.
* Buffering tweaks.

This is pretty much what I had in mind, but suggestions are still welcome.
Comment by Douglas Valentine (Dwyloc) - Sunday, 13 May 2007, 18:05 GMT
I use my DAPS a lot to listen to audio books and as such bookmarking is one of Rockbox's killer features for me.
So I installed your patch and have been testing it this afternoon, so far I am impressed and find it to be quite a
big improvement over the old bookmark screen.

The only thing is that I find the the playlist position number a bit confusing as I feel it should really start at
one not zero.

I also think it would be clearer what the number means if it was displayed as [Playlist track number / number of tracks in play list]
like [64/100].
Comment by Magnus Holmgren (learman) - Sunday, 13 May 2007, 20:15 GMT
Currently it just displays the number in the bookmark file, which apparently is zero-based. :) Easily fixed.

Getting number of tracks requires reading the playlist/directory. As it only needs to be done once, that's not a problem. However, it would be repeated for each bookmark, which I don't quite like... Making it clearer that it is the index would be nice though.
Comment by Douglas Valentine (Dwyloc) - Tuesday, 15 May 2007, 09:37 GMT
I was under the impression that you would only have to re-read the directory structure more than
once for the resent bookmarks screen, as normal bookmarks files would have the same number of entry
in the directory for play list for all entries.

But I quite agree if its going to slow things down a lot them its most likely not a good idea.
Comment by Magnus Holmgren (learman) - Tuesday, 15 May 2007, 11:15 GMT
I hadn't thought of the "Recent bookmarks" screen (I don't really use that one myself); there the entry count would indeed be different (and perhaps useful). But as you say, scanning every playlist/directory could make things slow.
Comment by Magnus Holmgren (learman) - Tuesday, 15 May 2007, 19:08 GMT
New version:

* Synced with svn.
* Fixed display of playlist position.
* Some more buffering tweaks and fixes.

Should be ready for commit soon...
Comment by Douglas Valentine (Dwyloc) - Saturday, 19 May 2007, 15:14 GMT
Looks good.

I have tested the lasted version of your patch on both my h140 and my ipod nano, so when do you plan to commit it :)