summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2016-08-20 14:18:00 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2016-08-20 14:18:00 +0200
commit9e81f37ad53e8a7169570b221a4bb00c6ddef566 (patch)
tree398ff3092f82dc0f5cfaf183ba2286e15a8b417e
parent429842c6a87b66eea3c44b88b748989d1a01bf45 (diff)
downloadskin-flatplus-9e81f37ad53e8a7169570b221a4bb00c6ddef566.tar.gz
skin-flatplus-9e81f37ad53e8a7169570b221a4bb00c6ddef566.tar.bz2
- [update] timers widget - sort timers by time
-rw-r--r--HISTORY1
-rw-r--r--displaymenu.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index c215ac02..0c89c5ce 100644
--- a/HISTORY
+++ b/HISTORY
@@ -15,6 +15,7 @@ VDR Plugin 'skinflatplus' Revision History
- [update] README, fix logo folder, add 3PO logo pack
- [update] translation (thanks to MegaV0lt)
- [update] MV-Themes
+- [update] timers widget - sort timers by time
- [add] support for vdr-2.3.1
- [add] displaychannel - dvbapi info
you need oscam min rev 10653 and dvbapi min commit 85da7b2
diff --git a/displaymenu.c b/displaymenu.c
index 4f228a1e..50efcff1 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -25,6 +25,10 @@ enum stream_content
sc_audio_HEAAC = 0x06,
};
+static int CompareTimers(const void *a, const void *b) {
+ return (*(const cTimer **)a)->Compare(**(const cTimer **)b);
+}
+
cFlatDisplayMenu::cFlatDisplayMenu(void) {
CreateFullOsd();
TopBarCreate();
@@ -4418,6 +4422,10 @@ int cFlatDisplayMenu::DrawMainMenuWidgetActiveTimers(int wLeft, int wWidth, int
timerRemoteActive.Append(remoteTimer);
}
}
+ timerRec.Sort(CompareTimers);
+ timerActive.Sort(CompareTimers);
+ timerRemoteRec.Sort(CompareTimers);
+ timerRemoteActive.Sort(CompareTimers);
if( (timerRec.Size() == 0 && timerActive.Size() == 0 && timerRemoteRec.Size() == 0 && timerRemoteActive.Size() == 0) && Config.MainMenuWidgetActiveTimerHideEmpty )
return 0;
@@ -5321,3 +5329,5 @@ void cFlatDisplayMenu::PreLoadImages(void) {
imgLoader.LoadIcon("recording", fontHeight, fontHeight);
imgLoader.LoadIcon("folder", fontHeight, fontHeight);
}
+
+