summaryrefslogtreecommitdiff
path: root/displaymenu.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-06-04 16:22:26 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-06-06 14:20:07 +0200
commit988fb688bcb6d70ab20311b34409c5d6b17474b0 (patch)
tree68cff1f910a186e2df05efeb46b8be847207fb6c /displaymenu.c
parent0ea065bf544ad07409ea782d064bb7fbef27e2f3 (diff)
downloadskin-nopacity-988fb688bcb6d70ab20311b34409c5d6b17474b0.tar.gz
skin-nopacity-988fb688bcb6d70ab20311b34409c5d6b17474b0.tar.bz2
Rework CreateOsd()
With this change it is possible to make various functions in cNopacityDisplayChannelView and cNopacityDisplayMenuView private.
Diffstat (limited to 'displaymenu.c')
-rw-r--r--displaymenu.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/displaymenu.c b/displaymenu.c
index da3ae7b..e960b13 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -23,12 +23,8 @@ cNopacityDisplayMenu::cNopacityDisplayMenu(void) {
currentNumItems = 0;
detailView = NULL;
SetButtonPositions();
- menuView = new cNopacityDisplayMenuView();
- osd = menuView->createOsd();
- menuView->SetDescriptionTextWindowSize();
- menuView->CreatePixmaps();
- menuView->DrawHeaderLogo();
- menuView->DrawBorderDecoration();
+ osd = CreateOsd(geoManager->osdLeft, geoManager->osdTop, geoManager->osdWidth, geoManager->osdHeight);
+ menuView = new cNopacityDisplayMenuView(osd);
currentFeed = 0;
SetTabs(0);
}
@@ -37,11 +33,11 @@ cNopacityDisplayMenu::~cNopacityDisplayMenu(void) {
Cancel(-1);
while (Active())
cCondWait::SleepMs(10);
- delete menuView;
- menuItems.clear();
if (detailView) {
delete detailView;
}
+ delete menuView;
+ menuItems.clear();
timers.Clear();
delete osd;
cDevice::PrimaryDevice()->ScaleVideo(cRect::Null);
@@ -204,10 +200,7 @@ int cNopacityDisplayMenu::MaxItems(void) {
}
void cNopacityDisplayMenu::Clear(void) {
- if (detailView) {
- delete detailView;
- detailView = NULL;
- }
+ DELETENULL(detailView);
menuItems.clear();
}
@@ -245,6 +238,9 @@ void cNopacityDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) {
*/
menuCategoryLast = this->MenuCategory();
cSkinDisplayMenu::SetMenuCategory(MenuCategory);
+ if ((MenuCategory != mcRecordingInfo) && (MenuCategory != mcEvent && MenuCategory != mcText)) {
+ DELETENULL(detailView);
+ }
if ((menuCategoryLast == mcMain) && (MenuCategory != mcMain)) {
if (config.GetValue("showDiscUsage")) {
menuView->ShowDiskUsage(false);