2010-08-12, 17:55
Hi, Would it be possible to get an enum of view-modes for the add-on settings xml?
I'm currently working a plugin where I wish to change the default view mode for a list based on user setting. Since most of these lists are generated dynamically the user has to change view mode every time we return a new page, quickly becoming a tedious process.
So far I've made due with hardcoding the view-mode id's like this:
but this isn't really scalable since different skins implement different id's for their respective viewmodes. This piece of code only works with the thumbnail view in confluence (Thumbnail-view works much better for web videos btw), and breaks down with other skins. The fix for this would be to let the user select his or her preferred view-mode in the add-on settings dialog, but this doesn't seem possible?
I'm currently working a plugin where I wish to change the default view mode for a list based on user setting. Since most of these lists are generated dynamically the user has to change view mode every time we return a new page, quickly becoming a tedious process.
So far I've made due with hardcoding the view-mode id's like this:
Code:
xbmc.executebuiltin("Container.SetViewMode(500)")
but this isn't really scalable since different skins implement different id's for their respective viewmodes. This piece of code only works with the thumbnail view in confluence (Thumbnail-view works much better for web videos btw), and breaks down with other skins. The fix for this would be to let the user select his or her preferred view-mode in the add-on settings dialog, but this doesn't seem possible?