diff options
author | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-08-22 20:50:26 +0000 |
---|---|---|
committer | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-08-22 20:50:26 +0000 |
commit | de091d32e123f04f2b1fa2bea9ae9b45496340a0 (patch) | |
tree | 5af22cdd1e5994d0cff72b3b2cb4b6c9432731bf /src/mainmenuitemsprovider.cpp | |
parent | 54e648eede3fdc586048091dc573551cab08f09f (diff) | |
download | vdr-plugin-menuorg-de091d32e123f04f2b1fa2bea9ae9b45496340a0.tar.gz vdr-plugin-menuorg-de091d32e123f04f2b1fa2bea9ae9b45496340a0.tar.bz2 |
added childlock service - untested yet
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/submenu/trunk@5845 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
Diffstat (limited to 'src/mainmenuitemsprovider.cpp')
-rw-r--r-- | src/mainmenuitemsprovider.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mainmenuitemsprovider.cpp b/src/mainmenuitemsprovider.cpp index 31a1744..916034f 100644 --- a/src/mainmenuitemsprovider.cpp +++ b/src/mainmenuitemsprovider.cpp @@ -25,6 +25,7 @@ #include "systemmenunode.h" #include "pluginmenunode.h" #include <vdr/plugin.h> +#include "childlock.h" MainMenuItemsProvider::MainMenuItemsProvider(MenuNode* rootMenu) { @@ -71,7 +72,10 @@ void MainMenuItemsProvider::EnterSubMenu(cOsdItem* item) int itemIndex = IndexOfCustomOsdItem(item); if (itemIndex >= 0) { - _currentMenu = _currentMenu->Childs().at(itemIndex); + if (!ChildLock::IsMenuProtected(item->Text())) + { + _currentMenu = _currentMenu->Childs().at(itemIndex); + } } } @@ -93,7 +97,10 @@ cOsdMenu* MainMenuItemsProvider::Execute(cOsdItem* item) int itemIndex = IndexOfCustomOsdItem(item); if (itemIndex >= 0) { - return _currentMenu->Childs().at(itemIndex)->Execute(); + if (!ChildLock::IsMenuProtected(item->Text())) + { + return _currentMenu->Childs().at(itemIndex)->Execute(); + } } } |