summaryrefslogtreecommitdiff
path: root/tvguideosd.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 11:28:11 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 11:44:39 +0200
commit0766d679806e1ed098f562672e88ef324c3cd680 (patch)
tree727689519e3f2a6b098f7dc1337cb639f44d3321 /tvguideosd.c
parent3513f82a8c4e01bc375453c9dcb8001b7ea82cd2 (diff)
downloadvdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.gz
vdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.bz2
Change tvguideConfig to Config
Diffstat (limited to 'tvguideosd.c')
-rw-r--r--tvguideosd.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/tvguideosd.c b/tvguideosd.c
index dc70b3b..782bbab 100644
--- a/tvguideosd.c
+++ b/tvguideosd.c
@@ -22,7 +22,7 @@ cTvGuideOsd::cTvGuideOsd(void) {
cTvGuideOsd::~cTvGuideOsd() {
delete myTime;
columns.Clear();
- if (tvguideConfig.displayStatusHeader) {
+ if (config.displayStatusHeader) {
delete statusHeader;
}
if (detailView)
@@ -41,9 +41,9 @@ void cTvGuideOsd::Show(void) {
bool ok = false;
ok = osdManager.setOsd();
if (ok) {
- bool themeChanged = tvguideConfig.LoadTheme();
- tvguideConfig.SetStyle();
- tvguideConfig.setDynamicValues();
+ bool themeChanged = config.LoadTheme();
+ config.SetStyle();
+ config.setDynamicValues();
bool geoChanged = geoManager.SetGeometry(cOsd::OsdWidth(), cOsd::OsdHeight());
if (themeChanged || geoChanged) {
fontManager.DeleteFonts();
@@ -60,7 +60,7 @@ void cTvGuideOsd::Show(void) {
if (pRemoteTimers) {
isyslog("tvguide: remotetimers-plugin is available");
}
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
cString errorMsg;
if (!pRemoteTimers->Service("RemoteTimers::RefreshTimers-v1.0", &errorMsg)) {
esyslog("tvguide: %s", *errorMsg);
@@ -73,7 +73,7 @@ void cTvGuideOsd::Show(void) {
void cTvGuideOsd::drawOsd() {
cPixmap::Lock();
- int numBack = tvguideConfig.numGrids / 2;
+ int numBack = config.numGrids / 2;
int offset = 0;
const cChannel *newStartChannel;
#if VDRVERSNUM >= 20301
@@ -106,7 +106,7 @@ void cTvGuideOsd::drawOsd() {
if (offset < 0)
offset = 0;
- if (tvguideConfig.displayStatusHeader) {
+ if (config.displayStatusHeader) {
statusHeader = new cStatusHeader();
statusHeader->Draw();
statusHeader->ScaleVideo();
@@ -120,7 +120,7 @@ void cTvGuideOsd::drawOsd() {
footer = new cFooter(channelGroups);
recMenuView->SetFooter(footer);
footer->drawRedButton();
- if (tvguideConfig.channelJumpMode == eNumJump) {
+ if (config.channelJumpMode == eNumJump) {
footer->drawGreenButton();
footer->drawYellowButton();
}
@@ -160,14 +160,14 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
delete column;
}
}
- if (i == tvguideConfig.numGrids) {
+ if (i == config.numGrids) {
foundEnough = true;
break;
}
}
if (!foundEnough) {
int numCurrent = columns.Count();
- int numBack = tvguideConfig.numGrids - numCurrent;
+ int numBack = config.numGrids - numCurrent;
int newChannelNumber = columns.First()->getChannel()->Number() - numBack;
const cChannel *newStart = channels->GetByNumber(newChannelNumber);
readChannels(newStart);
@@ -180,13 +180,13 @@ void cTvGuideOsd::drawGridsChannelJump(int offset) {
activeGrid = columns.Get(offset)->getActive();
if (activeGrid)
activeGrid->SetActive();
- if (tvguideConfig.displayStatusHeader) {
+ if (config.displayStatusHeader) {
statusHeader->DrawInfoText(activeGrid);
}
- if (activeGrid && (tvguideConfig.channelJumpMode == eGroupJump)) {
+ if (activeGrid && (config.channelJumpMode == eGroupJump)) {
footer->UpdateGroupButtons(activeGrid->column->getChannel());
}
- if (tvguideConfig.displayChannelGroups) {
+ if (config.displayChannelGroups) {
channelGroups->DrawChannelGroups(columns.First()->getChannel(), columns.Last()->getChannel());
}
for (cChannelColumn *column = columns.First(); column; column = columns.Next(column)) {
@@ -213,7 +213,7 @@ void cTvGuideOsd::drawGridsTimeJump() {
if (activeGrid) {
activeGrid->SetActive();
activeGrid->Draw();
- if (tvguideConfig.displayStatusHeader) {
+ if (config.displayStatusHeader) {
statusHeader->DrawInfoText(activeGrid);
}
}
@@ -228,7 +228,7 @@ void cTvGuideOsd::setNextActiveGrid(cGrid *next) {
activeGrid = next;
activeGrid->SetActive();
activeGrid->Draw();
- if (tvguideConfig.displayStatusHeader) {
+ if (config.displayStatusHeader) {
statusHeader->DrawInfoText(activeGrid);
}
}
@@ -252,7 +252,7 @@ void cTvGuideOsd::channelForward() {
if (channelGroups->IsInLastGroup(channelRight)) {
break;
}
- colRight = new cChannelColumn(tvguideConfig.numGrids - 1, channelRight, myTime);
+ colRight = new cChannelColumn(config.numGrids - 1, channelRight, myTime);
if (colRight->readGrids()) {
break;
} else {
@@ -263,7 +263,7 @@ void cTvGuideOsd::channelForward() {
}
if (colRight) {
colAdded = true;
- if (columns.Count() == tvguideConfig.numGrids) {
+ if (columns.Count() == config.numGrids) {
cChannelColumn *cFirst = columns.First();
columns.Del(cFirst);
}
@@ -283,10 +283,10 @@ void cTvGuideOsd::channelForward() {
setNextActiveGrid(right);
}
}
- if (tvguideConfig.displayChannelGroups && colAdded) {
+ if (config.displayChannelGroups && colAdded) {
channelGroups->DrawChannelGroups(columns.First()->getChannel(), columns.Last()->getChannel());
}
- if (activeGrid && (tvguideConfig.channelJumpMode == eGroupJump)) {
+ if (activeGrid && (config.channelJumpMode == eGroupJump)) {
footer->UpdateGroupButtons(activeGrid->column->getChannel());
}
osdManager.flush();
@@ -319,7 +319,7 @@ void cTvGuideOsd::channelBack() {
}
if (colLeft) {
colAdded = true;
- if (columns.Count() == tvguideConfig.numGrids) {
+ if (columns.Count() == config.numGrids) {
cChannelColumn *cLast = columns.Last();
columns.Del(cLast);
}
@@ -340,11 +340,11 @@ void cTvGuideOsd::channelBack() {
setNextActiveGrid(left);
}
}
- if (tvguideConfig.displayChannelGroups && colAdded) {
+ if (config.displayChannelGroups && colAdded) {
channelGroups->DrawChannelGroups(columns.First()->getChannel(), columns.Last()->getChannel());
}
- if (activeGrid && (tvguideConfig.channelJumpMode == eGroupJump)) {
+ if (activeGrid && (config.channelJumpMode == eGroupJump)) {
footer->UpdateGroupButtons(activeGrid->column->getChannel());
}
osdManager.flush();
@@ -371,7 +371,7 @@ void cTvGuideOsd::timeForward() {
}
void cTvGuideOsd::ScrollForward() {
- myTime->AddStep(tvguideConfig.stepMinutes);
+ myTime->AddStep(config.stepMinutes);
timeLine->drawDateViewer();
timeLine->drawClock();
timeLine->setTimeline();
@@ -404,7 +404,7 @@ void cTvGuideOsd::timeBack() {
}
void cTvGuideOsd::ScrollBack() {
- bool tooFarInPast = myTime->DelStep(tvguideConfig.stepMinutes);
+ bool tooFarInPast = myTime->DelStep(config.stepMinutes);
if (tooFarInPast)
return;
timeLine->drawDateViewer();
@@ -421,9 +421,9 @@ void cTvGuideOsd::processKeyUp() {
if (!activeGrid) {
return;
}
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
timeBack();
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
channelBack();
}
}
@@ -432,9 +432,9 @@ void cTvGuideOsd::processKeyDown() {
if (!activeGrid) {
return;
}
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
timeForward();
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
channelForward();
}
}
@@ -442,9 +442,9 @@ void cTvGuideOsd::processKeyDown() {
void cTvGuideOsd::processKeyLeft() {
if (activeGrid == NULL)
return;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
channelBack();
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
timeBack();
}
}
@@ -452,9 +452,9 @@ void cTvGuideOsd::processKeyLeft() {
void cTvGuideOsd::processKeyRight() {
if (activeGrid == NULL)
return;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
channelForward();
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
timeForward();
}
}
@@ -474,7 +474,7 @@ void cTvGuideOsd::processKeyGreen() {
int currentCol = activeGrid->column->GetNum();
const cChannel *prev = NULL;
- if (tvguideConfig.channelJumpMode == eGroupJump) {
+ if (config.channelJumpMode == eGroupJump) {
int prevNum = channelGroups->GetPrevGroupChannelNumber(currentChannel);
if (prevNum) {
#if VDRVERSNUM >= 20301
@@ -484,8 +484,8 @@ void cTvGuideOsd::processKeyGreen() {
prev = Channels.GetByNumber(prevNum);
#endif
}
- } else if (tvguideConfig.channelJumpMode == eNumJump) {
- int i = tvguideConfig.jumpChannels + 1;
+ } else if (config.channelJumpMode == eNumJump) {
+ int i = config.jumpChannels + 1;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
for (const cChannel *channel = firstChannel; channel; channel = Channels->Prev(channel)) {
@@ -503,7 +503,7 @@ void cTvGuideOsd::processKeyGreen() {
if (prev) {
readChannels(prev);
if (columns.Count() > 0) {
- if (tvguideConfig.channelJumpMode == eGroupJump)
+ if (config.channelJumpMode == eGroupJump)
drawGridsChannelJump();
else
drawGridsChannelJump(currentCol);
@@ -520,7 +520,7 @@ void cTvGuideOsd::processKeyYellow() {
const cChannel *firstChannel = columns.First()->getChannel();
const cChannel *next = NULL;
- if (tvguideConfig.channelJumpMode == eGroupJump) {
+ if (config.channelJumpMode == eGroupJump) {
int nextNum = channelGroups->GetNextGroupChannelNumber(currentChannel);
if (nextNum) {
#if VDRVERSNUM >= 20301
@@ -530,7 +530,7 @@ void cTvGuideOsd::processKeyYellow() {
next = Channels.GetByNumber(nextNum);
#endif
}
- } else if (tvguideConfig.channelJumpMode == eNumJump) {
+ } else if (config.channelJumpMode == eNumJump) {
int i=0;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
@@ -545,7 +545,7 @@ void cTvGuideOsd::processKeyYellow() {
next = channel;
i++;
}
- if (i == (tvguideConfig.jumpChannels+1)) {
+ if (i == (config.jumpChannels+1)) {
break;
}
}
@@ -553,7 +553,7 @@ void cTvGuideOsd::processKeyYellow() {
if (next) {
readChannels(next);
if (columns.Count() > 0) {
- if (tvguideConfig.channelJumpMode == eGroupJump)
+ if (config.channelJumpMode == eGroupJump)
drawGridsChannelJump();
else
drawGridsChannelJump(currentCol);
@@ -563,22 +563,22 @@ void cTvGuideOsd::processKeyYellow() {
}
eOSState cTvGuideOsd::processKeyBlue(bool *alreadyUnlocked) {
- if (tvguideConfig.blueKeyMode == eBlueKeySwitch) {
+ if (config.blueKeyMode == eBlueKeySwitch) {
return ChannelSwitch(alreadyUnlocked);
- } else if (tvguideConfig.blueKeyMode == eBlueKeyEPG) {
+ } else if (config.blueKeyMode == eBlueKeyEPG) {
DetailedEPG();
- } else if (tvguideConfig.blueKeyMode == eBlueKeyFavorites) {
+ } else if (config.blueKeyMode == eBlueKeyFavorites) {
recMenuView->StartFavorites();
}
return osContinue;
}
eOSState cTvGuideOsd::processKeyOk(bool *alreadyUnlocked) {
- if (tvguideConfig.blueKeyMode == eBlueKeySwitch) {
+ if (config.blueKeyMode == eBlueKeySwitch) {
DetailedEPG();
- } else if (tvguideConfig.blueKeyMode == eBlueKeyEPG) {
+ } else if (config.blueKeyMode == eBlueKeyEPG) {
return ChannelSwitch(alreadyUnlocked);
- } else if (tvguideConfig.blueKeyMode == eBlueKeyFavorites) {
+ } else if (config.blueKeyMode == eBlueKeyFavorites) {
DetailedEPG();
}
return osContinue;
@@ -592,7 +592,7 @@ eOSState cTvGuideOsd::ChannelSwitch(bool *alreadyUnlocked) {
cPixmap::Unlock();
*alreadyUnlocked = true;
cDevice::PrimaryDevice()->SwitchChannel(currentChannel, true);
- if (tvguideConfig.closeOnSwitch) {
+ if (config.closeOnSwitch) {
if (detailView) {
delete detailView;
detailView = NULL;
@@ -616,7 +616,7 @@ void cTvGuideOsd::DetailedEPG() {
}
void cTvGuideOsd::processNumKey(int numKey) {
- if (tvguideConfig.numkeyMode == 0) {
+ if (config.numkeyMode == 0) {
//timely jumps with 1,3,4,6,7,9
TimeJump(numKey);
} else {
@@ -628,23 +628,23 @@ void cTvGuideOsd::processNumKey(int numKey) {
void cTvGuideOsd::TimeJump(int mode) {
switch (mode) {
case 1: {
- bool tooFarInPast = myTime->DelStep(tvguideConfig.bigStepHours*60);
+ bool tooFarInPast = myTime->DelStep(config.bigStepHours*60);
if (tooFarInPast)
return;
}
break;
case 3: {
- myTime->AddStep(tvguideConfig.bigStepHours*60);
+ myTime->AddStep(config.bigStepHours*60);
}
break;
case 4: {
- bool tooFarInPast = myTime->DelStep(tvguideConfig.hugeStepHours*60);
+ bool tooFarInPast = myTime->DelStep(config.hugeStepHours*60);
if (tooFarInPast)
return;
}
break;
case 6: {
- myTime->AddStep(tvguideConfig.hugeStepHours*60);
+ myTime->AddStep(config.hugeStepHours*60);
}
break;
case 7: {
@@ -734,13 +734,13 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
delete detailView;
detailView = NULL;
detailViewActive = false;
- if ((tvguideConfig.blueKeyMode == eBlueKeySwitch) || (tvguideConfig.blueKeyMode == eBlueKeyFavorites)) {
+ if ((config.blueKeyMode == eBlueKeySwitch) || (config.blueKeyMode == eBlueKeyFavorites)) {
state = ChannelSwitch(&alreadyUnlocked);
} else {
osdManager.flush();
state = osContinue;
}
- } else if ((Key & ~k_Repeat) == kOk && (tvguideConfig.blueKeyMode == eBlueKeyEPG)) {
+ } else if ((Key & ~k_Repeat) == kOk && (config.blueKeyMode == eBlueKeyEPG)) {
delete detailView;
detailView = NULL;
detailViewActive = false;