From ce8f23bd69395637f426a63a6d518ec8e7c58518 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 11 Jul 2014 10:45:59 +0200 Subject: [PATCH] CLuaInstance::MenuAddItem: Add separator typ 'subhead' Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/09a39546c26674724451ecc90893ed4353d854ee Author: Michael Liebmann Date: 2014-07-11 (Fri, 11 Jul 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/luainstance.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 26577d955..26661f38c 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -1033,12 +1033,12 @@ int CLuaInstance::MenuAddItem(lua_State *L) m->m->addItem(GenericMenuCancel); } else if (type == "separator") { m->m->addItem(GenericMenuSeparator); - } else if (type == "separatorline") { + } else if ((type == "separatorline") || (type == "subhead")) { if (!b->name.empty()) { - m->m->addItem(new CMenuSeparator(CMenuSeparator::STRING | CMenuSeparator::LINE, b->name.c_str(), NONEXISTANT_LOCALE)); - } else { + int flag = (type == "separatorline") ? CMenuSeparator::LINE : CMenuSeparator::SUB_HEAD; + m->m->addItem(new CMenuSeparator(CMenuSeparator::STRING | flag, b->name.c_str(), NONEXISTANT_LOCALE)); + } else m->m->addItem(GenericMenuSeparatorLine); - } } else { std::string right_icon; tableLookup(L, "right_icon", right_icon); std::string action; tableLookup(L, "action", action);