Kodi Community Forum
CAddonDll::TransferSettings out of sync? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: Screensavers and visualisations (https://forum.kodi.tv/forumdisplay.php?fid=38)
+---- Thread: CAddonDll::TransferSettings out of sync? (/showthread.php?tid=135417)



CAddonDll::TransferSettings out of sync? - PartialGestalt - 2012-07-05

While working on a screensaver DLL addon, I noticed that I'm not getting a number of settings during TransferSettings (the SetSetting callback sequence). Browsing through the code, it looks like AddonDll.h (CAddonDll::TransferSettings) has a number of the XML tokens different from those in CGUIDialogAddonSettings::CreateControls).

For example, there is a "number" setting type used for numeric settings in CreateControls, but no such thing will transfer in AddonDll.h. Conversely, an "integer" type setting can be transferred, but will never get a control created in the dialog.

Assuming that CreateControls is the canonical listing of setting types, is there a reason that AddonDll.h differs? If not, would anyone object to me providing a patch to bring AddonDll.h back into sync?

On a related note, would there be any objection to adding a "stringtransfer" attribute to the "setting" element (that transfers the setting to the dll as a string instead of trying to cook it to another format)?

-pg


RE: CAddonDll::TransferSettings out of sync? - jmarshall - 2012-07-06

I'm sure noone would object to a patch assuming something is broken (which it sounds like it is)


RE: CAddonDll::TransferSettings out of sync? - PartialGestalt - 2012-07-07

Ok, there's a trac item (#13160) with the patch added as an attachment, and I've also created a pull request (#1132) for the commit.

Anything else I need to do? I'm not sure I've done the pull request entirely right, but it seems ok....


RE: CAddonDll::TransferSettings out of sync? - jmarshall - 2012-07-08

Thanks - just a couple of nits if you wouldn't mind taking care of them.

Cheers,
Jonathan