Hi,
ViewModes types and ids change from skin to skin. How can we get a list of all the current skin ViewModes (with their ids) so that we can give the user the choice to pick one (in settings), and we set it using "Container.SetViewMode(id)" on behalf of the user in our addons directory lists.
Thank you.
Get list of ViewModes
tria
Member Posts: 73 Joined: Jan 2012 Reputation: 0 |
2012-03-08 23:29
Post: #1
|
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2012-03-08 23:41
Post: #2
You can't to my knowledge (and really shouldn't). Instead you should wait until Eden is out and we'll improve all this so it's far easier for the addon to suggest what views might be appropriate by specifying content on a finer scale and by specifying a path/id for which XBMC can use to retrieve the previous user setting for that content type and path/id combination.
Cheers, Jonathan Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
tria
Member Posts: 73 Joined: Jan 2012 Reputation: 0 |
2012-03-09 00:26
Post: #3
But isn't what you described is already there (I am using the RC1). I mean when I set the content type to the appropriate type, then the user get to choose from a proper list of viewmodes. If the user visit the same window (id/path) again, the previous selected viewmode will be set automatically by xbmc. This is really a great design principle. This I believe is already there, unless you mean something else?
With this approach, once the path/id change, the selected viewmode will change as well. It is a problem (sometimes) because each window must have a different path/id in most addon, but some of the addon would want to let the user set a view mode for one path/id, and apply it to all other similar path/id belonging to the same addon. If only there was another unique id (view_id) that you can set for similar lists/windows, and then xbmc will rembemer the viewmode based on this view_id, and not the path/id of the window itself. This will solve the problem for sure (without breaking the user experience of having to set it everytime, or go to settings to adjust it). |
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2012-03-09 00:33
Post: #4
Yes, the idea just needs improving - as you say, the problem is that the plugin can't specify that it should just use whatever view details the user has already set on pathA for pathB as well (eg all the same "levels" in your addon might use the same viewtype - user need only alter it once). So adding the facility for the addon to say "this listing should be referred to in the content/sort/view stuff with _bar_ id" will solve this.
Cheers, Jonathan Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
tria
Member Posts: 73 Joined: Jan 2012 Reputation: 0 |
2012-03-09 00:38
Post: #5
Okay, this would be great. Hope to see this implemented soon, as it will be useful in most of the addons (if not all).
Thanks Jonathan. |
| find quote |

![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
Search
Help