summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--config.c3
-rw-r--r--config.h1
-rw-r--r--displaymenu.c34
-rw-r--r--setup.c3
5 files changed, 17 insertions, 25 deletions
diff --git a/HISTORY b/HISTORY
index f94e0709..a888c76b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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
diff --git a/config.c b/config.c
index cf5d0340..e5179f0f 100644
--- a/config.c
+++ b/config.c
@@ -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;
diff --git a/config.h b/config.h
index 593d6c9e..ffd7320d 100644
--- a/config.h
+++ b/config.h
@@ -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();
}
diff --git a/setup.c b/setup.c
index 585bf902..174ba51f 100644
--- a/setup.c
+++ b/setup.c
@@ -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);