Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by aliask - 2006-07-30

FS#5742 - Properties screen

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 :).

Closed by  petur
2006-11-30 22:32
Reason for closing:  Accepted
Project Manager

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.

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! :)

Would it not make sense to implement this as a viewer plugin instead to save on binary size?

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?

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?

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.

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).

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.

Project Manager

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

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.

petur commented on 2006-11-25 20:05

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….

petur commented on 2006-11-26 01:15

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

petur commented on 2006-11-26 10:40

switched to using dircache

petur commented on 2006-11-26 11:44

Scrolls long lines and faster exit from screen.
Size increase now at 1576 ;)

petur commented on 2006-11-27 19:38

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 :/

petur commented on 2006-11-30 01:10

plugin version, just needs a bit cleaning but should be ok

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing