XMLUtils::GetInt(node, SETTING_XML_ELM_CONTROL_HEADING, m_heading);
XMLUtils::GetBoolean(node, SETTING_XML_ELM_CONTROL_MULTISELECT, m_multiselect);
+ XMLUtils::GetBoolean(node, SETTING_XML_ELM_CONTROL_HIDEVALUE, m_hideValue);
return true;
}
public:
CSettingControlList()
: m_heading(-1),
- m_multiselect(false)
+ m_multiselect(false),
+ m_hideValue(false)
{ }
virtual ~CSettingControlList() { }
void SetHeading(int heading) { m_heading = heading; }
bool CanMultiSelect() const { return m_multiselect; }
void SetMultiSelect(bool multiselect) { m_multiselect = multiselect; }
+ bool HideValue() const { return m_hideValue; }
+ void SetHideValue(bool hideValue) { m_hideValue = hideValue; }
protected:
int m_heading;
bool m_multiselect;
+ bool m_hideValue;
};
class CSettingControlSlider;
CGUIControlBaseSetting::Update();
CFileItemList options;
- if (GetItems(m_pSetting, options))
+ bool optionsValid = GetItems(m_pSetting, options);
+ if (optionsValid && !static_cast<const CSettingControlList*>(m_pSetting->GetControl())->HideValue())
{
std::vector<std::string> labels;
for (int index = 0; index < options.Size(); index++)
m_pButton->SetLabel2(StringUtils::Join(labels, ", "));
}
+ else
+ m_pButton->SetLabel2(StringUtils::Empty);
// disable the control if it has less than two items
if (!m_pButton->IsDisabled() && options.Size() <= 1)