From 891e608a185e1cde99ce327feeb59f6d176d68c9 Mon Sep 17 00:00:00 2001 From: svntobi Date: Sun, 26 Aug 2007 09:31:12 +0000 Subject: - Fixed system menu node creation - Changed parameter order - Use default paramter title="" for PluginMenuNode git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/menuorg/trunk@5997 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f --- src/menuconfiguration.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/menuconfiguration.cpp') diff --git a/src/menuconfiguration.cpp b/src/menuconfiguration.cpp index c8b0f0e..e3a9d3b 100644 --- a/src/menuconfiguration.cpp +++ b/src/menuconfiguration.cpp @@ -109,14 +109,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); + string title = titleAttribute ? (string) UnicodeToLocaleOrIso8859(titleAttribute->get_value()) : name; + AddSystemMenuNode(name, title, menuNode); } else if (type == "plugin") { const xmlpp::Attribute* titleAttribute = childElement->get_attribute("title"); string title = titleAttribute ? (string) UnicodeToLocaleOrIso8859(titleAttribute->get_value()) : name; - AddPluginMenuNode(name, menuNode, title); + AddPluginMenuNode(name, title, menuNode); } else if (type == "command") { @@ -134,12 +134,12 @@ MenuNode* MenuConfiguration::AddSubMenuNode(string name, MenuNode* menu) return menu->AddChild(new SubMenuNode(name)); } -void MenuConfiguration::AddSystemMenuNode(string name, MenuNode* menu) +void MenuConfiguration::AddSystemMenuNode(string name, string title, MenuNode* menu) { - menu->AddChild(new SystemMenuNode(name, MenuTextToVdrState(name))); + menu->AddChild(new SystemMenuNode(title, MenuTextToVdrState(name))); } -void MenuConfiguration::AddPluginMenuNode(string pluginName, MenuNode* menu, string title) +void MenuConfiguration::AddPluginMenuNode(string pluginName, string title, MenuNode* menu) { int pluginIndex; cPlugin* plugin; -- cgit v1.2.3