diff options
-rw-r--r-- | pages/menu.ecpp | 6 | ||||
-rw-r--r-- | setup.cpp | 7 | ||||
-rw-r--r-- | setup.h | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/pages/menu.ecpp b/pages/menu.ecpp index aebd764..cc81879 100644 --- a/pages/menu.ecpp +++ b/pages/menu.ecpp @@ -24,7 +24,10 @@ std::string set_component; <a href="whats_on.html?type=next" <& menu.setactive current=("next") &>><$ tr("What's on next?") $></a> | <a href="schedule.html" <& menu.setactive current=("schedule") &>><$ tr("Schedule") $></a> | <a href="timers.html" <& menu.setactive current=("timers") &>><$ tr("Timers") $></a> | +% if (LiveSetup().HaveEPGSearch()) { + <a href="searchepg.html" <& menu.setactive current=("searchepg") &>><$ tr("Search") $></a> | <a href="searchtimers.html" <& menu.setactive current=("searchtimers") &>><$ tr("Searchtimers") $></a> | +% } <a href="recordings.html" <& menu.setactive current=("recordings") &>><$ tr("Recordings") $></a> | <a href="remote.html" <& menu.setactive current=("remote") &>><$ tr("Remote Control") $></a> % if (LiveSetup().UseAuth()) { @@ -39,7 +42,10 @@ std::string set_component; <& menu.component current=("next") &> <& menu.component current=("schedule") &> <& menu.component current=("timers") &> +% if (LiveSetup().HaveEPGSearch()) { + <& menu.component current=("search") &> <& menu.component current=("searchtimers") &> +% } <& menu.component current=("recordings") &> <& menu.component current=("remote") &> </div> @@ -12,6 +12,7 @@ #include <arpa/inet.h> #include <vdr/tools.h> #include <vdr/menuitems.h> +#include <vdr/plugin.h> #include "setup.h" namespace vdrlive { @@ -101,6 +102,11 @@ bool Setup::CheckServerIps() return true; } +bool Setup::HaveEPGSearch(void) +{ + return cPluginManager::GetPlugin("epgsearch") != NULL; +} + Setup& LiveSetup() { static Setup instance; @@ -140,6 +146,7 @@ void cMenuSetupLive::Store(void) SetupStore("AdminPassword", m_adminPassword); } + } // namespace vdrlive @@ -42,7 +42,7 @@ public: char const* CommandLineHelp() const; bool ParseSetupEntry( char const* name, char const* value ); - + bool HaveEPGSearch(void); private: Setup(); Setup( Setup const& ); |