mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
order of search timers in search timer list in alphabetical order
This commit is contained in:
parent
15ab7fa08b
commit
51df65e90b
1
HISTORY
1
HISTORY
@ -122,3 +122,4 @@ Version 1.2.0
|
||||
- changed video directory choosage behaviour: added possibility to use
|
||||
a fixed recording dir which also supports epgsearch variables
|
||||
- fixed a bug when scrolling page up and the menu footer is active
|
||||
- order of search timers in search timer list in alphabetical order
|
||||
|
@ -1,3 +1,5 @@
|
||||
#define __STL_CONFIG_H
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
@ -385,6 +387,7 @@ void cRecManager::GetSearchTimers(std::vector<cTVGuideSearchTimer> *searchTimer)
|
||||
searchTimer->push_back(timer);
|
||||
}
|
||||
}
|
||||
std::sort(searchTimer->begin(), searchTimer->end());
|
||||
}
|
||||
|
||||
int cRecManager::CreateSearchTimer(std::string epgSearchString) {
|
||||
|
@ -795,6 +795,7 @@ void cRecMenuManager::DisplaySearchTimerList(void) {
|
||||
delete activeMenu;
|
||||
std::vector<cTVGuideSearchTimer> searchTimers;
|
||||
recManager->GetSearchTimers(&searchTimers);
|
||||
//std::sort(searchTimers.begin(), searchTimers.end());
|
||||
activeMenu = new cRecMenuSearchTimers(searchTimers);
|
||||
activeMenu->Display();
|
||||
}
|
||||
|
@ -71,6 +71,15 @@ cTVGuideSearchTimer::cTVGuideSearchTimer(void) {
|
||||
cTVGuideSearchTimer::~cTVGuideSearchTimer(void) {
|
||||
}
|
||||
|
||||
bool cTVGuideSearchTimer::operator < (const cTVGuideSearchTimer& other) const {
|
||||
std::string searchStringOther = other.SearchString();
|
||||
int comp = searchString.compare(searchStringOther);
|
||||
if (comp < 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void cTVGuideSearchTimer::SetTemplate(std::string tmpl) {
|
||||
std::stringstream searchTimerString;
|
||||
searchTimerString << "0:";
|
||||
|
@ -64,13 +64,14 @@ private:
|
||||
public:
|
||||
cTVGuideSearchTimer(void);
|
||||
virtual ~cTVGuideSearchTimer(void);
|
||||
bool operator < (const cTVGuideSearchTimer& other) const;
|
||||
void SetEPGSearchString(std::string strTimer) { this->strTimer = strTimer; };
|
||||
void SetTemplate(std::string tmpl);
|
||||
bool Parse(bool readTemplate = false);
|
||||
std::string BuildSearchString(void);
|
||||
int GetID(void) { return ID; };
|
||||
//GETTER
|
||||
std::string SearchString(void) { return searchString; };
|
||||
std::string SearchString(void) const { return searchString; };
|
||||
bool Active(void);
|
||||
bool UseTitle(void) { return useTitle; };
|
||||
bool UseSubtitle(void) { return useSubtitle; };
|
||||
|
Loading…
Reference in New Issue
Block a user