diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-10-26 16:29:25 +0100 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-10-26 16:29:25 +0100 |
commit | 8dc4bba7ad0968a51b617cc242eaf528037c55a5 (patch) | |
tree | da5321bd6148996365bf7623cce53446f11cace0 | |
parent | c267a020a167195c08d03f0d85ac900820dee3e3 (diff) | |
download | skin-flatplus-8dc4bba7ad0968a51b617cc242eaf528037c55a5.tar.gz skin-flatplus-8dc4bba7ad0968a51b617cc242eaf528037c55a5.tar.bz2 |
add hidden options ShortRecordingCount
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | config.c | 3 | ||||
-rw-r--r-- | config.h | 1 | ||||
-rw-r--r-- | displaymenu.c | 34 | ||||
-rw-r--r-- | setup.c | 3 |
5 files changed, 17 insertions, 25 deletions
@@ -5,6 +5,7 @@ VDR Plugin 'skinflatplus' Revision History - [add] option to draw the menu background over the entire height - [add] sort icon in recordings menu - [add] options to show the number of recordings in title in recording menu +- [add] hidden options "ShortRecordingCount" to show number of recordings in short format - [add] options to show the number of timers in title in timer menu - [add] options to show the number of channels in title in channel menu - [add] inactive timer icon in short view with epg @@ -65,6 +65,8 @@ cFlatConfig::cFlatConfig(void) { MenuFullOsd = 0; + ShortRecordingCount = 0; + MenuItemRecordingClearPercent = 1; MenuItemRecordingShowFolderDate = 1; MenuItemParseTilde = 1; @@ -271,6 +273,7 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "MenuRecordingShowCount") == 0) MenuRecordingShowCount = atoi(Value); else if (strcmp(Name, "MenuTimerShowCount") == 0) MenuTimerShowCount = atoi(Value); else if (strcmp(Name, "MenuChannelShowCount") == 0) MenuChannelShowCount = atoi(Value); + else if (strcmp(Name, "ShortRecordingCount") == 0) ShortRecordingCount = atoi(Value); else return false; @@ -235,6 +235,7 @@ class cFlatConfig int MenuItemRecordingClearPercent; int MenuItemRecordingShowFolderDate; // 0 = disable, 1 = newest recording date, 2 = oldest recording date int MenuItemParseTilde; + int ShortRecordingCount; /* hidden configs (only in setup.conf, no osd menu) */ // Text Scroller diff --git a/displaymenu.c b/displaymenu.c index 49ea2912..6e22824a 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -282,6 +282,14 @@ void cFlatDisplayMenu::SetTitle(const char *Title) { } } cString newTitle = cString::sprintf("%s (%d*/%d)", Title, recNewCount, recCount); + if( Config.ShortRecordingCount ) { + if( recNewCount == 0 ) // 0 neue Aufnahmen + newTitle = cString::sprintf("%s (%d)", Title, recCount); + else if( recNewCount == recCount ) //Nur neue Aufnahmen + newTitle = cString::sprintf("%s (%d*)", Title, recNewCount); + else // Anzeige (35*/56) + newTitle = cString::sprintf("%s (%d*/%d)", Title, recNewCount, recCount); + } TopBarSetTitle(*newTitle); } if( RecordingsSortMode == rsmName ) @@ -3618,31 +3626,7 @@ void cFlatDisplayMenu::Flush(void) { TopBarSetTitleWithoutClear(*newTitle); } } - /* - if( Config.MenuRecordingShowCount && menuCategory == mcRecording && LastRecFolder != RecFolder ) { - dsyslog("LastRecFolder: %s RecFolder: %s", LastRecFolder.c_str(), RecFolder.c_str() ); - int recCount = 0, recNewCount = 0; - LastRecFolder = RecFolder; - if( RecFolder != "" && LastItemRecordingLevel > 0 ) { - for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) { - std::string RecFolder2 = GetRecordingName(Rec, LastItemRecordingLevel-1, true); - if( RecFolder == RecFolder2 ) { - recCount++; - if( Rec->IsNew() ) - recNewCount++; - } - } - } else { - for(cRecording *Rec = Recordings.First(); Rec; Rec = Recordings.Next(Rec)) { - recCount++; - if( Rec->IsNew() ) - recNewCount++; - } - } - cString newTitle = cString::sprintf("%s (%dSTAR/%d)", *LastTitle, recNewCount, recCount); - TopBarSetTitleWithoutClear(*newTitle); - } - */ + osd->Flush(); } @@ -273,6 +273,7 @@ void cFlatSetup::Store(void) { SetupStore("MenuRecordingShowCount", Config.MenuRecordingShowCount); SetupStore("MenuTimerShowCount", Config.MenuTimerShowCount); SetupStore("MenuChannelShowCount", Config.MenuChannelShowCount); + SetupStore("ShortRecordingCount", Config.ShortRecordingCount); Config.Init(); } @@ -419,6 +420,7 @@ bool cFlatSetupGeneral::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "MenuRecordingShowCount") == 0) SetupConfig->MenuRecordingShowCount = atoi(Value); else if (strcmp(Name, "MenuTimerShowCount") == 0) SetupConfig->MenuTimerShowCount = atoi(Value); else if (strcmp(Name, "MenuChannelShowCount") == 0) SetupConfig->MenuChannelShowCount = atoi(Value); + else if (strcmp(Name, "ShortRecordingCount") == 0) SetupConfig->ShortRecordingCount = atoi(Value); else return false; return true; @@ -546,6 +548,7 @@ void cFlatSetupGeneral::SaveCurrentSettings(void) { Config.Store("MenuRecordingShowCount", SetupConfig->MenuRecordingShowCount, *Filename); Config.Store("MenuTimerShowCount", SetupConfig->MenuTimerShowCount, *Filename); Config.Store("MenuChannelShowCount", SetupConfig->MenuChannelShowCount, *Filename); + Config.Store("ShortRecordingCount", SetupConfig->ShortRecordingCount, *Filename); cString msg = cString::sprintf("%s %s", tr("saved settings in file:"), *File); Skins.Message(mtInfo, msg); |