summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-08-03 09:54:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-08-03 09:54:18 +0200
commitf8386cdd8bb0fbad05eb7db09bdfd840bac324c8 (patch)
treec22a2d0b2d52ac86c2f56244bb009ad09a1e5da5 /menu.c
parentba1c9fb5349080ea7007ad88d7343059d4d73616 (diff)
downloadvdr-f8386cdd8bb0fbad05eb7db09bdfd840bac324c8.tar.gz
vdr-f8386cdd8bb0fbad05eb7db09bdfd840bac324c8.tar.bz2
Added the usual menu timeout to the CAM menus1.2.2
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index b260ee38..b29961e4 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.263 2003/08/02 13:23:58 kls Exp $
+ * $Id: menu.c 1.264 2003/08/03 09:38:37 kls Exp $
*/
#include "menu.h"
@@ -1562,6 +1562,7 @@ cMenuCam::cMenuCam(cCiMenu *CiMenu)
Add(new cOsdItem(ciMenu->BottomText()));
Display();
dsyslog("CAM: Menu - %s", ciMenu->TitleText());
+ lastActivity = time(NULL);
}
cMenuCam::~cMenuCam()
@@ -1590,6 +1591,10 @@ eOSState cMenuCam::ProcessKey(eKeys Key)
default: break;
}
}
+ if (Key != kNone)
+ lastActivity = time(NULL);
+ else if (time(NULL) - lastActivity > MENUTIMEOUT)
+ state = osEnd;
return state;
}
@@ -1607,6 +1612,7 @@ cMenuCamEnquiry::cMenuCamEnquiry(cCiEnquiry *CiEnquiry)
SetTitle(ciEnquiry->Text() ? ciEnquiry->Text() : "CAM");
Add(new cMenuEditNumItem("Input", input, Length, ciEnquiry->Blind()));
Display();
+ lastActivity = time(NULL);
}
cMenuCamEnquiry::~cMenuCamEnquiry()
@@ -1635,6 +1641,10 @@ eOSState cMenuCamEnquiry::ProcessKey(eKeys Key)
default: break;
}
}
+ if (Key != kNone)
+ lastActivity = time(NULL);
+ else if (time(NULL) - lastActivity > MENUTIMEOUT)
+ state = osEnd;
return state;
}