From 45ff354dd802a9994d676eafff14499fd91d1946 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Mon, 21 Feb 2011 23:06:57 +0200 Subject: Added support for HAVE_LIBPCRECPP. --- pages/Makefile | 4 ++-- pages/recordings.ecpp | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'pages') diff --git a/pages/Makefile b/pages/Makefile index 8ce12db..db9436a 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -51,7 +51,7 @@ all: libpages.a ### Implicit rules: %.o: %.cpp - $(CXX) $(CXXFLAGS) $(TNTFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXFLAGS) $(TNTFLAGS) -c $(DEFINES) $(FEATURES) $(INCLUDES) $< %.cpp: %.ecpp $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< @@ -61,7 +61,7 @@ all: libpages.a MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile $(OBJS:%.o=%.cpp) $(OBJS:%.o=%.ecpp) - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@ + @$(MAKEDEP) $(DEFINES) $(FEATURES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@ ifneq ($(MAKECMDGOALS),clean) -include $(DEPFILE) diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index d761bb4..cd12acd 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -203,7 +203,10 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { string duration(LiveSetup().GetShowRecDuration() ? FormatDuration(tr("(%d')"), recItem->Duration()) : ""); string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : ""); string hint(tr("Click to view details.")); if (!shortDescr.empty()) hint = shortDescr + "
" + hint; - if (filter.empty() || pcrecpp::RE(filter.c_str(), pcrecpp::UTF8()).PartialMatch(recItem->Name()) || pcrecpp::RE(filter.c_str(), pcrecpp::UTF8()).PartialMatch(shortDescr)) { +#ifdef HAVE_LIBPCRECPP + if (filter.empty() || pcrecpp::RE(filter.c_str(), pcrecpp::UTF8()).PartialMatch(recItem->Name()) || pcrecpp::RE(filter.c_str(), pcrecpp::UTF8()).PartialMatch(shortDescr)) +#endif + {
  • <& rec_item_file name=(recItem->Name()) level=(level) id=(recItem->Id()) day=(day) dayLen=(dayLen) startTime=(recItem->StartTime()) duration=(duration) hint=(hint) shortDescr=(shortDescr) archived=(RecordingsManager::GetArchiveDescr(recItem->Recording())) &> @@ -221,8 +224,14 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { " alt="" /><$ tr("Sort by name") $> | " alt="" /><$ tr("Sort by date") $> +<%cpp> +#ifdef HAVE_LIBPCRECPP + | <$ tr("Filter") $>:  <& tooltip.help text=(tr("Look in recordings titles and subtitles for the given string and display only the matching ones. You may also use perl compatible regular expressions (PCRE).")) &> +<%cpp> +#endif + <%cpp> } -- cgit v1.2.3