Preparing the menu classes for Lua Part #2

- Remove CMenuForwarderNonLocalized
- Add overloaded function CMenuForwarder for non local
 THX Martii


Origin commit data
------------------
Branch: ni/coolstream
Commit: b41819190d
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-01-16 (Thu, 16 Jan 2014)

Origin message was:
------------------
Preparing the menu classes for Lua Part #2

- Remove CMenuForwarderNonLocalized
- Add overloaded function CMenuForwarder for non local
 THX Martii


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2014-01-16 23:20:04 +01:00
parent 917e8aafa4
commit 7b4e3bc03b
35 changed files with 298 additions and 356 deletions

View File

@@ -128,14 +128,14 @@ int CCAMMenuHandler::doMainMenu()
char tmp[32];
snprintf(tmp, sizeof(tmp), "ca_ci%d", i);
cammenu->addItem(new CMenuForwarderNonLocalized(name1, true, NULL, this, tmp, CRCInput::RC_1 + cnt++));
cammenu->addItem(new CMenuForwarder(name1, true, NULL, this, tmp, CRCInput::RC_1 + cnt++));
snprintf(tmp, sizeof(tmp), "ca_ci_reset%d", i);
cammenu->addItem(new CMenuForwarder(LOCALE_CI_RESET, true, NULL, this, tmp));
memset(name1,0,sizeof(name1));
} else {
snprintf(str1, sizeof(str1), "%s %d", g_Locale->getText(LOCALE_CI_EMPTY), i);
tempMenu = new CMenuWidget(str1, NEUTRINO_ICON_SETTINGS);
cammenu->addItem(new CMenuDForwarderNonLocalized(str1, false, NULL, tempMenu));
cammenu->addItem(new CMenuDForwarder(str1, false, NULL, tempMenu));
memset(str1,0,sizeof(str1));
}
if (i < (CiSlots - 1))
@@ -157,7 +157,7 @@ int CCAMMenuHandler::doMainMenu()
char tmp[32];
snprintf(tmp, sizeof(tmp), "ca_sc%d", i);
cammenu->addItem(new CMenuForwarderNonLocalized(name1, true, NULL, this, tmp, CRCInput::RC_1 + cnt++));
cammenu->addItem(new CMenuForwarder(name1, true, NULL, this, tmp, CRCInput::RC_1 + cnt++));
#if 0 // FIXME not implemented yet
snprintf(tmp, sizeof(tmp), "ca_sc_reset%d", i);
cammenu->addItem(new CMenuForwarder(LOCALE_SC_RESET, true, NULL, this, tmp));
@@ -166,7 +166,7 @@ int CCAMMenuHandler::doMainMenu()
} else {
snprintf(str1, sizeof(str1), "%s %d", g_Locale->getText(LOCALE_SC_EMPTY), i);
tempMenu = new CMenuWidget(str1, NEUTRINO_ICON_SETTINGS);
cammenu->addItem(new CMenuDForwarderNonLocalized(str1, false, NULL, tempMenu));
cammenu->addItem(new CMenuDForwarder(str1, false, NULL, tempMenu));
memset(str1,0,sizeof(str1));
}
if (i < (ScNum - 1))
@@ -330,27 +330,27 @@ int CCAMMenuHandler::handleCamMsg (const neutrino_msg_t msg, neutrino_msg_data_t
bpos = 0;
tptr[li] = 0;
printf("CCAMMenuHandler::handleCamMsg: subtitle: %s\n", sptr);
menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(sptr, strlen(sptr), 0).c_str(), false));
menu->addItem(new CMenuForwarder(convertDVBUTF8(sptr, strlen(sptr), 0).c_str(), false));
sptr = &tptr[li+1];
}
bpos++;
}
if(strlen(sptr)) {
printf("CCAMMenuHandler::handleCamMsg: subtitle: %s\n", sptr);
menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(sptr, strlen(sptr), 0).c_str(), false));
menu->addItem(new CMenuForwarder(convertDVBUTF8(sptr, strlen(sptr), 0).c_str(), false));
}
}
for(i = 0; (i < pMenu->choice_nb) && (i < MAX_MMI_ITEMS); i++) {
snprintf(cnt, sizeof(cnt), "%d", i);
if(sublevel)
menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(pMenu->choice_item[i], strlen(pMenu->choice_item[i]), 0).c_str(), true, NULL, selector, cnt));
menu->addItem(new CMenuForwarder(convertDVBUTF8(pMenu->choice_item[i], strlen(pMenu->choice_item[i]), 0).c_str(), true, NULL, selector, cnt));
else
menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(pMenu->choice_item[i], strlen(pMenu->choice_item[i]), 0).c_str(), true, NULL, selector, cnt, CRCInput::convertDigitToKey(i+1)));
menu->addItem(new CMenuForwarder(convertDVBUTF8(pMenu->choice_item[i], strlen(pMenu->choice_item[i]), 0).c_str(), true, NULL, selector, cnt, CRCInput::convertDigitToKey(i+1)));
}
slen = strlen(pMenu->bottom);
if(slen) {
printf("CCAMMenuHandler::handleCamMsg: bottom: %s\n", pMenu->bottom);
menu->addItem(new CMenuForwarderNonLocalized(convertDVBUTF8(pMenu->bottom, slen, 0).c_str(), false));
menu->addItem(new CMenuForwarder(convertDVBUTF8(pMenu->bottom, slen, 0).c_str(), false));
}
menu->exec(NULL, "");