diff options
author | svntcreutz <svntcreutz@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-08-19 23:19:00 +0000 |
---|---|---|
committer | svntcreutz <svntcreutz@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-08-19 23:19:00 +0000 |
commit | 7ee95418c543dd4f1c53facf937a043eb8dfc5f4 (patch) | |
tree | 9b789fcd8ca55d00b057a3eea041fa17ec85ea8b | |
parent | a703868bfb6822a111648d0167cd3a4de62b22ee (diff) | |
download | vdr-plugin-menuorg-7ee95418c543dd4f1c53facf937a043eb8dfc5f4.tar.gz vdr-plugin-menuorg-7ee95418c543dd4f1c53facf937a043eb8dfc5f4.tar.bz2 |
reverted command stuff changes in dtd and added it in _dtd const
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/submenu/trunk@5840 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | menuorg.dtd | 20 | ||||
-rw-r--r-- | src/menuconfiguration.cpp | 11 |
3 files changed, 25 insertions, 8 deletions
@@ -2,7 +2,7 @@ Some Stuff that whe would integrade in future version: - Setup OSD for managing the submenu -- reload the config file when openuing mainmenu (only when menu configuration has been changed - checking timestamp of xml!) +- reload the config file when opening mainmenu (only when menu configuration has been changed - checking timestamp of xml!) - alternate titles for plugins - command handling like the setup plugin - Enable / Disable in OSD-Setup diff --git a/menuorg.dtd b/menuorg.dtd index 576c9c8..f0399db 100644 --- a/menuorg.dtd +++ b/menuorg.dtd @@ -19,10 +19,22 @@ $Id$ --> -<!ELEMENT menus ((menu | system | plugin)+)> <!ELEMENT menu ((menu | system | plugin)+)> -<!ATTLIST menu name CDATA #REQUIRED> +<!ATTLIST menu + name CDATA #REQUIRED +> <!ELEMENT system EMPTY> -<!ATTLIST system name CDATA #REQUIRED> +<!ATTLIST system + name CDATA #REQUIRED +> <!ELEMENT plugin EMPTY> -<!ATTLIST plugin name CDATA #REQUIRED> +<!ATTLIST plugin + name CDATA #REQUIRED +> +<!ELEMENT command EMPTY> +<!ATTLIST plugin + name CDATA #REQUIRED + execute CDATA #REQUIRED + confirm (yes|no) #IMPLIED +> +<!ELEMENT menus ((menu | system | plugin | command)+)> diff --git a/src/menuconfiguration.cpp b/src/menuconfiguration.cpp index 11f0820..b95c330 100644 --- a/src/menuconfiguration.cpp +++ b/src/menuconfiguration.cpp @@ -33,13 +33,18 @@ using namespace xmlpp; using namespace std; const string MenuConfiguration::_dtd = - "<!ELEMENT menus ((menu | system | plugin)+)>\n" + "<!ELEMENT menus ((menu | system | plugin | command)+)>\n" "<!ELEMENT menu ((menu | system | plugin)+)>\n" "<!ATTLIST menu name CDATA #REQUIRED>\n" "<!ELEMENT system EMPTY>\n" "<!ATTLIST system name CDATA #REQUIRED>\n" "<!ELEMENT plugin EMPTY>\n" - "<!ATTLIST plugin name CDATA #REQUIRED>\n"; + "<!ATTLIST plugin name CDATA #REQUIRED>\n" + "<!ELEMENT command EMPTY>\n" + "<!ATTLIST command\n" + " name CDATA #REQUIRED\n" + " execute CDATA #REQUIRED\n" + " confirm (yes|no) #IMPLIED>"; MenuNode* MenuConfiguration::LoadMenu(string menuFileName) { @@ -61,7 +66,7 @@ MenuNode* MenuConfiguration::LoadMenu(string menuFileName) const Element* rootElement = parser.get_document()->get_root_node(); ParseElement(rootElement, menuRoot); - + AddUnconfiguredPlugins(menuRoot); } catch(const std::exception& ex) |