mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
CLuaInstance::MenuAddItem: Add separator typ 'subhead'
Origin commit data
------------------
Branch: ni/coolstream
Commit: 09a39546c2
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-07-11 (Fri, 11 Jul 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1033,12 +1033,12 @@ int CLuaInstance::MenuAddItem(lua_State *L)
|
|||||||
m->m->addItem(GenericMenuCancel);
|
m->m->addItem(GenericMenuCancel);
|
||||||
} else if (type == "separator") {
|
} else if (type == "separator") {
|
||||||
m->m->addItem(GenericMenuSeparator);
|
m->m->addItem(GenericMenuSeparator);
|
||||||
} else if (type == "separatorline") {
|
} else if ((type == "separatorline") || (type == "subhead")) {
|
||||||
if (!b->name.empty()) {
|
if (!b->name.empty()) {
|
||||||
m->m->addItem(new CMenuSeparator(CMenuSeparator::STRING | CMenuSeparator::LINE, b->name.c_str(), NONEXISTANT_LOCALE));
|
int flag = (type == "separatorline") ? CMenuSeparator::LINE : CMenuSeparator::SUB_HEAD;
|
||||||
} else {
|
m->m->addItem(new CMenuSeparator(CMenuSeparator::STRING | flag, b->name.c_str(), NONEXISTANT_LOCALE));
|
||||||
|
} else
|
||||||
m->m->addItem(GenericMenuSeparatorLine);
|
m->m->addItem(GenericMenuSeparatorLine);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
std::string right_icon; tableLookup(L, "right_icon", right_icon);
|
std::string right_icon; tableLookup(L, "right_icon", right_icon);
|
||||||
std::string action; tableLookup(L, "action", action);
|
std::string action; tableLookup(L, "action", action);
|
||||||
|
Reference in New Issue
Block a user