summaryrefslogtreecommitdiff
path: root/displaymenu.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-01-26 14:28:10 +0100
committerlouis <louis.braun@gmx.de>2013-01-26 14:28:10 +0100
commit7cfa2ba6615ef9c094b6fbe9ee200794996e8cdc (patch)
treedee529d45c82c80d7cb1b623218300ff1d1d8e73 /displaymenu.c
parent3e5815663163a7d982ed640e456fc46a4ea6eed7 (diff)
downloadskin-nopacity-7cfa2ba6615ef9c094b6fbe9ee200794996e8cdc.tar.gz
skin-nopacity-7cfa2ba6615ef9c094b6fbe9ee200794996e8cdc.tar.bz2
Added display of Timer Conflicts with epgsearch in Main Menu
Diffstat (limited to 'displaymenu.c')
-rw-r--r--displaymenu.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 7475943..e6d6f41 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -59,14 +59,45 @@ void cNopacityDisplayMenu::DrawDisk(void) {
}
}
-void cNopacityDisplayMenu::DrawTimers(void) {
+int cNopacityDisplayMenu::CheckTimerConflict(bool timersChanged) {
+ int numConflicts = 0;
+ if (initial || ((menuCategoryLast!=mcMain)&&(MenuCategory()==mcMain))) {
+ if (timersChanged) {
+ cPlugin *p = cPluginManager::GetPlugin("epgsearch");
+ if (p) {
+ Epgsearch_lastconflictinfo_v1_0 *serviceData = new Epgsearch_lastconflictinfo_v1_0;
+ if (serviceData) {
+ serviceData->nextConflict = 0;
+ serviceData->relevantConflicts = 0;
+ serviceData->totalConflicts = 0;
+ p->Service("Epgsearch-lastconflictinfo-v1.0", serviceData);
+ if (serviceData->relevantConflicts > 0) {
+ numConflicts = serviceData->relevantConflicts;
+ }
+ delete serviceData;
+ }
+ }
+ }
+ }
+ return numConflicts;
+}
+
+void cNopacityDisplayMenu::DrawTimers(bool timersChanged, int numConflicts) {
int maxTimersHeight = menuView->GetTimersMaxHeight();
if (initial || ((menuCategoryLast!=mcMain)&&(MenuCategory()==mcMain)&&!timersDrawn)) {
- if (Timers.Modified(lastTimersState)) {
+ if (timersChanged) {
timers.Clear();
cSortedTimers SortedTimers;
int numTimers = SortedTimers.Size();
int currentHeight = menuView->GetTimersInitHeight();
+ if (numConflicts > 0) {
+ cNopacityTimer *t = menuView->DrawTimerConflict(numConflicts, currentHeight);
+ if (initial)
+ if (FadeTime)
+ t->SetAlpha(0);
+ currentHeight += t->GetHeight() + menuView->spaceMenu;
+ timers.Add(t);
+ }
for (int i = 0; i < numTimers; i++) {
if (const cTimer *Timer = SortedTimers[i]) {
cNopacityTimer *t = menuView->DrawTimer(Timer, currentHeight);
@@ -573,8 +604,12 @@ void cNopacityDisplayMenu::Flush(void) {
if (MenuCategory() == mcMain) {
if (config.showDiscUsage)
DrawDisk();
+ bool timersChanged = Timers.Modified(lastTimersState);
+ int numConflicts = 0;
+ if (config.checkTimerConflict)
+ numConflicts = CheckTimerConflict(timersChanged);
if (config.showTimers)
- DrawTimers();
+ DrawTimers(timersChanged, numConflicts);
}
if (initial) {
if (config.menuFadeTime)