summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2013-05-02 12:39:47 +0200
committerAndreas Mair <amair.sob@googlemail.com>2013-05-02 12:39:47 +0200
commit4c7bca8672c0249d3eb69d505747497b1d88e0e9 (patch)
tree54cff820355a7b7eb3205375055bd808adbda9bc
parent937f69e5eb18235ba9823061ac3a2ecfbf2dcf3e (diff)
downloadvdr-plugin-extrecmenu-4c7bca8672c0249d3eb69d505747497b1d88e0e9.tar.gz
vdr-plugin-extrecmenu-4c7bca8672c0249d3eb69d505747497b1d88e0e9.tar.bz2
Optionally use SetMenuItem() so that skins can display the recordings menu the way they want to.
-rw-r--r--mymenurecordings.c11
-rw-r--r--mymenurecordings.h9
2 files changed, 20 insertions, 0 deletions
diff --git a/mymenurecordings.c b/mymenurecordings.c
index 5a5b822..ef1dda5 100644
--- a/mymenurecordings.c
+++ b/mymenurecordings.c
@@ -160,6 +160,9 @@ eOSState myMenuRecordingInfo::ProcessKey(eKeys Key)
// --- myMenuRecordingsItem ---------------------------------------------------
myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
{
+#if VDRVERSNUM >= 10733
+ recording=Recording;
+#endif
totalentries=newentries=0;
isdvd=false;
ishdd=false;
@@ -498,6 +501,14 @@ void myMenuRecordingsItem::IncrementCounter(bool IsNew)
SetText(buffer,false);
}
+#if VDRVERSNUM >= 10733
+void myMenuRecordingsItem::SetMenuItem(cSkinDisplayMenu *displaymenu,int index,bool current,bool selectable)
+{
+ if (!(mysetup.SetRecordingCat && displaymenu->SetItemRecording(recording,index,current,selectable,level,totalentries,newentries)))
+ displaymenu->SetItem(Text(),index,current,selectable);
+}
+#endif
+
// --- myMenuRecordings -------------------------------------------------------
#define MB_PER_MINUTE 25.75 // this is just an estimate! (taken over from VDR)
diff --git a/mymenurecordings.h b/mymenurecordings.h
index 9058abd..2000e44 100644
--- a/mymenurecordings.h
+++ b/mymenurecordings.h
@@ -2,6 +2,9 @@
class myMenuRecordingsItem:public cOsdItem
{
private:
+#if VDRVERSNUM >= 10733
+ cRecording *recording;
+#endif
bool dirismoving;
bool isdvd;
bool ishdd;
@@ -17,6 +20,9 @@ class myMenuRecordingsItem:public cOsdItem
~myMenuRecordingsItem();
const char *FileName(){return filename;}
const char *Name(){return name;}
+#if VDRVERSNUM >= 10733
+ cRecording *Recording(void) { return recording; }
+#endif
bool IsDirectory(){return name!=NULL;}
bool IsPesRecording(void) const { return isPesRecording; }
void IncrementCounter(bool IsNew);
@@ -25,6 +31,9 @@ class myMenuRecordingsItem:public cOsdItem
void SetDirIsMoving(bool moving){dirismoving=moving;}
bool GetDirIsMoving(){return dirismoving;}
const char *UniqID(){return uniqid.length()?uniqid.c_str():"";}
+#if VDRVERSNUM >= 10733
+ virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
+#endif
};
// --- myMenuRecordings -------------------------------------------------------