summaryrefslogtreecommitdiff
path: root/src/menusetup.cpp
diff options
context:
space:
mode:
authorsvntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-08-26 14:37:01 +0000
committersvntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-08-26 14:37:01 +0000
commit926b492183dd2b598587e962f952dabf9401f56c (patch)
treedbed3f72a727558e896b7991a83fadc46a7df023 /src/menusetup.cpp
parent7ee0187d94b02ed3ae0ddcf4999cf0487a2d9ad9 (diff)
downloadvdr-plugin-menuorg-926b492183dd2b598587e962f952dabf9401f56c.tar.gz
vdr-plugin-menuorg-926b492183dd2b598587e962f952dabf9401f56c.tar.bz2
passing menu configuration to menusetup
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/menuorg/trunk@6005 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
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)