diff options
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.39 2000/10/08 14:49:25 kls Exp $ + * $Id: vdr.c 1.41 2000/11/01 14:31:32 kls Exp $ */ #include <getopt.h> @@ -161,10 +161,6 @@ int main(int argc, char *argv[]) if (!cDvbApi::Init()) abort(); - // User interface: - - Interface = new cInterface(SVDRPport); - // Configuration data: if (!ConfigDirectory) @@ -176,14 +172,21 @@ int main(int argc, char *argv[]) #ifdef REMOTE_LIRC Keys.SetDummyValues(); #else - if (!Keys.Load(AddDirectory(ConfigDirectory, KEYS_CONF))) - Interface->LearnKeys(); + bool KeysLoaded = Keys.Load(AddDirectory(ConfigDirectory, KEYS_CONF)); #endif cDvbApi::SetPrimaryDvbApi(Setup.PrimaryDVB); Channels.SwitchTo(CurrentChannel); + // User interface: + + Interface = new cInterface(SVDRPport); +#ifndef REMOTE_LIRC + if (!KeysLoaded) + Interface->LearnKeys(); +#endif + // Signal handlers: if (signal(SIGHUP, SignalHandler) == SIG_IGN) signal(SIGHUP, SIG_IGN); @@ -202,7 +205,7 @@ int main(int argc, char *argv[]) // Channel display: if (CurrentChannel != LastChannel) { if (!Menu) - Channels.ShowChannel(CurrentChannel, LastChannel > 0); + Menu = new cDisplayChannel(CurrentChannel, LastChannel > 0); PreviousChannel = LastChannel; LastChannel = CurrentChannel; } @@ -262,7 +265,7 @@ int main(int argc, char *argv[]) // Direct Channel Select: case k1 ... k9: if (!Interface->Recording()) - Menu = new cDirectChannelSelect(key); + Menu = new cDisplayChannel(key); break; // Left/Right rotates trough channel groups: case kLeft|k_Repeat: @@ -276,8 +279,7 @@ int main(int argc, char *argv[]) CurrentGroup = Channels.GetPrevGroup(CurrentGroup < 1 ? 1 : CurrentGroup); if (CurrentGroup < 0) CurrentGroup = SaveGroup; - if (Channels.ShowChannel(CurrentGroup, false, true) == kOk) - Channels.SwitchTo(Channels.Get(Channels.GetNextNormal(CurrentGroup))->number); + Menu = new cDisplayChannel(CurrentGroup, false, true); } break; // Up/Down Channel Select: |