diff --git a/CONTRIBUTORS b/CONTRIBUTORS index da80a636..b92b0ae4 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1021,6 +1021,8 @@ Thomas Keil 3 seconds for reporting a bug in handling the color buttons in the "Edit channel" menu for adding a note about the config files of plugins to INSTALL + for a patch that was used as a base to implement setting the initial channel and + volume Kenneth Aafløy for fixing checking CA capabilities with the dvb-kernel driver diff --git a/HISTORY b/HISTORY index 2db8e75a..5b3e5613 100644 --- a/HISTORY +++ b/HISTORY @@ -4490,3 +4490,5 @@ Video Disk Recorder Revision History - cMenuEditIntItem and cMenuEditChanItem can now be given strings to label the minimum and maximum values, and the case that no channel has been selected, respectively. +- The initial channel and volume can now be defined in the "Setup/Miscellaneous" + menu (based on a patch from Thomas Keil). diff --git a/MANUAL b/MANUAL index 9655bc36..c29d648e 100644 --- a/MANUAL +++ b/MANUAL @@ -779,6 +779,15 @@ Version 1.3 Zap Timeout = 3 The time (in seconds) until a channel counts as "previous" for switching with '0' + Inital channel = 0 The number of the channel that shall be tuned to when + VDR starts. Default is 0, which means that it will + tune to the channel that was on before VDR was stopped. + + Initial volume = -1 The volume that shall be set when VDR starts. Default + is -1, which means that the same volume as before + VDR was stopped will be used. The valid range is from + 0 (silent) to 255 (loudest). + * Executing system commands The "VDR" menu option "Commands" allows you to execute any system commands diff --git a/config.c b/config.c index b829d3a7..9dadfdca 100644 --- a/config.c +++ b/config.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.142 2006/02/25 14:12:16 kls Exp $ + * $Id: config.c 1.143 2006/04/09 12:12:01 kls Exp $ */ #include "config.h" @@ -271,6 +271,8 @@ cSetup::cSetup(void) CurrentChannel = -1; CurrentVolume = MAXVOLUME; CurrentDolby = 0; + InitialChannel = 0; + InitialVolume = -1; } cSetup& cSetup::operator= (const cSetup &s) @@ -430,6 +432,8 @@ bool cSetup::Parse(const char *Name, const char *Value) else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value); else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value); else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value); + else if (!strcasecmp(Name, "InitialChannel")) InitialChannel = atoi(Value); + else if (!strcasecmp(Name, "InitialVolume")) InitialVolume = atoi(Value); else return false; return true; @@ -496,6 +500,8 @@ bool cSetup::Save(void) Store("CurrentChannel", CurrentChannel); Store("CurrentVolume", CurrentVolume); Store("CurrentDolby", CurrentDolby); + Store("InitialChannel", InitialChannel); + Store("InitialVolume", InitialVolume); Sort(); diff --git a/config.h b/config.h index 8cf92c04..50c5afa5 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.248 2006/03/31 12:41:50 kls Exp $ + * $Id: config.h 1.249 2006/04/09 12:09:05 kls Exp $ */ #ifndef __CONFIG_H @@ -237,6 +237,8 @@ public: int CurrentChannel; int CurrentVolume; int CurrentDolby; + int InitialChannel; + int InitialVolume; int __EndData__; cSetup(void); cSetup& operator= (const cSetup &s); diff --git a/i18n.c b/i18n.c index 06c58ecd..feabf70b 100644 --- a/i18n.c +++ b/i18n.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: i18n.c 1.254 2006/04/08 13:52:28 kls Exp $ + * $Id: i18n.c 1.255 2006/04/09 13:04:50 kls Exp $ * * Translations provided by: * @@ -4404,6 +4404,72 @@ const tI18nPhrase Phrases[] = { "Zap timeout (s)", "Èasový limit Zap (s)", }, + { "Setup.Miscellaneous$Initial channel", + "Kanal beim Einschalten", + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + }, + { "Setup.Miscellaneous$Initial volume", + "Lautstärke beim Einschalten", + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + }, + { "Setup.Miscellaneous$as before", + "wie vorher", + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + "",// TODO + }, // The days of the week: { "MTWTFSS", "MDMDFSS", diff --git a/menu.c b/menu.c index c7842be0..0cb4f847 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.426 2006/04/09 12:00:15 kls Exp $ + * $Id: menu.c 1.427 2006/04/09 13:13:33 kls Exp $ */ #include "menu.h" @@ -2584,6 +2584,8 @@ cMenuSetupMisc::cMenuSetupMisc(void) Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. user inactivity (min)"), &data.MinUserInactivity)); Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$SVDRP timeout (s)"), &data.SVDRPTimeout)); Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Zap timeout (s)"), &data.ZapTimeout)); + Add(new cMenuEditChanItem(tr("Setup.Miscellaneous$Initial channel"), &data.InitialChannel, tr("Setup.Miscellaneous$as before"))); + Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Initial volume"), &data.InitialVolume, -1, 255, tr("Setup.Miscellaneous$as before"))); } // --- cMenuSetupPluginItem -------------------------------------------------- diff --git a/vdr.c b/vdr.c index 904f637a..8d9ab54a 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.253 2006/04/09 09:10:41 kls Exp $ + * $Id: vdr.c 1.254 2006/04/09 12:22:46 kls Exp $ */ #include @@ -632,6 +632,10 @@ int main(int argc, char *argv[]) if (!cDevice::WaitForAllDevicesReady(DEVICEREADYTIMEOUT)) dsyslog("not all devices ready after %d seconds", DEVICEREADYTIMEOUT); + if (Setup.InitialChannel > 0) + Setup.CurrentChannel = Setup.InitialChannel; + if (Setup.InitialVolume >= 0) + Setup.CurrentVolume = Setup.InitialVolume; Channels.SwitchTo(Setup.CurrentChannel); if (MuteAudio) cDevice::PrimaryDevice()->ToggleMute();