summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonty35 <videosrc@vdr.muc.bieringer.de>2008-12-21 22:31:21 +0100
committermonty35 <videosrc@vdr.muc.bieringer.de>2008-12-21 22:31:21 +0100
commit42c7fc825019b07d481a57ac48012f08ec35cb11 (patch)
tree80376c44ef7c450a9b060f77c6e7bf11c6d01561
parentaa3e2f85fe2a36f45e847132d34a50db6b7770f6 (diff)
downloadvdr-plugin-tvtv-42c7fc825019b07d481a57ac48012f08ec35cb11.tar.gz
vdr-plugin-tvtv-42c7fc825019b07d481a57ac48012f08ec35cb11.tar.bz2
Hide update interval in menu, if autoupdate is not enabled
-rw-r--r--tvtv.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/tvtv.c b/tvtv.c
index c96e1bb..760b9f9 100644
--- a/tvtv.c
+++ b/tvtv.c
@@ -89,7 +89,8 @@ void cMenuSetupTVTV::Setup(void) {
if (data.useproxy)
Add(new cMenuEditStrItem( tr(" HTTP Proxy"), data.httpproxy, sizeof(data.httpproxy), tr(FileNameChars)));
Add(new cMenuEditBoolItem( tr("Auto Update"), &data.autoupdate));
- Add(new cMenuEditIntItem( tr("Updatetime (min)"), &data.updatetime));
+ if (data.autoupdate)
+ Add(new cMenuEditIntItem( tr("Updatetime (min)"), &data.updatetime));
Add(new cMenuEditBoolItem( tr("Show In Main Menu"), &data.show_in_mainmenu));
Add(new cMenuEditBoolItem( tr("Add ongoing non-VPS timers"), &data.AddOngoingNonVpsTimers));
@@ -124,9 +125,11 @@ void cMenuSetupTVTV::Setup(void) {
eOSState cMenuSetupTVTV::ProcessKey(eKeys Key) {
- int olduseproxy = data.useproxy;
- int oldtvtvbugfix = data.tvtv_bugfix;
- int oldtvtvtzbugfix = data.TimeZoneShiftBugFix;
+ int old_useproxy = data.useproxy;
+ int old_tvtvbugfix = data.tvtv_bugfix;
+ int old_tvtvtzbugfix = data.TimeZoneShiftBugFix;
+ int old_autoupdate = data.autoupdate;
+
eOSState state = cMenuSetupPage::ProcessKey(Key);
switch(state) {
@@ -149,7 +152,12 @@ eOSState cMenuSetupTVTV::ProcessKey(eKeys Key) {
break;
}
- if (Key != kNone && ((data.useproxy != olduseproxy) || (data.tvtv_bugfix != oldtvtvbugfix) || (data.TimeZoneShiftBugFix != oldtvtvtzbugfix))) Setup();
+ if (Key != kNone && (
+ (data.useproxy != old_useproxy)
+ || (data.tvtv_bugfix != old_tvtvbugfix)
+ || (data.TimeZoneShiftBugFix != old_tvtvtzbugfix)
+ || (data.autoupdate != old_autoupdate)
+ )) Setup();
return state;
}