From 883be2c8cade7d68dc743c17bedda6f675a787ba Mon Sep 17 00:00:00 2001 From: Sascha Volkenandt Date: Fri, 1 Jun 2007 19:57:29 +0000 Subject: - added uniform features detector --- pages/pageelems.ecpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'pages') diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 6e03ca8..928e7b5 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -2,8 +2,8 @@ #include #include #include -#include "epgsearch.h" #include "exception.h" +#include "livefeatures.h" #include "i18n.h" #include "setup.h" #include "timers.h" @@ -12,16 +12,6 @@ using namespace std; using namespace vdrlive; -static bool HasEpgsearch() -{ - bool result = false; - try { - result = CheckEpgsearchVersion(); - } catch (HtmlError const& ex) { - } - return result; -} - <# ---------------------------------------------------------------------- #> @@ -213,10 +203,15 @@ static bool HasEpgsearch()
<$ tr("Features") $>:
<{ - bool hasEpgsearch = HasEpgsearch(); - string epgsearchVersion = hasEpgsearch ? string( cPluginManager::GetPlugin("epgsearch")->Version() ) + " " : ""; + Features< features::epgsearch >& epgsearch = LiveFeatures< features::epgsearch >(); }> - active.png"/> EPGsearch <$ epgsearchVersion $>(<$ tr("Homepage") $>)
+ active.png"/> EPGsearch +% if ( epgsearch.Recent() ) { + (<$ tr("active") $>: <$ epgsearch.Version() $>) +% } else { + (<$ tr("required") $>: <$ epgsearch.MinVersion() $>) +% } + (<$ tr("Homepage") $>)
<$ tr("Bugs and suggestions") $>
<$ tr("If you encounter any bugs or would like to suggest new features, please use our bugtracker") $>:
-- cgit v1.2.3