From 977c5213922f041010d980ae84244259e99c880b Mon Sep 17 00:00:00 2001 From: Andreas Mair Date: Mon, 8 Apr 2013 15:25:25 +0200 Subject: Set menu category in VDR >= 1.7.28 (Closes #1110). --- mymenurecordings.c | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) (limited to 'mymenurecordings.c') diff --git a/mymenurecordings.c b/mymenurecordings.c index 52b1750..f21cec9 100644 --- a/mymenurecordings.c +++ b/mymenurecordings.c @@ -45,6 +45,11 @@ class myMenuRecordingInfo:public cOsdMenu myMenuRecordingInfo::myMenuRecordingInfo(const cRecording *Recording, bool WithButtons):cOsdMenu(trVDR("Recording info")) { +#if VDRVERSNUM >= 10728 + if (mysetup.SetRecordingCat){ + SetMenuCategory(mcRecordingInfo); + } +#endif recording=Recording; withButtons=WithButtons; if(withButtons) @@ -505,6 +510,11 @@ int myMenuRecordings::lastFreeMB=-1; myMenuRecordings::myMenuRecordings(const char *Base,int Level):cOsdMenu("") { +#if VDRVERSNUM >= 10728 + if(mysetup.SetRecordingCat){ + SetMenuCategory(mcRecording); + } +#endif int c[MAX_RECLIST_COLUMNS],i=0; for (i=0; i= 10727 - double MBperMinute = Recordings.MBperMinute(); - int minutes=int(double(freemb)/(MBperMinute>0?MBperMinute:MB_PER_MINUTE)); -#else - int minutes=int(double(freemb)/MB_PER_MINUTE); -#endif - stringstream buffer; if(MoveCutterThread->IsMoveListEmpty()) buffer << Icons::MovingRecording(); @@ -683,11 +685,25 @@ void myMenuRecordings::Title() else buffer << trVDR("Recordings"); - buffer << " (" - << minutes/60 << ":" - << setw(2) << setfill('0') << minutes%60 << " " - << trVDR("free") - << ")"; +#if VDRVERSNUM >= 10728 + if(mysetup.SetRecordingCat == 0){ +#endif + int freemb=FreeMB(); +#if VDRVERSNUM >= 10727 + double MBperMinute = Recordings.MBperMinute(); + int minutes=int(double(freemb)/(MBperMinute>0?MBperMinute:MB_PER_MINUTE)); +#else + int minutes=int(double(freemb)/MB_PER_MINUTE); +#endif + + buffer << " (" + << minutes/60 << ":" + << setw(2) << setfill('0') << minutes%60 << " " + << trVDR("free") + << ")"; +#if VDRVERSNUM >= 10728 + } +#endif SetTitle(buffer.str().c_str()); } -- cgit v1.2.3