diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2016-08-20 14:18:00 +0200 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2016-08-20 14:18:00 +0200 |
commit | 9e81f37ad53e8a7169570b221a4bb00c6ddef566 (patch) | |
tree | 398ff3092f82dc0f5cfaf183ba2286e15a8b417e /displaymenu.c | |
parent | 429842c6a87b66eea3c44b88b748989d1a01bf45 (diff) | |
download | skin-flatplus-9e81f37ad53e8a7169570b221a4bb00c6ddef566.tar.gz skin-flatplus-9e81f37ad53e8a7169570b221a4bb00c6ddef566.tar.bz2 |
- [update] timers widget - sort timers by time
Diffstat (limited to 'displaymenu.c')
-rw-r--r-- | displaymenu.c | 10 |
1 files changed, 10 insertions, 0 deletions
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); } + + |