Rename GetActive() to GetNumActive()

This commit is contained in:
kamel5 2019-11-10 13:24:22 +01:00
parent 0289731158
commit c3dbae705a
3 changed files with 11 additions and 11 deletions

View File

@ -346,7 +346,7 @@ void cRecMenu::PageUp(void) {
Activate(footer, menuItems.front());
return;
}
int newActive = GetActive() - numItems;
int newActive = GetNumActive() - numItems;
if (newActive < 0)
newActive = 0;
activeItem->setInactive();
@ -371,7 +371,7 @@ void cRecMenu::PageUp(void) {
break;
}
}
if (GetActive() == numItems)
if (GetNumActive() == numItems)
menuItems.front()->setActive();
if (CalculateHeight(true))
CreatePixmap();
@ -390,7 +390,7 @@ void cRecMenu::PageDown(void) {
JumpEnd();
return;
}
int newActive = GetActive() + numItems;
int newActive = GetNumActive() + numItems;
activeItem->setInactive();
activeItem->setBackground();
ClearMenuItems();
@ -413,7 +413,7 @@ void cRecMenu::PageDown(void) {
break;
}
}
if (GetActive() == GetTotalNumMenuItems())
if (GetNumActive() == GetTotalNumMenuItems())
menuItems.back()->setActive();
if (CalculateHeight(true))
CreatePixmap();
@ -636,7 +636,7 @@ cRecMenuItem *cRecMenu::GetMenuItemAt(int num) {
return NULL;
}
int cRecMenu::GetActive(void) {
int cRecMenu::GetNumActive(void) {
int numActive = startIndex;
for (std::list<cRecMenuItem*>::iterator item = menuItems.begin(); item != menuItems.end(); item++) {
if ((*item)->isActive()) {

View File

@ -55,7 +55,7 @@ protected:
virtual int GetTotalNumMenuItems(void) { return 0; };
virtual void CreateMenuItems(void) {};
int GetStartIndex(void) { return startIndex; };
int GetActive(void);
int GetNumActive(void);
public:
cRecMenu(void);
virtual ~cRecMenu(void);

View File

@ -99,7 +99,7 @@ int cRecMenuAskFolder::GetTotalNumMenuItems(void) {
std::string cRecMenuAskFolder::GetFolder(void) {
std::string folder = "";
int folderActive = GetActive();
int folderActive = GetNumActive();
if (folderActive > 0 && folderActive < (int)folders.size() + 1)
folder = folders[folderActive - 1];
return folder;
@ -232,7 +232,7 @@ cRecMenuTimerConflicts::cRecMenuTimerConflicts(cTVGuideTimerConflicts *conflicts
}
int cRecMenuTimerConflicts::GetTimerConflict(void) {
return GetActive();
return GetNumActive();
}
// --- cRecMenuTimerConflict ---------------------------------------------------------
@ -305,7 +305,7 @@ int cRecMenuTimerConflict::GetTotalNumMenuItems(void) {
}
int cRecMenuTimerConflict::GetTimerConflictIndex(void) {
return GetActive();
return GetNumActive();
}
// --- cRecMenuNoTimerConflict ---------------------------------------------------------
@ -660,7 +660,7 @@ int cRecMenuSearchTimerTemplates::GetTotalNumMenuItems(void) {
TVGuideEPGSearchTemplate cRecMenuSearchTimerTemplates::GetTemplate(void) {
TVGuideEPGSearchTemplate templ;
int tmplActive = GetActive() - 1;
int tmplActive = GetNumActive() - 1;
if (tmplActive >= 0 && tmplActive < (int)templates.size())
templ = templates[tmplActive];
return templ;