summaryrefslogtreecommitdiff
path: root/src/xmlmenu.cpp
diff options
context:
space:
mode:
authorsvntcreutz <svntcreutz@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-07-27 17:27:06 +0000
committersvntcreutz <svntcreutz@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-07-27 17:27:06 +0000
commit8c748c9a7bcf7d960b2c76b52a42a6b3b1707334 (patch)
tree67cda201654377b26a208c822b4cb03e6995d062 /src/xmlmenu.cpp
parented6354cf1ee86626d0b1fefe4eaabb3b4365002d (diff)
downloadvdr-plugin-menuorg-8c748c9a7bcf7d960b2c76b52a42a6b3b1707334.tar.gz
vdr-plugin-menuorg-8c748c9a7bcf7d960b2c76b52a42a6b3b1707334.tar.bz2
check for Commands.Count() added
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/submenu/trunk@5656 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
Diffstat (limited to 'src/xmlmenu.cpp')
-rw-r--r--src/xmlmenu.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/xmlmenu.cpp b/src/xmlmenu.cpp
index 84d8e31..d1f318e 100644
--- a/src/xmlmenu.cpp
+++ b/src/xmlmenu.cpp
@@ -82,15 +82,19 @@ void XmlMenu::parseNode(const Node* a_node, unsigned int Parent, unsigned int It
const Attribute* attribute = *iter;
//cout << Parent << "-" << MainMenuIndex << "-" << myMenuNr << "-SystemItem=" << attribute->get_value() << endl;
isyslog("%d-%d-%d-SystemItem=%s",Parent,ItemIndex,MenuIndex,attribute->get_value().data());
- if(MenuIndex > 0)
+ eOSState ItemeOSState = geteOSState(attribute->get_value());
+ if ((ItemeOSState == osCommands && Commands.Count()) || ItemeOSState != osCommands)
{
- isyslog(" - add to _subMenu[%d]",MenuIndex);
- _subMenu[MenuIndex]->AddChild(new VdrMenuItem(tr(attribute->get_value().data()), geteOSState(attribute->get_value())));
- }
- else
- {
- isyslog(" - add to _rootMenuNode");
- _rootMenuNode.AddChild(new VdrMenuItem(tr(attribute->get_value().data()), geteOSState(attribute->get_value())));
+ if(MenuIndex > 0)
+ {
+ isyslog(" - add to _subMenu[%d]",MenuIndex);
+ _subMenu[MenuIndex]->AddChild(new VdrMenuItem(tr(attribute->get_value().data()), geteOSState(attribute->get_value())));
+ }
+ else
+ {
+ isyslog(" - add to _rootMenuNode");
+ _rootMenuNode.AddChild(new VdrMenuItem(tr(attribute->get_value().data()), geteOSState(attribute->get_value())));
+ }
}
}
}