mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Rename GetActive() to GetNumActive()
This commit is contained in:
parent
0289731158
commit
c3dbae705a
10
recmenu.c
10
recmenu.c
@ -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()) {
|
||||
|
@ -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);
|
||||
|
10
recmenus.c
10
recmenus.c
@ -61,7 +61,7 @@ cRecMenuAskFolder::cRecMenuAskFolder(const cEvent *event, eRecMenuState nextActi
|
||||
SetWidthPercent(80);
|
||||
|
||||
NextAction = nextAction;
|
||||
|
||||
|
||||
const cString line1 = tr("Set Folder for");
|
||||
const cString line2 = (event && event->Title()) ? cString::sprintf("\"%s\"", event->Title()) : "";
|
||||
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user