Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skin.SelectBool() - allow skins to set header label #9317

Merged
merged 1 commit into from
Mar 13, 2016

Conversation

ronie
Copy link
Member

@ronie ronie commented Mar 10, 2016

allow skins to define the header label instead of hardcoding it in core:
Skin.SelectBool(headerlabel, setting1label|setting1name, setting2label|setting2name...)

also added a sanity check on the setting label/name pairs (prevent kodi from crashing)

as requested by @HitcherUK

@xhaggi for review

@ronie ronie added Type: Improvement non-breaking change which improves existing functionality Component: GUI engine API change: GUI labels Mar 10, 2016
@@ -112,14 +112,18 @@ static int SelectBool(const std::vector<std::string>& params)

CGUIDialogSelect* pDlgSelect = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT);
pDlgSelect->Reset();
pDlgSelect->SetHeading(CVariant{g_localizeStrings.Get(424)});
int iHeader = atoi(params[0].c_str());

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@ronie
Copy link
Member Author

ronie commented Mar 10, 2016

updated as suggested by @xhaggi

jenkins build this please

@xhaggi
Copy link
Member

xhaggi commented Mar 11, 2016

did you missed to adjust the required param count at https://github.com/xbmc/xbmc/blob/master/xbmc/interfaces/builtins/SkinBuiltins.cpp#L584

@ronie
Copy link
Member Author

ronie commented Mar 11, 2016

@xhaggi
Copy link
Member

xhaggi commented Mar 11, 2016

sorry for the noise I'm on my phone :)

ronie added a commit that referenced this pull request Mar 13, 2016
Skin.SelectBool() - allow skins to set header label
@ronie ronie merged commit 2ecc21c into xbmc:master Mar 13, 2016
@Hitcher
Copy link
Contributor

Hitcher commented Mar 13, 2016

Forgot to say I tested it yesterday and it was all good.

Thanks.

@razzeee razzeee added this to the Krypton 17.0-alpha1 milestone Mar 14, 2016
@ronie ronie deleted the selectbool-header branch October 15, 2016 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants