summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-22 14:27:53 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-22 14:27:53 +0100
commit6cd9124d08713dc11a068f31bfa2cab266a1895b (patch)
tree6f22cda9eae33923faba799d5a127e84ec1efb8e /vdr.c
parentac9f4bb48fb3aa54e0fcdefc0037ee9a1c6576a1 (diff)
downloadvdr-6cd9124d08713dc11a068f31bfa2cab266a1895b.tar.gz
vdr-6cd9124d08713dc11a068f31bfa2cab266a1895b.tar.bz2
Improved channel switching when repeat function kicks in; updating channel display before switching channel; added a missing initialization of 'timeout' in the cDisplayChannel constructor
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/vdr.c b/vdr.c
index c96a3221..6e4d1857 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.242 2006/01/20 16:12:39 kls Exp $
+ * $Id: vdr.c 1.243 2006/01/22 13:32:41 kls Exp $
*/
#include <getopt.h>
@@ -822,6 +822,7 @@ int main(int argc, char *argv[])
}
}
break;
+ // Direct main menu functions:
#define DirectMainFunction(function)\
DELETE_MENU;\
if (cControl::Control())\
@@ -855,7 +856,15 @@ int main(int argc, char *argv[])
case kChanUp:
case kChanDn|k_Repeat:
case kChanDn:
- cDevice::SwitchChannel(NORMALKEY(key) == kChanUp ? 1 : -1);
+ if (!Interact)
+ Menu = new cDisplayChannel(NORMALKEY(key));
+ else if (cDisplayChannel::IsOpen()) {
+ Interact->ProcessKey(key);
+ continue;
+ }
+ else
+ cDevice::SwitchChannel(NORMALKEY(key) == kChanUp ? 1 : -1);
+ key = kNone; // nobody else needs to see these keys
break;
// Volume control:
case kVolUp|k_Repeat:
@@ -995,21 +1004,17 @@ int main(int argc, char *argv[])
}
// Direct Channel Select:
case k1 ... k9:
- Menu = new cDisplayChannel(key);
- break;
// Left/Right rotates trough channel groups:
case kLeft|k_Repeat:
case kLeft:
case kRight|k_Repeat:
case kRight:
- Menu = new cDisplayChannel(NORMALKEY(key));
- break;
// Up/Down Channel Select:
case kUp|k_Repeat:
case kUp:
case kDown|k_Repeat:
case kDown:
- cDevice::SwitchChannel(NORMALKEY(key) == kUp ? 1 : -1);
+ Menu = new cDisplayChannel(NORMALKEY(key));
break;
// Viewing Control:
case kOk: LastChannel = -1; break; // forces channel display