summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-07-09 00:14:42 +0200
committerlouis <louis.braun@gmx.de>2015-07-09 00:14:42 +0200
commit14f96b867700c72fe1319ce9307048e508314968 (patch)
tree0179732a7b0814785a7bc5bc743e3d42c651ef7e
parentce49462ca7d0601d7edf9448df0e5169ebdc1f1c (diff)
downloadvdr-plugin-skindesigner-14f96b867700c72fe1319ce9307048e508314968.tar.gz
vdr-plugin-skindesigner-14f96b867700c72fe1319ce9307048e508314968.tar.bz2
fixed bug displaying wrong headers in skin setup submenus
-rw-r--r--HISTORY1
-rw-r--r--setup.c23
-rw-r--r--setup.h6
3 files changed, 17 insertions, 13 deletions
diff --git a/HISTORY b/HISTORY
index e3b09ea..435fffd 100644
--- a/HISTORY
+++ b/HISTORY
@@ -380,4 +380,5 @@ Version 0.5.3
displaymenureplaycurrentview
- immplemented areacontainers to group areas
- fixed bug displaying pixmaps with transparency
+- fixed bug displaying wrong headers in skin setup submenus
diff --git a/setup.c b/setup.c
index 036723f..1f2f22f 100644
--- a/setup.c
+++ b/setup.c
@@ -173,7 +173,7 @@ eOSState cSkinDesignerSetup::ProcessKey(eKeys Key) {
// KEY OK
if ((Key == kOk)) {
if (type == itSkinSetup) {
- state = AddSubMenu(new cSkindesignerSkinSetup(currentSkin, ""));
+ state = AddSubMenu(new cSkindesignerSkinSetup(currentSkin, "", ""));
} else if (type == itNoSkinSetup) {
state = osContinue;
} else if (type == itSkinRepo) {
@@ -354,15 +354,16 @@ cSkinMenuItem::cSkinMenuItem(string skinName, string displayText, eItemType type
// --- cSkinSetupSubMenu -----------------------------------------------------------
cSkinSetupSubMenu::cSkinSetupSubMenu(string name, string displayText) : cOsdItem(displayText.c_str()) {
this->name = name;
+ this->displayText = displayText;
}
// --- cSkindesignerSkinSetup -----------------------------------------------------------
-cSkindesignerSkinSetup::cSkindesignerSkinSetup(string skin, string name) :
-cOsdMenu(*cString::sprintf("%s: %s \"%s\" %s", trVDR("Setup"), tr("Skin"), skin.c_str(), name.c_str()), 30) {
+cSkindesignerSkinSetup::cSkindesignerSkinSetup(string skin, string menu, string header) :
+cOsdMenu(*cString::sprintf("%s: %s \"%s\" %s", trVDR("Setup"), tr("Skin"), skin.c_str(), header.c_str()), 30) {
SetMenuCategory(mcPluginSetup);
this->skin = skin;
- this->name = name;
+ this->menu = menu;
Set();
}
@@ -380,7 +381,7 @@ eOSState cSkindesignerSkinSetup::ProcessKey(eKeys Key) {
cOsdItem *current = Get(Current());
cSkinSetupSubMenu *subMenuItem = dynamic_cast<cSkinSetupSubMenu*>(current);
if (subMenuItem) {
- state = AddSubMenu(new cSkindesignerSkinSetup(skin, subMenuItem->GetName()));
+ state = AddSubMenu(new cSkindesignerSkinSetup(skin, subMenuItem->GetName(), subMenuItem->GetDisplayText()));
break;
} else {
return osBack;
@@ -416,8 +417,8 @@ eOSState cSkindesignerSkinSetup::ProcessKey(eKeys Key) {
}
void cSkindesignerSkinSetup::Set(void) {
- cSkinSetupMenu *menu = config.GetSkinSetupMenu(skin, name);
- if (!menu) {
+ cSkinSetupMenu *setupMenu = config.GetSkinSetupMenu(skin, menu);
+ if (!setupMenu) {
return;
}
@@ -429,9 +430,9 @@ void cSkindesignerSkinSetup::Set(void) {
SetHelp(NULL, NULL, tr("Delete Skin"), NULL);
}
- menu->InitParameterIterator();
+ setupMenu->InitParameterIterator();
cSkinSetupParameter *param = NULL;
- while (param = menu->GetNextParameter(false)) {
+ while (param = setupMenu->GetNextParameter(false)) {
if (param->type == sptInt) {
Add(new cMenuEditIntItem(param->displayText.c_str(), &param->value, param->min, param->max));
} else if (param->type == sptBool) {
@@ -439,9 +440,9 @@ void cSkindesignerSkinSetup::Set(void) {
}
}
- menu->InitSubmenuIterator();
+ setupMenu->InitSubmenuIterator();
cSkinSetupMenu *subMenu = NULL;
- while (subMenu = menu->GetNextSubMenu(false)) {
+ while (subMenu = setupMenu->GetNextSubMenu(false)) {
Add(new cSkinSetupSubMenu(subMenu->GetName(), subMenu->GetDisplayText()));
}
}
diff --git a/setup.h b/setup.h
index d35993a..5e2f659 100644
--- a/setup.h
+++ b/setup.h
@@ -79,10 +79,12 @@ public:
class cSkinSetupSubMenu : public cOsdItem {
private:
string name;
+ string displayText;
public:
cSkinSetupSubMenu(string name, string displayText);
virtual ~cSkinSetupSubMenu() {};
string GetName(void) { return name; };
+ string GetDisplayText(void) { return displayText; };
};
// --- cSkindesignerSkinSetup -----------------------------------------------------------
@@ -90,12 +92,12 @@ public:
class cSkindesignerSkinSetup : public cOsdMenu, cInstallManager {
private:
string skin;
- string name;
+ string menu;
protected:
virtual eOSState ProcessKey(eKeys Key);
void Set(void);
public:
- cSkindesignerSkinSetup(string skin, string menu);
+ cSkindesignerSkinSetup(string skin, string menu, string header);
virtual ~cSkindesignerSkinSetup();
};