summaryrefslogtreecommitdiff
path: root/src/menuconfiguration.cpp
diff options
context:
space:
mode:
authorsvntcreutz <svntcreutz@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-08-26 00:48:54 +0000
committersvntcreutz <svntcreutz@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f>2007-08-26 00:48:54 +0000
commitae81d6bd575ea768cfe062b88423edc4ab1a6054 (patch)
tree5bf31d645baef3738ba63a22a6ee6a04ab31d064 /src/menuconfiguration.cpp
parenteb6ec2590134ba16816020ed570e1b8b75fe08ac (diff)
downloadvdr-plugin-menuorg-ae81d6bd575ea768cfe062b88423edc4ab1a6054.tar.gz
vdr-plugin-menuorg-ae81d6bd575ea768cfe062b88423edc4ab1a6054.tar.bz2
alternate titles for plugins implimented
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/menuorg/trunk@5995 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
Diffstat (limited to 'src/menuconfiguration.cpp')
-rw-r--r--src/menuconfiguration.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/menuconfiguration.cpp b/src/menuconfiguration.cpp
index b9c01b4..4845f44 100644
--- a/src/menuconfiguration.cpp
+++ b/src/menuconfiguration.cpp
@@ -39,9 +39,13 @@ const string MenuConfiguration::_dtd =
"<!ELEMENT menu ((menu | system | plugin | command)+)>\n"
"<!ATTLIST menu name CDATA #REQUIRED>\n"
"<!ELEMENT system EMPTY>\n"
- "<!ATTLIST system name CDATA #REQUIRED>\n"
+ "<!ATTLIST system\n"
+ " name CDATA #REQUIRED\n"
+ " title CDATA #IMPLIED>\n"
"<!ELEMENT plugin EMPTY>\n"
- "<!ATTLIST plugin name CDATA #REQUIRED>\n"
+ "<!ATTLIST plugin\n"
+ " name CDATA #REQUIRED\n"
+ " title CDATA #IMPLIED>\n"
"<!ELEMENT command EMPTY>\n"
"<!ATTLIST command\n"
" name CDATA #REQUIRED\n"
@@ -104,10 +108,14 @@ void MenuConfiguration::ParseElement(const Element* element, MenuNode* menuNode)
}
else if (type == "system")
{
+ const xmlpp::Attribute* titleAttribute = childElement->get_attribute("title");
+ name = titleAttribute ? (string) UnicodeToLocaleOrIso8859(titleAttribute->get_value()) : name;
AddSystemMenuNode(name, menuNode);
}
else if (type == "plugin")
{
+ const xmlpp::Attribute* titleAttribute = childElement->get_attribute("title");
+ name = titleAttribute ? (string) UnicodeToLocaleOrIso8859(titleAttribute->get_value()) : name;
AddPluginMenuNode(name, menuNode);
}
else if (type == "command")
@@ -115,7 +123,7 @@ void MenuConfiguration::ParseElement(const Element* element, MenuNode* menuNode)
string execute = childElement->get_attribute("execute")->get_value();
const xmlpp::Attribute* confirmAttribute = childElement->get_attribute("confirm");
bool confirm = confirmAttribute ? (confirmAttribute->get_value() == "yes") : false;
- AddCommandMenuNode(name, execute, confirm, menuNode);
+ AddCommandMenuNode(name, execute, confirm, menuNode);
}
}
}