Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  probable upcoming feature: user customisable track info
« previous next »
  • Print
Pages: [1]

Author Topic: probable upcoming feature: user customisable track info  (Read 2717 times)

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
probable upcoming feature: user customisable track info
« on: November 01, 2012, 10:27:45 PM »
Hi all,

Here to explain a feature I'm working on ( http://gerrit.rockbox.org/r/347 ) for the skin engine to make themeing slightly less annoying for some users.

Currently, the track info that is displayed on the theme is chosen by the themer, but that person probably cares about different track info than the actual user (i.e the themer might care about album but the user might care about the composer). The current solution is for the user to go and edit the wps, but that sucks.

This new feature uses a seperate skin (metadata.txt) which has some specially named viewports which are used whenever the themes wps (or fms, sbs, etc) asks for track data (using the %iu or %Iu tag).

How to use it:

in your WPS you'd have a viewport where you'd ordinarily put a bunch of logic to show the track info... "%?ia<%ia>".... but instead of that you now just put %iu. When the screen is updated and it gets to the %iu tag it checks how many lines of text fit in the current viewport (based on the font the themer asked for) and does a quick search for a viewport in metadata.txt (or inbuilt) for what to display.
i.e if there is enough room to display 6 lines of text it will look for a viewport named "this_6", then "this_5", "this_4" etc untill it finds one. The text from that viewport is then dumped into the theme replacing %iu before continues to draw the rest of the theme.

There is also %Iu for next track info, and it looks for viewports with the "next_" prefix.

The code to make all this work is relativly small so it is quite likely it will be pushed in the next week or two, so I'm looking for some feedback and ideas...

As of patch version 3, you need to carefully name the viewports in metadata.txt, but I'm planning on adding a new viewport tag to just specify the number of lines and if it is this track or next.

Also, it is possible to have both %iu and %Iu in the same viewport, so im thinking about adding optional parameters for them to specify the max and min amount of lines to display.

comments?


Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline sockbox

  • Member
  • *
  • Posts: 111
Re: probable upcoming feature: user customisable track info
« Reply #1 on: November 04, 2012, 07:32:37 PM »
Just a single metadata.txt file for multiple wps files? Why not have a UI file for each wps theme? That way a user can have different profiles for each theme. The name for the UI file can be the same as the WPS but with an extension such as *.ui.

I haven't played with this feature yet but will try it out once it gets committed.
Logged

Offline herefornow

  • Member
  • *
  • Posts: 39
Re: probable upcoming feature: user customisable track info
« Reply #2 on: November 04, 2012, 09:46:35 PM »
Wondered if we would be able to go to a second "wps" for any info that didnt fit the original .wps. Maybe an %iu2 or something?
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: probable upcoming feature: user customisable track info
« Reply #3 on: November 04, 2012, 11:40:36 PM »
Quote from: sockbox on November 04, 2012, 07:32:37 PM
Why not have a UI file for each wps theme? That way a user can have different profiles for each theme. The name for the UI file can be the same as the WPS but with an extension such as *.ui.

At this point, the user may as well edit the .wps code themselves, which is precisely what this is supposed to avoid.

The idea here is for it to "just work" across multiple themes, with the (very reasonable) assumption that if the user has a particular set of information that they want displayed it is unlikely to change solely depending on the theme.


Quote from: herefornow on November 04, 2012, 09:46:35 PM
Wondered if we would be able to go to a second "wps" for any info that didnt fit the original .wps. Maybe an %iu2 or something?

Hang on, ...wait...what?


[Saint]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: probable upcoming feature: user customisable track info
« Reply #4 on: November 05, 2012, 12:11:11 AM »
It looks like my explanation still needs some work... Try again.

Lets say you really like theme A, but for some reason the author has 3 lines of track data in some really wierd order (Disc number - disc title, artist, track name - number), or assumes that all tags are there when your files don't have them. currently you'd have to go and rewrite his theme to make it suit your needs...

This patch changes that so as long as he uses "%iu" instead of what *s/he* wants to display it will just work with what *you* want to display, and it will work again when you switch to theme B later.

So, no, there is no need for more than one of these magic files because you always want the same few lines if it fits.

Ditto, herefornow, that doesn't make sense with this use case. I'm providing %iu (placeholder for "show my track info") and %Iu (show the next tracks info) and maybe one for the radio screen, but there is no need for others.
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline cereal_killer

  • Member
  • *
  • Posts: 409
Re: probable upcoming feature: user customisable track info
« Reply #5 on: November 05, 2012, 04:25:37 PM »
Sounds interesting, and if that makes modifying themes more easy, it's good.

Will this affect old themes too, or just themes, that are coded with the new tag?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: probable upcoming feature: user customisable track info
« Reply #6 on: November 05, 2012, 06:00:44 PM »
only themes with the tag will work, I'll be adding them to all the cabbies as an example to start with
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline cereal_killer

  • Member
  • *
  • Posts: 409
Re: probable upcoming feature: user customisable track info
« Reply #7 on: November 06, 2012, 11:47:54 AM »
thanks for your answer, but may I ask you for further clarification if
Quote
only themes with the tag will work

means, that old themes just won't work with this feature, or do they not work *at all* then, if this is getting committed? Like they need to be rewritten to work with future releases?

Quote
I'll be adding them to all the cabbies as an example to start with

that's good so we can try this out.

greetings,

c_k
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: probable upcoming feature: user customisable track info
« Reply #8 on: November 06, 2012, 05:20:42 PM »
No, I meant only themes which have the %iu tag will work with the new metadata.txt magic file, themes which don't will continue to work the same they always do
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline steak

  • Member
  • *
  • Posts: 104
Re: probable upcoming feature: user customisable track info
« Reply #9 on: January 01, 2013, 10:45:00 AM »
Sounds interesting to guys who aren't good at writing/modifying code like me. If it's no hassle, I volunteer to test your work as an end user... if you can let me now when & where ever it's available that is... I won't comment at development stage, too complicated as a foreigner.
Logged
>>ports: >Cowon D2, Sansa Clip+ & Clip Zip, >Android: Samsung Galaxy SII & Motorola Defy MB525 (both ok with build 4aa32fb-131023)
>>(Previous) Android: Samsung Galaxy SI (rb worked well)
>>Misc: Archos XS202, iRiver imp550 & imp350, Sony MZ-RH1, Shure SE530

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  probable upcoming feature: user customisable track info
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.102 seconds with 15 queries.