summaryrefslogtreecommitdiff
path: root/displaymenu.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-02-16 13:57:27 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-03-10 16:42:52 +0100
commit03337e57fdd83344d9b24ffcad394e76d5f92007 (patch)
tree45076068b910c2269bd14764b923b0391af4253b /displaymenu.c
parentdaf3245de7437d287dc101db1d262848b2e4ad50 (diff)
downloadskin-nopacity-03337e57fdd83344d9b24ffcad394e76d5f92007.tar.gz
skin-nopacity-03337e57fdd83344d9b24ffcad394e76d5f92007.tar.bz2
Make imgCache global
Make imgcache global so that it doesn't always have to be passed explicitly to other functions.
Diffstat (limited to 'displaymenu.c')
-rw-r--r--displaymenu.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 4ea103f..86045f6 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -11,8 +11,7 @@ namespace PluginRemoteTimers {
#include <string>
#include "services/epgsearch.h"
-cNopacityDisplayMenu::cNopacityDisplayMenu(cImageCache *imgCache) {
- this->imgCache = imgCache;
+cNopacityDisplayMenu::cNopacityDisplayMenu(void) {
menuCategoryLast = mcUndefined;
FadeTime = config.GetValue("menuFadeTime");
FrameTime = FadeTime / 10;
@@ -24,7 +23,7 @@ cNopacityDisplayMenu::cNopacityDisplayMenu(cImageCache *imgCache) {
currentNumItems = 0;
detailView = NULL;
SetButtonPositions();
- menuView = new cNopacityDisplayMenuView(imgCache);
+ menuView = new cNopacityDisplayMenuView();
osd = menuView->createOsd();
menuView->SetDescriptionTextWindowSize();
menuView->CreatePixmaps();
@@ -34,7 +33,7 @@ cNopacityDisplayMenu::cNopacityDisplayMenu(cImageCache *imgCache) {
SetTabs(0);
}
-cNopacityDisplayMenu::~cNopacityDisplayMenu() {
+cNopacityDisplayMenu::~cNopacityDisplayMenu(void) {
Cancel(-1);
while (Active())
cCondWait::SleepMs(10);
@@ -364,7 +363,7 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur
if ((int)menuItems.size() <= Index)
menuItems.resize(currentNumItems);
if (!menuItems[Index]) {
- cNopacityMenuItem *item = new cNopacityScheduleMenuItem(osd, imgCache, Event, Channel, TimerMatch, Selectable, MenuCategory(), &videoWindowRect);
+ cNopacityMenuItem *item = new cNopacityScheduleMenuItem(osd, Event, Channel, TimerMatch, Selectable, MenuCategory(), &videoWindowRect);
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
@@ -406,7 +405,7 @@ bool cNopacityDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Cur
if ((int)menuItems.size() <= Index)
menuItems.resize(currentNumItems);
if (!menuItems[Index]) {
- cNopacityMenuItem *item = new cNopacityTimerMenuItem(osd, imgCache, Timer, Selectable, &videoWindowRect);
+ cNopacityMenuItem *item = new cNopacityTimerMenuItem(osd, Timer, Selectable, &videoWindowRect);
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
@@ -448,7 +447,7 @@ bool cNopacityDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bo
if ((int)menuItems.size() <= Index)
menuItems.resize(currentNumItems);
if (!menuItems[Index]) {
- cNopacityMenuItem *item = new cNopacityChannelMenuItem(osd, imgCache, Channel, Selectable, &videoWindowRect);
+ cNopacityMenuItem *item = new cNopacityChannelMenuItem(osd, Channel, Selectable, &videoWindowRect);
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
@@ -493,7 +492,7 @@ bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Ind
bool isFolder = false;
if (Total > 0)
isFolder = true;
- cNopacityMenuItem *item = new cNopacityRecordingMenuItem(osd, imgCache, Recording, Selectable, isFolder, Level, Total, New, &videoWindowRect);
+ cNopacityMenuItem *item = new cNopacityRecordingMenuItem(osd, Recording, Selectable, isFolder, Level, Total, New, &videoWindowRect);
cPoint itemSize;
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
@@ -551,14 +550,14 @@ void cNopacityDisplayMenu::SetItem(const char *Text, int Index, bool Current, bo
if (((MenuCategory() == mcMain)&&(config.GetValue("narrowMainMenu"))) || ((MenuCategory() == mcSetup)&&(config.GetValue("narrowSetupMenu")))){
MainOrSetup = true;
bool isSetup = (MenuCategory() == mcSetup)?true:false;
- item = new cNopacityMainMenuItem(osd, imgCache, Text, Selectable, isSetup);
+ item = new cNopacityMainMenuItem(osd, Text, Selectable, isSetup);
menuItems[Index].reset(item);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
item->SetFont(fontManager->menuItemLarge);
if (config.GetValue("useMenuIcons"))
hasIcons = true;
} else {
- item = new cNopacityDefaultMenuItem(osd, imgCache, Text, Selectable);
+ item = new cNopacityDefaultMenuItem(osd, Text, Selectable);
menuItems[Index].reset(item);
menuView->GetMenuItemSize(mcUnknown, &itemSize);
item->SetFont(fontManager->menuItemDefault);
@@ -648,7 +647,7 @@ void cNopacityDisplayMenu::SetEvent(const cEvent *Event) {
if (!Event)
return;
menuView->AdjustContentBackground(this->MenuCategory(), menuCategoryLast, videoWindowRect);
- detailView = new cNopacityDetailView(dvEvent, osd, imgCache);
+ detailView = new cNopacityDetailView(dvEvent, osd);
menuView->SetDetailViewSize(dvEvent, detailView);
detailView->SetEvent(Event);
detailView->Start();
@@ -662,7 +661,7 @@ void cNopacityDisplayMenu::SetRecording(const cRecording *Recording) {
return;
}
menuView->AdjustContentBackground(this->MenuCategory(), menuCategoryLast, videoWindowRect);
- detailView = new cNopacityDetailView(dvRecording, osd, imgCache);
+ detailView = new cNopacityDetailView(dvRecording, osd);
menuView->SetDetailViewSize(dvRecording, detailView);
detailView->SetRecording(Recording);
detailView->Start();
@@ -672,7 +671,7 @@ void cNopacityDisplayMenu::SetText(const char *Text, bool FixedFont) {
if (!Text)
return;
menuView->AdjustContentBackground(this->MenuCategory(), menuCategoryLast, videoWindowRect);
- detailView = new cNopacityDetailView(dvText, osd, imgCache);
+ detailView = new cNopacityDetailView(dvText, osd);
menuView->SetDetailViewSize(dvText, detailView);
detailView->SetText(Text);
detailView->Start();