mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponentsFooter: simplify implementation of button labels
button_label_l and button_label_s are now merged to button_label_cc with prepared default values for text and locales.This type contains all possible button label properties. Values for locales and string are evaluated in setButtonLabels(), so it's possible to remove some overloaded methodes.
This commit is contained in:
@@ -139,27 +139,27 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
|
||||
else {
|
||||
CComponentsFooter* footer = (*udata)->w->getFooterObject();
|
||||
if (footer) {
|
||||
vector<button_label_s> buttons;
|
||||
vector<button_label_cc> buttons;
|
||||
if (!btnRed.empty()) {
|
||||
button_label_s btnSred;
|
||||
button_label_cc btnSred;
|
||||
btnSred.button = NEUTRINO_ICON_BUTTON_RED;
|
||||
btnSred.text = btnRed;
|
||||
buttons.push_back(btnSred);
|
||||
}
|
||||
if (!btnGreen.empty()) {
|
||||
button_label_s btnSgreen;
|
||||
button_label_cc btnSgreen;
|
||||
btnSgreen.button = NEUTRINO_ICON_BUTTON_GREEN;
|
||||
btnSgreen.text = btnGreen;
|
||||
buttons.push_back(btnSgreen);
|
||||
}
|
||||
if (!btnYellow.empty()) {
|
||||
button_label_s btnSyellow;
|
||||
button_label_cc btnSyellow;
|
||||
btnSyellow.button = NEUTRINO_ICON_BUTTON_YELLOW;
|
||||
btnSyellow.text = btnYellow;
|
||||
buttons.push_back(btnSyellow);
|
||||
}
|
||||
if (!btnBlue.empty()) {
|
||||
button_label_s btnSblue;
|
||||
button_label_cc btnSblue;
|
||||
btnSblue.button = NEUTRINO_ICON_BUTTON_BLUE;
|
||||
btnSblue.text = btnBlue;
|
||||
buttons.push_back(btnSblue);
|
||||
|
Reference in New Issue
Block a user