Rockbox

Tasklist

FS#5742 - Properties screen

Attached to Project: Rockbox
Opened by Will Robertson (aliask) - Sunday, 30 July 2006, 12:29 GMT
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch adds a basic properties screen to the onplay menu, in the likes of the ID3 screen.
I created this because rockbox has no other means of finding the filesize of a file and to quickly check the file extention, which is hidden in when "show files" is set to "supported".
This is especially useful for when you have encoded a recording made on the player with the wav2wv plugin, and want to know which to delete.
At the moment it just displays the full path, the file extention and the filesize of the selected file, but I will perhaps add more things as I think of them, and as I learn more about C to enable me to do the things I think of :).
This task depends upon

Closed by  Peter D'Hoye (petur)
Thursday, 30 November 2006, 22:32 GMT
Reason for closing:  Accepted
Comment by Linus Nielsen Feltzing (linusnielsen) - Sunday, 30 July 2006, 14:59 GMT
This looks really nice. Have a look at the output_dyn_value() function in apps/misc.c, I believe you can use that to output a nice Kb/Gb display.
Comment by Will Robertson (aliask) - Monday, 31 July 2006, 08:13 GMT
Updated version using the output_dyn_value() that Linus suggested - rockbox.iriver file dropped a few hundred bytes in size, and the code looks a lot cleaner too, while retaining the same functionality.

Thanks for the tip! :)
Comment by Jonas Häggqvist (rasher) - Monday, 31 July 2006, 10:00 GMT
Would it not make sense to implement this as a viewer plugin instead to save on binary size?
Comment by Will Robertson (aliask) - Monday, 31 July 2006, 10:36 GMT
I initially created this as a plugin which would be accessed by the "open with" menu. The reason I went against this was mainly a matter of accessibility, it's easier to find this way, and you have to do less looking (it's also more intuitive).

Perhaps I could make a dedicated menu item to launch the it as a plugin, keeping the best of both worlds. Does this sound like a good idea?
Comment by Jonas Häggqvist (rasher) - Monday, 31 July 2006, 10:49 GMT
Making it a plugin, and adding it to the menu seems ideal to me. There's going to be a HDD spinup anyway, isn't there, so having it as a plugin just adds a tiny fraction of time (plugin loading) if I understand correctly?
Comment by Simon Menzel (Rincewind) - Monday, 31 July 2006, 15:44 GMT
I think it would be nice if this can be bundled with the ID3-Screen.
For example pressing LEFT or RIGHT toggles between file info and id3 info.
Bitrate, Frequency and Path could be moved to the file info "tab" then.
Comment by Paul Louden (darkkone) - Tuesday, 01 August 2006, 00:01 GMT
A few requests for what it could do:
When you view the file's properties, show a list of viewers associated with it (viewers.config), and what the default action for that file type is (whether it's a viewer, or whether the Rockbox binary has reserved it, such as music etc).
Comment by Will Robertson (aliask) - Tuesday, 01 August 2006, 12:47 GMT
This version of the patch just turns it into the plugin based system - it doesn't add any new features.

Unfortunately there are some side effects of using the plugin approach:
- No .lang file support - this means:
-- No support for other languages
-- No voicing

- No statusbar
- No background image support
- Scrolling doesn't work properly any more (probably due to my incompetence rather than any programming limitation)
- Properties plugin is visible from the plugins menu

However, it isn't all bad news. The addition of this featuer only adds 88 bytes to the rockbox binary.
Comment by Daniel Stenberg (bagder) - Tuesday, 01 August 2006, 12:53 GMT
Also note that the language system is meant to one day get expanded to allow for both translated text and voicing:

http://daniel.haxx.se/rockbox/langv2
Comment by Will Robertson (aliask) - Saturday, 09 September 2006, 07:05 GMT
Updated the plugin, and synced the patch to CVS.
The plugin now uses the button action system, and the scrolling is working fine now.

The patch also adds gui_synclist_set_title to the Plugin API.
Comment by Peter D'Hoye (petur) - Saturday, 25 November 2006, 20:05 GMT
How about this implementation? (sorry to drop above ones completely)

I've added it to Rockbox context menu when browsing, and it works on files and directories. Uses direntry and as such doesn't try to open the file. Translatable. Does its own value formatting (in only 17 lines!) because output_dyn_value() can't handle big values and isn't easily adapted (first try resulted in a bigger binary then my implementation in parallel).
Adds 1680 bytes to the binary....
Comment by Peter D'Hoye (petur) - Sunday, 26 November 2006, 01:15 GMT
slightly optimized (size-wise), still adds 1596 bytes to the binary. If anybody knows why this bit of code takes so much space, do tell....

also synced to latest cvs changes
Comment by Peter D'Hoye (petur) - Sunday, 26 November 2006, 10:40 GMT
switched to using dircache
Comment by Peter D'Hoye (petur) - Sunday, 26 November 2006, 11:44 GMT
Scrolls long lines and faster exit from screen.
Size increase now at 1576 ;)
Comment by Peter D'Hoye (petur) - Monday, 27 November 2006, 19:38 GMT
FYI: I'm also moving this to a plugin (a viewer, that is), based on the initial work of aliask. May need to extend the pluging api even more :/
Comment by Peter D'Hoye (petur) - Thursday, 30 November 2006, 01:10 GMT
plugin version, just needs a bit cleaning but should be ok

Loading...