From afc27021e3c8542f7a966ea732e30212b786b923 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Mon, 11 Apr 2011 22:33:16 +0200 Subject: Sorting of logo list added New MTV3 logo Changed demuxer to return raw packets --- plugin/setup.cpp | 19 ++++++++++++++++++- plugin/setup.h | 7 +++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/setup.cpp b/plugin/setup.cpp index 4709afe..4113d02 100644 --- a/plugin/setup.cpp +++ b/plugin/setup.cpp @@ -170,7 +170,7 @@ cSetupMarkAdList::cSetupMarkAdList(struct setup *Setup) } if (!strcmp(name,cname)) { - Add(new cOsdItem(cString::sprintf("%i\t%s",channel->Number(),channel->Name()))); + Add(new cSetupMarkAdListItem(cString::sprintf("%i\t%s",channel->Number(),channel->Name()))); free(cname); break; } @@ -183,9 +183,26 @@ cSetupMarkAdList::cSetupMarkAdList(struct setup *Setup) } } } + Sort(); closedir(dir); } +int cSetupMarkAdListItem::Compare(const cListObject &ListObject) const +{ + const cSetupMarkAdListItem *la=(cSetupMarkAdListItem *) &ListObject; + const char *t1=strchr(Text(),'\t'); + const char *t2=strchr(la->Text(),'\t'); + if ((t1) && (t2)) + { + return strcasecmp(t1,t2); + } + else + { + return 0; + } + +} + eOSState cSetupMarkAdList::ProcessKey (eKeys Key) { eOSState state = cOsdMenu::ProcessKey(Key); diff --git a/plugin/setup.h b/plugin/setup.h index 92bfb53..dc3a75b 100644 --- a/plugin/setup.h +++ b/plugin/setup.h @@ -60,4 +60,11 @@ public: eOSState ProcessKey(eKeys Key); }; +class cSetupMarkAdListItem : public cOsdItem +{ +public: + cSetupMarkAdListItem(const char *Text, eOSState State=osUnknown,bool Selectable=true):cOsdItem(Text,State,Selectable) { } + virtual int Compare(const cListObject &ListObject) const; +}; + #endif -- cgit v1.2.3