summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-10-22 20:40:19 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-10-22 20:40:19 +0300
commitacc0eb1627126014f0cf0861348cf456d329577b (patch)
tree80b88c9bd59802ec8930a1ee423c88835ab900ba /menu.c
parent4094e50cbb4611d7341b6d7ced1b7dfff213e32a (diff)
downloadvdr-plugin-osdteletext-acc0eb1627126014f0cf0861348cf456d329577b.tar.gz
vdr-plugin-osdteletext-acc0eb1627126014f0cf0861348cf456d329577b.tar.bz2
Convert some uses of assignments to initializer lists in constructors.
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c51
1 files changed, 19 insertions, 32 deletions
diff --git a/menu.c b/menu.c
index 3718060..72504b9 100644
--- a/menu.c
+++ b/menu.c
@@ -43,23 +43,16 @@ int TeletextBrowser::currentChannelNumber=0;
TeletextBrowser* TeletextBrowser::self=0;
-TeletextBrowser::TeletextBrowser(cTxtStatus *txtSt,Storage *s) {
- storage = s;
- cursorPos=0;
- pageFound=true;
- selectingChannel=false;
- needClearMessage=false;
- selectingChannelNumber=-1;
+TeletextBrowser::TeletextBrowser(cTxtStatus *txtSt,Storage *s)
+ : cursorPos(0), pageFound(true), selectingChannel(false),
+ needClearMessage(false), selectingChannelNumber(-1), txtStatus(txtSt),
+ suspendedReceiving(false), previousPage(currentPage),
+ previousSubPage(currentSubPage), pageBeforeNumberInput(currentPage),
+ lastActivity(time(NULL)), inactivityTimeout(-1), storage(s)
+{
self=this;
- txtStatus=txtSt;
//if (txtStatus)
// txtStatus->ForceReceiving(true);
- suspendedReceiving=false;
- previousPage=currentPage;
- previousSubPage=currentSubPage;
- pageBeforeNumberInput=currentPage;
- lastActivity=time(NULL);
- inactivityTimeout=-1;
}
@@ -639,30 +632,24 @@ void TeletextBrowser::UpdateClock() {
TeletextSetup ttSetup;
-TeletextSetup::TeletextSetup() {
+TeletextSetup::TeletextSetup()
//Set default values for setup options
-
- configuredClrBackground=clrGray50;
-
+ : configuredClrBackground(clrGray50), showClock(true),
+ suspendReceiving(false), autoUpdatePage(true),
+ //OSDHeight+width default values given in Start()
+ OSDHAlign(50), OSDVAlign(50),
+ //use the value set for VDR's min user inactivity.
+ //Initially this value could be changed via the plugin's setup, but I removed that
+ //because there is no advantage, but a possible problem when VDR's value is change
+ //after the plugin has stored its own value.
+ inactivityTimeout(Setup.MinUserInactivity),
+ HideMainMenu(false)
+{
//init key bindings
for (int i=0;i<10;i++)
mapKeyToAction[0]=(eTeletextAction)0;
mapKeyToAction[3]=Zoom;
mapKeyToAction[2]=HalfPage;
mapKeyToAction[0]=SwitchChannel;
-
- showClock=true;
- suspendReceiving=false;
- autoUpdatePage=true;
- HideMainMenu=false;
- //OSDHeight+width default values given in Start()
- OSDHAlign=50;
- OSDVAlign=50;
-
- //use the value set for VDR's min user inactivity.
- //Initially this value could be changed via the plugin's setup, but I removed that
- //because there is no advantage, but a possible problem when VDR's value is change
- //after the plugin has stored its own value.
- inactivityTimeout=Setup.MinUserInactivity;
}