diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-04-09 13:26:56 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-04-09 13:26:56 +0200 |
commit | 87ba3ae5585878951f9db6fa4d0a975b1e9e2e68 (patch) | |
tree | 46426a3d6652ea7375f94c3a3d1d51b409e1d1f1 | |
parent | e36da7ab8d9d1da0eb2911cd229070de555c485b (diff) | |
download | vdr-87ba3ae5585878951f9db6fa4d0a975b1e9e2e68.tar.gz vdr-87ba3ae5585878951f9db6fa4d0a975b1e9e2e68.tar.bz2 |
The initial channel and volume can now be defined in the "Setup/Miscellaneous" menu
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | MANUAL | 9 | ||||
-rw-r--r-- | config.c | 8 | ||||
-rw-r--r-- | config.h | 4 | ||||
-rw-r--r-- | i18n.c | 68 | ||||
-rw-r--r-- | menu.c | 4 | ||||
-rw-r--r-- | vdr.c | 6 |
8 files changed, 98 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index da80a636..b92b0ae4 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1021,6 +1021,8 @@ Thomas Keil <tk@commedia-group.com> 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 <ke-aa@frisurf.no> for fixing checking CA capabilities with the dvb-kernel driver @@ -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). @@ -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 @@ -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(); @@ -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); @@ -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", @@ -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 -------------------------------------------------- @@ -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 <getopt.h> @@ -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(); |