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

View File

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

View File

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