2006-07-20, 11:10 PM
I wanted to post a reminder to developers about some changes that occurred earlier this year.
A common cause of problems in GB-PVR is trying to use a plugin with a skin that does not explicitly provide support for that plugin. This problem occurs because the plugin is expecting to find its supporting skin files (skin.xml and image files etc), but they are not contained with in the active skin.
Early this year I made a change that will take advantage of the fact that all plugins support the default (blue) skin. Specifically, SkinHelper was changed to automatically fall back to using these resource files in the default skin if they’re not available in the active skin.
This change will only affect things explicitly defined in the plugin’s skin xml file(s). Things that are inherited from the BaseSkin.xml will continue to be loaded from the active skin. This means that buttons will still have the correct appearance for the current skin, and the background image will be correct.
To implement support for this functionality in your plugins, you need to use the correct constructor to SkinHelper. The older constructor to SkinHelper did not provide all the information that was be required to support this.
To use this new functionality, the plugin developer would create a SkinHelper instance using:
Behind the scenes the skin helper will determine the correct path and load the XML file. If the XML file cannot be found in the active skin directory, it’ll fall back to using the default one in the blue directory.
Having plugins support is becoming more important as we make an effort to clean up the skinning in GB-PVR. If you have plugins not currently doing this, please try to make this small change in the very near future.
A common cause of problems in GB-PVR is trying to use a plugin with a skin that does not explicitly provide support for that plugin. This problem occurs because the plugin is expecting to find its supporting skin files (skin.xml and image files etc), but they are not contained with in the active skin.
Early this year I made a change that will take advantage of the fact that all plugins support the default (blue) skin. Specifically, SkinHelper was changed to automatically fall back to using these resource files in the default skin if they’re not available in the active skin.
This change will only affect things explicitly defined in the plugin’s skin xml file(s). Things that are inherited from the BaseSkin.xml will continue to be loaded from the active skin. This means that buttons will still have the correct appearance for the current skin, and the background image will be correct.
To implement support for this functionality in your plugins, you need to use the correct constructor to SkinHelper. The older constructor to SkinHelper did not provide all the information that was be required to support this.
To use this new functionality, the plugin developer would create a SkinHelper instance using:
Code:
[FONT=Courier New]private SkinHelper skinHelper;[/FONT]
[FONT=Courier New]…[/FONT]
[FONT=Courier New]string pluginName = “TV Guide”; // …also the skin subdirectory[/FONT]
[FONT=Courier New]string skinFileName = “skin.xml”; // note the missing path[/FONT]
[FONT=Courier New]skinHelper = new SkinHelper(pluginName, skinFileName);[/FONT]
Behind the scenes the skin helper will determine the correct path and load the XML file. If the XML file cannot be found in the active skin directory, it’ll fall back to using the default one in the blue directory.
Having plugins support is becoming more important as we make an effort to clean up the skinning in GB-PVR. If you have plugins not currently doing this, please try to make this small change in the very near future.