diff --git a/xbmc/addons/GUIDialogAddonSettings.cpp b/xbmc/addons/GUIDialogAddonSettings.cpp index 2937e37808c18..cc032a7ec8a0f 100644 --- a/xbmc/addons/GUIDialogAddonSettings.cpp +++ b/xbmc/addons/GUIDialogAddonSettings.cpp @@ -403,8 +403,18 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl) else if (strcmp(type, "addon") == 0) { const char *strType = setting->Attribute("addontype"); - TYPE type = strType ? TranslateType(strType) : ADDON_UNKNOWN; - if (type != ADDON_UNKNOWN) + if (strType) + { + CStdStringArray addonTypes; + StringUtils::SplitString(strType, ",", addonTypes); + vector types; + for (unsigned int i = 0 ; i < addonTypes.size() ; i++) + { + ADDON::TYPE type = TranslateType(addonTypes[i].Trim()); + if (type != ADDON_UNKNOWN) + types.push_back(type); + } + if (types.size() > 0) { const char *strMultiselect = setting->Attribute("multiselect"); bool multiSelect = strMultiselect && strcmpi(strMultiselect, "true") == 0; @@ -413,16 +423,17 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl) // construct vector of addon IDs (IDs are comma seperated in single string) CStdStringArray addonIDs; StringUtils::SplitString(value, ",", addonIDs); - if (CGUIWindowAddonBrowser::SelectAddonID(type, addonIDs, false) == 1) + if (CGUIWindowAddonBrowser::SelectAddonID(types, addonIDs, false) == 1) { StringUtils::JoinString(addonIDs, ",", value); ((CGUIButtonControl*) control)->SetLabel2(GetAddonNames(value)); } } else // no need of string splitting/joining if we select only 1 addon - if (CGUIWindowAddonBrowser::SelectAddonID(type, value, false) == 1) + if (CGUIWindowAddonBrowser::SelectAddonID(types, value, false) == 1) ((CGUIButtonControl*) control)->SetLabel2(GetAddonNames(value)); } + } } m_buttonValues[id] = value; break; diff --git a/xbmc/interfaces/Builtins.cpp b/xbmc/interfaces/Builtins.cpp index d03b4c9bfaf64..f191d21f71431 100644 --- a/xbmc/interfaces/Builtins.cpp +++ b/xbmc/interfaces/Builtins.cpp @@ -1109,9 +1109,15 @@ int CBuiltins::Execute(const CStdString& execString) else if (execute.Equals("skin.setaddon") && params.size() > 1) { int string = g_settings.TranslateSkinString(params[0]); - ADDON::TYPE type = TranslateType(params[1]); + vector types; + for (unsigned int i = 1 ; i < params.size() ; i++) + { + ADDON::TYPE type = TranslateType(params[i]); + if (type != ADDON_UNKNOWN) + types.push_back(type); + } CStdString result; - if (CGUIWindowAddonBrowser::SelectAddonID(type, result, true) == 1) + if (types.size() > 0 && CGUIWindowAddonBrowser::SelectAddonID(types, result, true) == 1) { g_settings.SetSkinString(string, result); g_settings.Save();