diff options
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | neutrinoepg.c | 6 | ||||
-rw-r--r-- | neutrinoepg.h | 1 | ||||
-rw-r--r-- | osdmenu.c | 31 | ||||
-rw-r--r-- | po/de_DE.po | 5 |
5 files changed, 22 insertions, 22 deletions
@@ -3,6 +3,7 @@ VDR Plugin 'neutrinoepg' Revision History 2013-XX-XX: Version 0.3.4 - [Fix] Bufferoverflow bei Tastendruck 0 - [Feature] Beschleunigter Start des Plugin, besonders bei großen channels.conf mit vielen Gruppen +- [Feature] Neuer Parameter 'HideGroupsAt' zum ausblenden aller Gruppen ab dieser Gruppennr 2013-04-12: Version 0.3.3 - [Fix] komplette Neuimplementierung der Kanal- und Gruppenbehandlung innerhalb des Plugins. diff --git a/neutrinoepg.c b/neutrinoepg.c index 19b96fd..3e395ef 100644 --- a/neutrinoepg.c +++ b/neutrinoepg.c @@ -18,6 +18,7 @@ int percentprogress = false; int middlemenuentry = false; int switchgroupkey = 0; int ChannelNameWidth = 15; +int HideGroupsAt = 0; bool ReloadFilters = false; // --- myMenuSetup ------------------------------------------------------------ @@ -26,7 +27,6 @@ class myMenuSetup : public cMenuSetupPage private: const char *SwitchGroupKeyTexts[2]; const char *SitchWithOKTexts[2]; - protected: virtual void Store() { @@ -42,6 +42,7 @@ class myMenuSetup : public cMenuSetupPage SetupStore("middlemenuentry", middlemenuentry); SetupStore("switchgroupkey", switchgroupkey); SetupStore("ChannelNameWidth", ChannelNameWidth); + SetupStore("HideGroupsAt", HideGroupsAt); ReloadFilters = true; } @@ -66,6 +67,7 @@ class myMenuSetup : public cMenuSetupPage Add(new cMenuEditIntItem(tr("Channel name width"), &ChannelNameWidth)); Add(new cMenuEditBoolItem(tr("Keep display after switching"), &keeposd)); Add(new cMenuEditBoolItem(tr("Show channel numbers"), &showchannelnumbers)); + Add(new cMenuEditIntItem(tr("Hide Groups at Groupnr"), &HideGroupsAt)); Add(new cMenuEditBoolItem(tr("Hide encrypted channels"), &hideencryptedchannels)); Add(new cMenuEditBoolItem(tr("Hide radio channels"), &hideradiochannels)); Add(new cMenuEditBoolItem(tr("Progress as percent"), &percentprogress)); @@ -163,6 +165,8 @@ bool cPluginNeutrinoEpg::SetupParse(const char *Name, const char *Value) ChannelNameWidth = atoi(Value); else if(!strcmp("switchgroupkey", Name)) switchgroupkey = atoi(Value); + else if(!strcmp("HideGroupsAt", Name)) + HideGroupsAt = atoi(Value); else return false; return true; diff --git a/neutrinoepg.h b/neutrinoepg.h index 92b3914..8d57d15 100644 --- a/neutrinoepg.h +++ b/neutrinoepg.h @@ -27,6 +27,7 @@ extern int percentprogress; extern int middlemenuentry; extern int switchgroupkey; extern int ChannelNameWidth; +extern int HideGroupsAt; static const char *VERSION = "0.3.3"; static const char *DESCRIPTION = "View the EPG like neutrino does"; @@ -2,8 +2,6 @@ #include "osditem.h" #include "menuevent.h" -#include <time.h> - time_t t; int *GroupIndex; @@ -15,19 +13,10 @@ int ChannelsShown; int ChannelsBefore; int ChannelsAfter; -double diffclock(clock_t clock1,clock_t clock2) -{ - double diffticks = clock1 - clock2; - double diffs = diffticks / CLOCKS_PER_SEC; - return diffs; -} - myOsdMenu::myOsdMenu() : cOsdMenu("") { jumpto = false; - syslog(LOG_ERR, "neutrinoepg OsdMenu Init"); - if( Setup.UseSmallFont == 2 ) { if(showchannelnumbers) @@ -78,11 +67,6 @@ myOsdMenu::myOsdMenu() : cOsdMenu("") ChannelsAfter = (ChannelsShown / 2)-1; } - int chan_edited = Channels.BeingEdited(); - syslog(LOG_ERR, "neutrinoepg chan_edited: %d", chan_edited); - - if( ReloadFilters || chan_edited ) - { clock_t begin = clock(); clock_t end = clock(); ReloadFilters = false; @@ -99,6 +83,16 @@ myOsdMenu::myOsdMenu() : cOsdMenu("") if( !Channels.First()->GroupSep() ) MaxGroup++; + // Hide Groups? + if( HideGroupsAt > MaxGroup ) + HideGroupsAt = MaxGroup; + if( HideGroupsAt <= 1 ) + HideGroupsAt = 0; + if( HideGroupsAt > 1 ) + { + MaxGroup -= MaxGroup - HideGroupsAt + 1; + } + if( GroupIndex != NULL ) delete[] GroupIndex; if( CurrentGroupChannel != NULL ) @@ -127,7 +121,7 @@ myOsdMenu::myOsdMenu() : cOsdMenu("") GroupIndex[0] = -1; index = 1; } - for( cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel) ) + for( cChannel *Channel = Channels.First(); Channel && index < MaxGroup; Channel = Channels.Next(Channel) ) { if( Channel->GroupSep() ) { @@ -153,9 +147,6 @@ myOsdMenu::myOsdMenu() : cOsdMenu("") } end = clock(); } - end = clock(); - syslog(LOG_ERR, "neutrinoepg time last for get channels: %.3f s", diffclock(end, begin)); - } // what is the current watching channel? int CurrentChannelNr = cDevice::CurrentChannel(); diff --git a/po/de_DE.po b/po/de_DE.po index 08eb121..ea1c47e 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Neutrinoepg-Plugin 0.3.3\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2013-04-12 09:54+0200\n" +"POT-Creation-Date: 2013-04-17 09:28+0200\n" "PO-Revision-Date: 2008-03-30 19:58+0200\n" "Last-Translator: \n" "Language-Team: <nordlicht@martins-kabuff.de>\n" @@ -76,6 +76,9 @@ msgstr "Anzeige nach Umschalten beibehalten" msgid "Show channel numbers" msgstr "Kanalnummern anzeigen" +msgid "Hide Groups at Groupnr" +msgstr "Gruppen ausblenden ab Gruppennr" + msgid "Hide encrypted channels" msgstr "Verschlüsselte Kanäle ausblenden" |