diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/menuitemsetup.cpp | 4 | ||||
-rw-r--r-- | src/menusetup.cpp | 10 | ||||
-rw-r--r-- | src/osdxmlitem.cpp | 11 | ||||
-rw-r--r-- | src/osdxmlitem.h | 2 |
4 files changed, 14 insertions, 13 deletions
diff --git a/src/menuitemsetup.cpp b/src/menuitemsetup.cpp index a1ad726..7b485ba 100644 --- a/src/menuitemsetup.cpp +++ b/src/menuitemsetup.cpp @@ -32,9 +32,9 @@ cMenuItemSetup::cMenuItemSetup(cOsdXmlItem* osdXmlItem) itemTypeText[2] = "Submenu"; itemTypeText[3] = "Command"; - Add(new cMenuEditStraItem(tr("Item Type"),&_itemType, 4, itemTypeText)); + Add(new cMenuEditStraItem(tr("Item Type"), (int*) &_newItemType, 4, itemTypeText)); - switch(_itemType) + switch(_newItemType) { case 0: // Add listItem of valid System Items diff --git a/src/menusetup.cpp b/src/menusetup.cpp index 13a1502..1f7372b 100644 --- a/src/menusetup.cpp +++ b/src/menusetup.cpp @@ -64,7 +64,7 @@ void cMenuOrgSetup::CreateMenuItems(const Element* menuRoot, int iCount) if ( type == "menu" && _flatMenuSetup) { name = "+" + name; - Add(new cOsdXmlItem(name.c_str(), childElement)); + Add(new cOsdXmlItem(name.c_str(), childElement, osUnknown)); CreateMenuItems(childElement, iCount+1); } else @@ -72,7 +72,7 @@ void cMenuOrgSetup::CreateMenuItems(const Element* menuRoot, int iCount) if(iCount > 0) name = " " + name; - Add(new cOsdXmlItem(name.c_str(), childElement)); + Add(new cOsdXmlItem(name.c_str(), childElement, osUnknown)); } } } @@ -101,8 +101,10 @@ eOSState cMenuOrgSetup::ProcessKey(eKeys Key) break; case kGreen: - cOsdItem *item=Get(Current()); - state = AddSubMenu(new cMenuItemSetup(item)); + { + cOsdXmlItem *item = (cOsdXmlItem*) Get(Current()); + state = AddSubMenu(new cMenuItemSetup(item)); + } break; case kYellow: diff --git a/src/osdxmlitem.cpp b/src/osdxmlitem.cpp index 653f932..f42139c 100644 --- a/src/osdxmlitem.cpp +++ b/src/osdxmlitem.cpp @@ -20,19 +20,18 @@ * */ +#include <string> #include <vdr/menu.h> #include <libxml++/libxml++.h> +#include "osdxmlitem.h" + +using namespace std; cOsdXmlItem::cOsdXmlItem(const char* Text, const xmlpp::Element* xmlElement, eOSState State=osUnknown) +: cOsdItem() { - text = NULL; - offset = -1; - state = State; - selectable = true; - fresh = true; _xmlElement = xmlElement; parseXmlElement(); - SetText(Text); } void cOsdXmlItem::parseXmlElement(void) diff --git a/src/osdxmlitem.h b/src/osdxmlitem.h index 041a6c7..1167f3d 100644 --- a/src/osdxmlitem.h +++ b/src/osdxmlitem.h @@ -51,7 +51,7 @@ class cOsdXmlItem: public cOsdItem string _confirmAttribute; public: - cOsdXmlItem(const char* Text, const xmlpp::Element* xmlElement, eOSState State=osUnknown); + cOsdXmlItem(const char* Text, const xmlpp::Element* xmlElement, eOSState State); sItemType getItemType(void); string getNameAttribute(void); |