summaryrefslogtreecommitdiff
path: root/src/menusetup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/menusetup.cpp')
-rw-r--r--src/menusetup.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/menusetup.cpp b/src/menusetup.cpp
index a9f9495..81f0103 100644
--- a/src/menusetup.cpp
+++ b/src/menusetup.cpp
@@ -20,14 +20,36 @@
*
*/
-#include <vdr/menu.h>
#include "menusetup.h"
+#include <vdr/menu.h>
+#include <libxml++/libxml++.h>
+#include "menuconfiguration.h"
-cMenuSetup::cMenuSetup(void)
-:cOsdMenu(tr("MENU"),25)
+using namespace xmlpp;
+using namespace std;
+
+cMenuSetup::cMenuSetup(MenuConfiguration& menuConfiguration)
+:cOsdMenu(tr("MENU"),25),_menuConfiguration(menuConfiguration)
{
//TODO
+
+ Element* root = _menuConfiguration.Configuration();
+
+ Node::NodeList children = root->get_children();
+ for (Node::NodeList::iterator i = children.begin(); i != children.end(); i++)
+ {
+ const Element* childElement = dynamic_cast<const Element*>(*i);
+
+ if (childElement)
+ {
+ const Attribute* nameAttribute = childElement->get_attribute("name");
+ string type = childElement->get_name();
+ string name = nameAttribute->get_value();
+
+ Add(new cOsdItem(name.c_str(), osUser1));
+ }
+ }
}
eOSState cMenuSetup::ProcessKey(eKeys Key)