summaryrefslogtreecommitdiff
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
parent3513f82a8c4e01bc375453c9dcb8001b7ea82cd2 (diff)
downloadvdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.gz
vdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.bz2
Change tvguideConfig to Config
-rw-r--r--channelgroup.c12
-rw-r--r--channelgroups.c4
-rw-r--r--channeljump.c4
-rw-r--r--config.h4
-rw-r--r--detailview.c6
-rw-r--r--dummygrid.c14
-rw-r--r--epggrid.c22
-rw-r--r--fontmanager.c60
-rw-r--r--footer.c24
-rw-r--r--geometrymanager.c38
-rw-r--r--grid.c2
-rw-r--r--headergrid.c28
-rw-r--r--imagecache.c52
-rw-r--r--imageloader.c44
-rw-r--r--imagemagickwrapper.c20
-rw-r--r--osdmanager.c2
-rw-r--r--recmanager.c40
-rw-r--r--recmenu.c4
-rw-r--r--recmenuitem.c30
-rw-r--r--recmenus.c32
-rw-r--r--recmenuview.c10
-rw-r--r--setup.c208
-rw-r--r--setup.h2
-rw-r--r--statusheader.c12
-rw-r--r--styledpixmap.c6
-rw-r--r--switchtimer.c6
-rw-r--r--timeline.c58
-rw-r--r--timer.c12
-rw-r--r--tvguide.c20
-rw-r--r--tvguideosd.c108
-rw-r--r--view.c26
31 files changed, 455 insertions, 455 deletions
diff --git a/channelgroup.c b/channelgroup.c
index cc1864c..99420d6 100644
--- a/channelgroup.c
+++ b/channelgroup.c
@@ -36,12 +36,12 @@ void cChannelGroupGrid::SetBackground() {
void cChannelGroupGrid::SetGeometry(int start, int end) {
int x, y, width, height;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
x = geoManager.timeLineWidth + start*geoManager.colWidth;
y = geoManager.statusHeaderHeight;
width = (end - start + 1) * geoManager.colWidth;
height = geoManager.channelGroupsHeight;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
x = 0;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + start*geoManager.rowHeight;
width = geoManager.channelGroupsWidth;
@@ -51,17 +51,17 @@ void cChannelGroupGrid::SetGeometry(int start, int end) {
}
void cChannelGroupGrid::Draw(void) {
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
drawBackgroundGraphical(bgChannelGroup);
} else {
drawBackground();
drawBorder();
}
tColor colorText = theme.Color(clrFont);
- tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
- if (tvguideConfig.displayMode == eVertical) {
+ tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
+ if (config.displayMode == eVertical) {
DrawVertical(colorText, colorTextBack);
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
DrawHorizontal(colorText, colorTextBack);
}
}
diff --git a/channelgroups.c b/channelgroups.c
index 06e3285..8447ba4 100644
--- a/channelgroups.c
+++ b/channelgroups.c
@@ -41,7 +41,7 @@ void cChannelGroups::ReadChannelGroups(void) {
}
if (channelGroups.size() > 0) {
channelGroups[channelGroups.size()-1].SetChannelStop(lastChannelNumber);
- if ((tvguideConfig.hideLastGroup)&&(channelGroups.size() > 1)) {
+ if ((config.hideLastGroup)&&(channelGroups.size() > 1)) {
channelGroups.pop_back();
}
}
@@ -96,7 +96,7 @@ int cChannelGroups::GetNextGroupChannelNumber(const cChannel *channel) {
}
bool cChannelGroups::IsInLastGroup(const cChannel *channel) {
- if (!tvguideConfig.hideLastGroup)
+ if (!config.hideLastGroup)
return false;
if (channelGroups.size() > 0) {
if (channel->Number() > channelGroups[channelGroups.size()-1].StopChannel()) {
diff --git a/channeljump.c b/channeljump.c
index 425b085..cf54b8c 100644
--- a/channeljump.c
+++ b/channeljump.c
@@ -10,7 +10,7 @@ cChannelJump::cChannelJump(cChannelGroups *channelGroups) {
this->channelGroups = channelGroups;
pixmapText = NULL;
channel = 0;
- if (!tvguideConfig.hideLastGroup) {
+ if (!config.hideLastGroup) {
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
maxChannels = Channels->MaxNumber();
@@ -41,7 +41,7 @@ void cChannelJump::SetPixmaps(void) {
}
void cChannelJump::Draw(void) {
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
drawBackgroundGraphical(bgChannelJump);
} else {
pixmap->Fill(theme.Color(clrBackground));
diff --git a/config.h b/config.h
index 2f277b5..6fe6722 100644
--- a/config.h
+++ b/config.h
@@ -175,7 +175,7 @@ class cTvguideConfig {
};
#ifdef DEFINE_CONFIG
- cTvguideConfig tvguideConfig;
+ cTvguideConfig config;
cOsdManager osdManager;
cGeometryManager geoManager;
cFontManager fontManager;
@@ -183,7 +183,7 @@ class cTvguideConfig {
cTheme theme;
cPlugin* pRemoteTimers = NULL;
#else
- extern cTvguideConfig tvguideConfig;
+ extern cTvguideConfig config;
extern cOsdManager osdManager;
extern cGeometryManager geoManager;
extern cFontManager fontManager;
diff --git a/detailview.c b/detailview.c
index bfc3bd5..8042f9d 100644
--- a/detailview.c
+++ b/detailview.c
@@ -74,8 +74,8 @@ std::string cDetailView::LoadReruns(void) {
Epgsearch_searchresults_v1_0 data;
std::string strQuery = event->Title();
- if (tvguideConfig.displayRerunsDetailEPGView > 0) {
- if (tvguideConfig.useSubtitleRerun == 2 && !isempty(event->ShortText())) {
+ if (config.displayRerunsDetailEPGView > 0) {
+ if (config.useSubtitleRerun == 2 && !isempty(event->ShortText())) {
strQuery += "~";
strQuery += event->ShortText();
}
@@ -95,7 +95,7 @@ std::string cDetailView::LoadReruns(void) {
if (list && (list->Count() > 1)) {
foundRerun = true;
int i = 0;
- for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = list->First(); r && i < tvguideConfig.numReruns; r = list->Next(r)) {
+ for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = list->First(); r && i < config.numReruns; r = list->Next(r)) {
if ((event->ChannelID() == r->event->ChannelID()) && (event->StartTime() == r->event->StartTime()))
continue;
i++;
diff --git a/dummygrid.c b/dummygrid.c
index 757848d..53301d7 100644
--- a/dummygrid.c
+++ b/dummygrid.c
@@ -27,7 +27,7 @@ void cDummyGrid::SetViewportHeight() {
void cDummyGrid::PositionPixmap() {
int x0, y0;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
x0 = column->getX();
y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
if ( column->Start() < StartTime() ) {
@@ -41,7 +41,7 @@ void cDummyGrid::PositionPixmap() {
} else {
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
}
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
y0 = column->getY();
if ( column->Start() < StartTime() ) {
@@ -59,7 +59,7 @@ void cDummyGrid::PositionPixmap() {
}
void cDummyGrid::setText() {
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
text->Set(*strText, fontManager.FontGrid, geoManager.colWidth-2*borderWidth);
}
}
@@ -67,13 +67,13 @@ void cDummyGrid::setText() {
void cDummyGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
tColor colorTextBack;
- if (tvguideConfig.style == eStyleFlat)
+ if (config.style == eStyleFlat)
colorTextBack = color;
- else if (tvguideConfig.style == eStyleGraphical)
+ else if (config.style == eStyleGraphical)
colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack);
else
colorTextBack = clrTransparent;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
if (Height()/geoManager.minutePixel < 6)
return;
int textHeight = fontManager.FontGrid->Height();
@@ -82,7 +82,7 @@ void cDummyGrid::drawText() {
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
}
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
if (Width()/geoManager.minutePixel < 10) {
int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
diff --git a/epggrid.c b/epggrid.c
index 467b5fd..9dc0df8 100644
--- a/epggrid.c
+++ b/epggrid.c
@@ -33,7 +33,7 @@ void cEpgGrid::SetViewportHeight() {
}
void cEpgGrid::PositionPixmap() {
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
int x0 = column->getX();
int y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
if ( column->Start() < StartTime() ) {
@@ -45,7 +45,7 @@ void cEpgGrid::PositionPixmap() {
} else {
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
}
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
int x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
int y0 = column->getY();
if ( column->Start() < StartTime() ) {
@@ -63,7 +63,7 @@ void cEpgGrid::PositionPixmap() {
void cEpgGrid::SetTimer() {
hasTimer = false;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Event_v1_0 rt;
rt.event = event;
if (pRemoteTimers->Service("RemoteTimers::GetTimerByEvent-v1.0", &rt))
@@ -91,12 +91,12 @@ void cEpgGrid::SetSwitchTimer() {
}
void cEpgGrid::setText() {
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
cString strText;
strText = cString::sprintf("%s - %s:\n%s", *(event->GetTimeString()), *(event->GetEndTimeString()), event->Title());
text->Set(*(strText), fontManager.FontGrid, geoManager.colWidth-2*borderWidth);
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth-2*borderWidth);
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
timeString = cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
}
}
@@ -104,13 +104,13 @@ void cEpgGrid::setText() {
void cEpgGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
tColor colorTextBack;
- if (tvguideConfig.style == eStyleFlat)
+ if (config.style == eStyleFlat)
colorTextBack = color;
- else if (tvguideConfig.style == eStyleGraphical)
+ else if (config.style == eStyleGraphical)
colorTextBack = (active)?theme.Color(clrGridActiveFontBack):theme.Color(clrGridFontBack);
else
colorTextBack = clrTransparent;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
if (Height()/geoManager.minutePixel < 6)
return;
int textHeight = fontManager.FontGrid->Height();
@@ -126,7 +126,7 @@ void cEpgGrid::drawText() {
pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
}
}
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
if (Width()/geoManager.minutePixel < 10) {
int titleY = (geoManager.rowHeight - fontManager.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, colorTextBack, fontManager.FontGridHorizontal);
@@ -134,7 +134,7 @@ void cEpgGrid::drawText() {
}
cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
int titleY = 0;
- if (tvguideConfig.showTimeInGrid) {
+ if (config.showTimeInGrid) {
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height())/2;
} else {
@@ -170,7 +170,7 @@ void cEpgGrid::drawText() {
void cEpgGrid::drawIcon(cString iconText, tColor color) {
- const cFont *font = (tvguideConfig.displayMode == eVertical)
+ const cFont *font = (config.displayMode == eVertical)
?fontManager.FontGrid
:fontManager.FontGridHorizontalSmall;
int textWidth = font->Width(*iconText)+2*borderWidth;
diff --git a/fontmanager.c b/fontmanager.c
index ced4879..fbf6f45 100644
--- a/fontmanager.c
+++ b/fontmanager.c
@@ -12,34 +12,34 @@ cFontManager::~cFontManager() {
void cFontManager::SetFonts() {
InitialiseFontType();
//Common Fonts
- FontButton = CreateFont(geoManager.footerHeight/3 + 4 + tvguideConfig.FontButtonDelta);
- FontDetailView = CreateFont(geoManager.osdHeight/30 + tvguideConfig.FontDetailViewDelta);
- FontDetailViewSmall = CreateFont(geoManager.osdHeight/40 + tvguideConfig.FontDetailViewSmallDelta);
- FontDetailHeader = CreateFont(geoManager.osdHeight/27 + tvguideConfig.FontDetailHeaderDelta);
- FontDetailHeaderLarge = CreateFont(geoManager.osdHeight/20 + tvguideConfig.FontDetailHeaderDelta);
- FontMessageBox = CreateFont(geoManager.osdHeight/33 + tvguideConfig.FontMessageBoxDelta);
- FontMessageBoxLarge = CreateFont(geoManager.osdHeight/30 + tvguideConfig.FontMessageBoxLargeDelta);
- FontStatusHeader = CreateFont(geoManager.statusHeaderHeight/6 - 4 + tvguideConfig.FontStatusHeaderDelta);
- FontStatusHeaderLarge = CreateFont(geoManager.statusHeaderHeight/5 + tvguideConfig.FontStatusHeaderLargeDelta);
+ FontButton = CreateFont(geoManager.footerHeight/3 + 4 + config.FontButtonDelta);
+ FontDetailView = CreateFont(geoManager.osdHeight/30 + config.FontDetailViewDelta);
+ FontDetailViewSmall = CreateFont(geoManager.osdHeight/40 + config.FontDetailViewSmallDelta);
+ FontDetailHeader = CreateFont(geoManager.osdHeight/27 + config.FontDetailHeaderDelta);
+ FontDetailHeaderLarge = CreateFont(geoManager.osdHeight/20 + config.FontDetailHeaderDelta);
+ FontMessageBox = CreateFont(geoManager.osdHeight/33 + config.FontMessageBoxDelta);
+ FontMessageBoxLarge = CreateFont(geoManager.osdHeight/30 + config.FontMessageBoxLargeDelta);
+ FontStatusHeader = CreateFont(geoManager.statusHeaderHeight/6 - 4 + config.FontStatusHeaderDelta);
+ FontStatusHeaderLarge = CreateFont(geoManager.statusHeaderHeight/5 + config.FontStatusHeaderLargeDelta);
//Fonts for vertical Display
- FontChannelHeader = CreateFont(geoManager.colWidth/10 + tvguideConfig.FontChannelHeaderDelta);
- FontChannelGroups = CreateFont(geoManager.colWidth/8 + tvguideConfig.FontChannelGroupsDelta);
- FontGrid = CreateFont(geoManager.colWidth/12 + tvguideConfig.FontGridDelta);
- FontGridSmall = CreateFont(geoManager.colWidth/12 + tvguideConfig.FontGridSmallDelta);
- FontTimeLineWeekday = CreateFont(geoManager.timeLineWidth/3 + tvguideConfig.FontTimeLineWeekdayDelta);
- FontTimeLineDate = CreateFont(geoManager.timeLineWidth/4 + tvguideConfig.FontTimeLineDateDelta);
- FontTimeLineTime = CreateFont(geoManager.timeLineWidth/4 + tvguideConfig.FontTimeLineTimeDelta);
+ FontChannelHeader = CreateFont(geoManager.colWidth/10 + config.FontChannelHeaderDelta);
+ FontChannelGroups = CreateFont(geoManager.colWidth/8 + config.FontChannelGroupsDelta);
+ FontGrid = CreateFont(geoManager.colWidth/12 + config.FontGridDelta);
+ FontGridSmall = CreateFont(geoManager.colWidth/12 + config.FontGridSmallDelta);
+ FontTimeLineWeekday = CreateFont(geoManager.timeLineWidth/3 + config.FontTimeLineWeekdayDelta);
+ FontTimeLineDate = CreateFont(geoManager.timeLineWidth/4 + config.FontTimeLineDateDelta);
+ FontTimeLineTime = CreateFont(geoManager.timeLineWidth/4 + config.FontTimeLineTimeDelta);
//Fonts for horizontal Display
- FontChannelHeaderHorizontal = CreateFont(geoManager.rowHeight/3 + tvguideConfig.FontChannelHeaderHorizontalDelta);
- FontChannelGroupsHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + tvguideConfig.FontChannelGroupsHorizontalDelta);
- FontGridHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + tvguideConfig.FontGridHorizontalDelta);
- FontGridHorizontalSmall = CreateFont(geoManager.rowHeight/4 + tvguideConfig.FontGridHorizontalSmallDelta);
- FontTimeLineDateHorizontal = CreateFont(geoManager.timeLineHeight/2 + 5 + tvguideConfig.FontTimeLineDateHorizontalDelta);
- FontTimeLineTimeHorizontal = CreateFont(geoManager.timeLineHeight/2 + tvguideConfig.FontTimeLineTimeHorizontalDelta);
+ FontChannelHeaderHorizontal = CreateFont(geoManager.rowHeight/3 + config.FontChannelHeaderHorizontalDelta);
+ FontChannelGroupsHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + config.FontChannelGroupsHorizontalDelta);
+ FontGridHorizontal = CreateFont(geoManager.rowHeight/3 + 5 + config.FontGridHorizontalDelta);
+ FontGridHorizontalSmall = CreateFont(geoManager.rowHeight/4 + config.FontGridHorizontalSmallDelta);
+ FontTimeLineDateHorizontal = CreateFont(geoManager.timeLineHeight/2 + 5 + config.FontTimeLineDateHorizontalDelta);
+ FontTimeLineTimeHorizontal = CreateFont(geoManager.timeLineHeight/2 + config.FontTimeLineTimeHorizontalDelta);
//Fonts for RecMenu
- FontRecMenuItem = CreateFont(geoManager.osdHeight/30 + tvguideConfig.FontRecMenuItemDelta);
- FontRecMenuItemSmall = CreateFont(geoManager.osdHeight/40 + tvguideConfig.FontRecMenuItemSmallDelta);
- FontRecMenuItemLarge = CreateFont(geoManager.osdHeight/25 + tvguideConfig.FontRecMenuItemLargeDelta);
+ FontRecMenuItem = CreateFont(geoManager.osdHeight/30 + config.FontRecMenuItemDelta);
+ FontRecMenuItemSmall = CreateFont(geoManager.osdHeight/40 + config.FontRecMenuItemSmallDelta);
+ FontRecMenuItemLarge = CreateFont(geoManager.osdHeight/25 + config.FontRecMenuItemLargeDelta);
}
void cFontManager::DeleteFonts() {
@@ -71,15 +71,15 @@ void cFontManager::DeleteFonts() {
}
void cFontManager::InitialiseFontType(void) {
- if (tvguideConfig.fontIndex == 0) {
- fontName = tvguideConfig.fontNameDefault;
+ if (config.fontIndex == 0) {
+ fontName = config.fontNameDefault;
} else {
cStringList availableFonts;
cFont::GetAvailableFontNames(&availableFonts);
- if (availableFonts[tvguideConfig.fontIndex-1]) {
- fontName = availableFonts[tvguideConfig.fontIndex-1];
+ if (availableFonts[config.fontIndex-1]) {
+ fontName = availableFonts[config.fontIndex-1];
} else
- fontName = tvguideConfig.fontNameDefault;
+ fontName = config.fontNameDefault;
}
cFont *test = NULL;
test = cFont::CreateFont(*fontName, 30);
diff --git a/footer.c b/footer.c
index 7c51ff7..155b9d4 100644
--- a/footer.c
+++ b/footer.c
@@ -26,7 +26,7 @@ void cFooter::drawRedButton() {
}
void cFooter::drawGreenButton() {
- cString text = cString::sprintf("%d %s", tvguideConfig.jumpChannels, tr("Channels back"));
+ cString text = cString::sprintf("%d %s", config.jumpChannels, tr("Channels back"));
DrawButton(*text, theme.Color(clrButtonGreen), theme.Color(clrButtonGreenBorder), oeButtonGreen, positionButtons[1]);
}
@@ -36,7 +36,7 @@ void cFooter::drawGreenButton(const char *text) {
}
void cFooter::drawYellowButton() {
- cString text = cString::sprintf("%d %s", tvguideConfig.jumpChannels, tr("Channels forward"));
+ cString text = cString::sprintf("%d %s", config.jumpChannels, tr("Channels forward"));
DrawButton(*text, theme.Color(clrButtonYellow), theme.Color(clrButtonYellowBorder), oeButtonYellow, positionButtons[2]);
}
@@ -47,14 +47,14 @@ void cFooter::drawYellowButton(const char *text) {
void cFooter::drawBlueButton(bool detailedEPG) {
cString text;
- if (tvguideConfig.blueKeyMode == eBlueKeySwitch)
+ if (config.blueKeyMode == eBlueKeySwitch)
text = tr("Switch to Channel");
- else if (tvguideConfig.blueKeyMode == eBlueKeyEPG) {
+ else if (config.blueKeyMode == eBlueKeyEPG) {
if (!detailedEPG)
text = tr("Detailed EPG");
else
text = tr("Close detailed EPG");
- } else if (tvguideConfig.blueKeyMode == eBlueKeyFavorites) {
+ } else if (config.blueKeyMode == eBlueKeyFavorites) {
if (!detailedEPG)
text = tr("Favorites");
else
@@ -80,7 +80,7 @@ void cFooter::SetDetailedViewMode(bool fromRecMenu) {
if (fromRecMenu) {
ClearButton(positionButtons[0]);
ClearButton(positionButtons[3]);
- } else if (tvguideConfig.blueKeyMode != eBlueKeySwitch) {
+ } else if (config.blueKeyMode != eBlueKeySwitch) {
ClearButton(positionButtons[3]);
drawBlueButton(true);
}
@@ -89,7 +89,7 @@ void cFooter::SetDetailedViewMode(bool fromRecMenu) {
void cFooter::LeaveDetailedViewMode(const cChannel *channel) {
drawRedButton();
drawBlueButton();
- if (tvguideConfig.channelJumpMode == eNumJump) {
+ if (config.channelJumpMode == eNumJump) {
drawGreenButton();
drawYellowButton();
} else {
@@ -128,20 +128,20 @@ void cFooter::SetButtonPositions(void) {
}
void cFooter::DrawButton(const char *text, tColor color, tColor borderColor, eOsdElementType buttonType, int num) {
- tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
+ tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
int left = num * geoManager.buttonWidth + (2 * num + 1) * geoManager.buttonBorder;
- if ((tvguideConfig.style == eStyleBlendingMagick) || (tvguideConfig.style == eStyleBlendingDefault)) {
+ if ((config.style == eStyleBlendingMagick) || (config.style == eStyleBlendingDefault)) {
cImageLoader imgLoader;
imgLoader.DrawBackground(theme.Color(clrButtonBlend), color, geoManager.buttonWidth-4, geoManager.buttonHeight-4);
footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), borderColor);
footer->DrawImage(cPoint(left+2, buttonY+2), imgLoader.GetImage());
- if (tvguideConfig.roundedCorners) {
+ if (config.roundedCorners) {
int borderRadius = 12;
int borderWidth = 2;
DrawRoundedCorners(footer, left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight, borderRadius, borderWidth, borderColor);
}
- } else if (tvguideConfig.style == eStyleGraphical) {
+ } else if (config.style == eStyleGraphical) {
cImage *button = imgCache.GetOsdElement(buttonType);
if (button) {
footer->DrawImage(cPoint(left, buttonY), *button);
@@ -149,7 +149,7 @@ void cFooter::DrawButton(const char *text, tColor color, tColor borderColor, eOs
} else {
footer->DrawRectangle(cRect(left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight), borderColor);
footer->DrawRectangle(cRect(left+1, buttonY+1, geoManager.buttonWidth-2, geoManager.buttonHeight-2), color);
- if (tvguideConfig.roundedCorners) {
+ if (config.roundedCorners) {
int borderRadius = 12;
int borderWidth = 1;
DrawRoundedCorners(footer, left, buttonY, geoManager.buttonWidth, geoManager.buttonHeight, borderRadius, borderWidth, borderColor);
diff --git a/geometrymanager.c b/geometrymanager.c
index 35da932..a0f3a66 100644
--- a/geometrymanager.c
+++ b/geometrymanager.c
@@ -20,39 +20,39 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
this->osdHeight = osdHeight;
esyslog("tvguide: Set OSD to %d x %d px", osdWidth, osdHeight);
- statusHeaderHeight = (tvguideConfig.displayStatusHeader)?(tvguideConfig.headerHeightPercent * osdHeight / 100):0;
+ statusHeaderHeight = (config.displayStatusHeader) ? (config.headerHeightPercent * osdHeight / 100):0;
tvFrameWidth = statusHeaderHeight * 16 / 9;
- headerContentWidth = (tvguideConfig.scaleVideo)?(osdWidth - tvFrameWidth):osdWidth;
- channelGroupsWidth = (tvguideConfig.displayChannelGroups)?(tvguideConfig.channelGroupsPercent * osdWidth / 100):0;
- channelGroupsHeight = (tvguideConfig.displayChannelGroups)?(tvguideConfig.channelGroupsPercent * osdHeight / 100):0;
- channelHeaderWidth = tvguideConfig.channelHeaderWidthPercent * osdWidth / 100;
- channelHeaderHeight = tvguideConfig.channelHeaderHeightPercent * osdHeight / 100;
- timeLineWidth = tvguideConfig.timeLineWidthPercent * osdWidth / 100;
- timeLineHeight = tvguideConfig.timeLineHeightPercent * osdHeight / 100;
- footerHeight = tvguideConfig.footerHeightPercent * osdHeight / 100;
+ headerContentWidth = (config.scaleVideo) ? (osdWidth - tvFrameWidth):osdWidth;
+ channelGroupsWidth = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdWidth / 100):0;
+ channelGroupsHeight = (config.displayChannelGroups) ? (config.channelGroupsPercent * osdHeight / 100):0;
+ channelHeaderWidth = config.channelHeaderWidthPercent * osdWidth / 100;
+ channelHeaderHeight = config.channelHeaderHeightPercent * osdHeight / 100;
+ timeLineWidth = config.timeLineWidthPercent * osdWidth / 100;
+ timeLineHeight = config.timeLineHeightPercent * osdHeight / 100;
+ footerHeight = config.footerHeightPercent * osdHeight / 100;
footerY = osdHeight - footerHeight;
- if (tvguideConfig.displayMode == eVertical) {
- colWidth = (osdWidth - timeLineWidth) / tvguideConfig.channelCols;
+ if (config.displayMode == eVertical) {
+ colWidth = (osdWidth - timeLineWidth) / config.channelCols;
rowHeight = 0;
- minutePixel = (osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / tvguideConfig.displayTime;
+ minutePixel = (osdHeight - statusHeaderHeight - channelGroupsHeight - channelHeaderHeight - footerHeight) / config.displayTime;
channelLogoWidth = colWidth;
channelLogoHeight = channelHeaderHeight;
- logoWidth = channelLogoWidth/2 - 15;
- logoHeight = logoWidth * tvguideConfig.logoHeightRatio / tvguideConfig.logoWidthRatio;
+ logoWidth = channelLogoWidth / 2 - 15;
+ logoHeight = logoWidth * config.logoHeightRatio / config.logoWidthRatio;
timeLineGridWidth = timeLineWidth;
timeLineGridHeight = minutePixel * 30;
dateVieverWidth = timeLineWidth;
dateVieverHeight = (channelHeaderHeight + channelGroupsHeight) * 2 / 3;
clockWidth = dateVieverWidth;
clockHeight = (channelHeaderHeight + channelGroupsHeight) - dateVieverHeight;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
colWidth = 0;
- rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / tvguideConfig.channelRows;
- minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / tvguideConfig.displayHorizontalTime;
+ rowHeight = (osdHeight - statusHeaderHeight - timeLineHeight - footerHeight) / config.channelRows;
+ minutePixel = (osdWidth - channelHeaderWidth - channelGroupsWidth) / config.displayHorizontalTime;
channelLogoWidth = channelHeaderWidth;
channelLogoHeight = rowHeight;
- logoWidth = channelLogoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
+ logoWidth = channelLogoHeight * config.logoWidthRatio / config.logoHeightRatio;
logoHeight = channelLogoHeight;
timeLineGridWidth = geoManager.minutePixel * 30;
timeLineGridHeight = geoManager.timeLineHeight;
@@ -65,7 +65,7 @@ bool cGeometryManager::SetGeometry(int osdWidth, int osdHeight, bool force) {
buttonWidth = osdWidth / 4 - 2 * buttonBorder;
buttonHeight = footerHeight - 3 * buttonBorder;
- epgViewHeaderHeight = tvguideConfig.headerHeightPercent * osdHeight / 100;
+ epgViewHeaderHeight = config.headerHeightPercent * osdHeight / 100;
borderRecMenus = 10;
diff --git a/grid.c b/grid.c
index a760081..18b906d 100644
--- a/grid.c
+++ b/grid.c
@@ -34,7 +34,7 @@ void cGrid::Draw() {
return;
}
if (dirty) {
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
drawBackgroundGraphical(bgGrid, active);
drawText();
} else {
diff --git a/headergrid.c b/headergrid.c
index 1fb4f5a..b077a0d 100644
--- a/headergrid.c
+++ b/headergrid.c
@@ -15,10 +15,10 @@ void cHeaderGrid::createBackground(int num) {
color = theme.Color(clrHeader);
colorBlending = theme.Color(clrHeaderBlending);
int x, y;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
x = geoManager.timeLineWidth + num*geoManager.colWidth;
y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
x = geoManager.channelGroupsWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
}
@@ -28,7 +28,7 @@ void cHeaderGrid::createBackground(int num) {
return;
}
pixmapLogo->Fill(clrTransparent);
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
drawBackgroundGraphical(bgChannelHeader);
} else {
drawBackground();
@@ -37,9 +37,9 @@ void cHeaderGrid::createBackground(int num) {
}
void cHeaderGrid::drawChannel(const cChannel *channel) {
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
drawChannelVertical(channel);
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
drawChannelHorizontal(channel);
}
}
@@ -48,11 +48,11 @@ void cHeaderGrid::drawChannel(const cChannel *channel) {
void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
int logoWidth = geoManager.logoWidth;
- int logoX = tvguideConfig.displayChannelName ? 5 : (Width() - logoWidth) / 2;
+ int logoX = config.displayChannelName ? 5 : (Width() - logoWidth) / 2;
int textX = 5;
int textY = (Height() - fontManager.FontChannelHeaderHorizontal->Height()) / 2;
bool logoFound = false;
- if (!tvguideConfig.hideChannelLogos) {
+ if (!config.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
if (logo) {
const int logoheight = logo->Height();
@@ -65,13 +65,13 @@ void cHeaderGrid::drawChannelHorizontal(const cChannel *channel) {
if (!logoFound) {
drawText = true;
}
- if (tvguideConfig.displayChannelName) {
+ if (config.displayChannelName) {
drawText = true;
textX += logoWidth + 5;
textWidthMax -= textX;
}
if (drawText) {
- tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
+ tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
cString strChannel = cString::sprintf("%d %s", channel->Number(), channel->Name());
strChannel = CutText(*strChannel, textWidthMax, fontManager.FontChannelHeaderHorizontal).c_str();
pixmap->DrawText(cPoint(textX, textY), *strChannel, theme.Color(clrFontHeader), colorTextBack, fontManager.FontChannelHeaderHorizontal);
@@ -90,7 +90,7 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
int lineHeight = fontManager.FontChannelHeader->Height();
int yStart = (geoManager.channelHeaderHeight - lines * lineHeight) / 2 + 8;
bool logoFound = false;
- if (!tvguideConfig.hideChannelLogos) {
+ if (!config.hideChannelLogos) {
cImage *logo = imgCache.GetLogo(channel);
if (logo) {
pixmapLogo->DrawImage(cPoint((Width() - logoWidth) / 2, 6), *logo);
@@ -100,13 +100,13 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
bool drawText = false;
if (!logoFound) {
drawText = true;
- } else if (tvguideConfig.displayChannelName) {
+ } else if (config.displayChannelName) {
drawText = true;
yStart = logoHeight;
}
if (!drawText)
return;
- tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
+ tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
for (int i = 0; i < lines; i++) {
int textWidth = fontManager.FontChannelHeader->Width(tw.GetLine(i));
int xText = (geoManager.colWidth - textWidth) / 2;
@@ -118,12 +118,12 @@ void cHeaderGrid::drawChannelVertical(const cChannel *channel) {
void cHeaderGrid::setPosition(int num) {
int x, y, width, height;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
x = geoManager.timeLineWidth + num*geoManager.colWidth;
y = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight;
width = geoManager.colWidth;
height = geoManager.channelHeaderHeight;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
x = geoManager.channelGroupsWidth;
y = geoManager.statusHeaderHeight + geoManager.timeLineHeight + num*geoManager.rowHeight;
width = geoManager.channelHeaderWidth;
diff --git a/imagecache.c b/imagecache.c
index 63a938e..9b5473c 100644
--- a/imagecache.c
+++ b/imagecache.c
@@ -28,7 +28,7 @@ cImageCache::~cImageCache() {
}
void cImageCache::CreateCache(void) {
- if (tvguideConfig.style != eStyleGraphical)
+ if (config.style != eStyleGraphical)
return;
esyslog("tvguide: Creating Image Cache");
int start = cTimeMs::Now();
@@ -85,7 +85,7 @@ void cImageCache::CreateOsdIconCache(void) {
InsertIntoOsdElementCache(oeButtonBlue, geoManager.buttonWidth, geoManager.buttonHeight);
//Channel Logo Background
- if (tvguideConfig.displayMode == eHorizontal) {
+ if (config.displayMode == eHorizontal) {
success = LoadIcon("osdElements/channellogoback_horizontal");
} else {
success = LoadIcon("osdElements/channellogoback_vertical");
@@ -95,7 +95,7 @@ void cImageCache::CreateOsdIconCache(void) {
//Timeline Elements
std::string imgTimeline1, imgTimeline2, imgDateViewer;
- if (tvguideConfig.displayMode == eHorizontal) {
+ if (config.displayMode == eHorizontal) {
imgTimeline1 = "osdElements/timeline1_horizontal";
imgTimeline2 = "osdElements/timeline2_horizontal";
imgDateViewer = "osdElements/timeline2_horizontal";
@@ -129,7 +129,7 @@ void cImageCache::PrepareGridIconCache(void) {
//Create Buffers for Background
gridsAvailable = true;
std::string grid, grid_active;
- if (tvguideConfig.displayMode == eHorizontal) {
+ if (config.displayMode == eHorizontal) {
grid = "osdElements/grid_horizontal";
grid_active = "osdElements/grid_active_horizontal";
} else {
@@ -158,7 +158,7 @@ void cImageCache::PrepareGridIconCache(void) {
imgBottom = NULL;
imgBottomActive = NULL;
- if (tvguideConfig.displayMode == eHorizontal) {
+ if (config.displayMode == eHorizontal) {
std::string left = "osdElements/grid_left";
std::string right = "osdElements/grid_right";
std::string left_active = "osdElements/grid_active_left";
@@ -214,7 +214,7 @@ void cImageCache::PrepareGridIconCache(void) {
}
void cImageCache::CreateGridIconCache(void) {
- if (tvguideConfig.displayMode == eHorizontal) {
+ if (config.displayMode == eHorizontal) {
int gridHeight = geoManager.rowHeight;
for (int minutes = 5; minutes <= 120; minutes += 5) {
GetGrid(minutes * geoManager.minutePixel, gridHeight, false);
@@ -233,7 +233,7 @@ void cImageCache::CreateChannelGroupCache(void) {
groupsBottom = NULL;
groupsLeft = NULL;
groupsRight = NULL;
- if (tvguideConfig.displayMode == eHorizontal) {
+ if (config.displayMode == eHorizontal) {
std::string channelGroupHead = "osdElements/channelgroup_head";
std::string channelGroupBottom = "osdElements/channelgroup_bottom";
int width = geoManager.channelGroupsWidth;
@@ -249,7 +249,7 @@ void cImageCache::CreateChannelGroupCache(void) {
if (success && heightHeadBottom) {
groupsBottom = CreateImage(width, heightHeadBottom, false);
}
- for (int size = 1; size <= tvguideConfig.numGrids; ++size) {
+ for (int size = 1; size <= config.numGrids; ++size) {
InsertIntoGroupsCacheHorizontal(size);
}
} else {
@@ -268,7 +268,7 @@ void cImageCache::CreateChannelGroupCache(void) {
if (success && widthHeadBottom) {
groupsRight = CreateImage(widthHeadBottom, height, false);
}
- for (int size = 1; size <= tvguideConfig.numGrids; ++size) {
+ for (int size = 1; size <= config.numGrids; ++size) {
InsertIntoGroupsCacheVertical(size);
}
}
@@ -276,9 +276,9 @@ void cImageCache::CreateChannelGroupCache(void) {
}
void cImageCache::CreateLogoCache(void) {
- if (tvguideConfig.hideChannelLogos)
+ if (config.hideChannelLogos)
return;
- if (tvguideConfig.numLogosInitial > 0) {
+ if (config.numLogosInitial > 0) {
int channelsCached = 0;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
@@ -286,7 +286,7 @@ void cImageCache::CreateLogoCache(void) {
#else
for (const cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
#endif
- if (channelsCached >= tvguideConfig.numLogosInitial)
+ if (channelsCached >= config.numLogosInitial)
break;
if (!channel->GroupSep()) {
bool success = LoadLogo(channel);
@@ -351,7 +351,7 @@ cImage *cImageCache::GetLogo(const cChannel *channel) {
} else {
bool success = LoadLogo(channel);
if (success) {
- if ((tvguideConfig.limitLogoCache) && ((int)logoCache.size() >= tvguideConfig.numLogosMax)) {
+ if ((config.limitLogoCache) && ((int)logoCache.size() >= config.numLogosMax)) {
//logo cache is full, don't cache anymore
if (tempStaticLogo) {
delete tempStaticLogo;
@@ -403,7 +403,7 @@ void cImageCache::InsertIntoOsdElementCache(eOsdElementType type, int width, int
void cImageCache::InsertIntoGridCache(std::string name, int width, int height, bool active) {
cImage *image = CreateGrid(width, height, active);
if (image) {
- if (tvguideConfig.displayMode == eHorizontal) {
+ if (config.displayMode == eHorizontal) {
AddCornersHorizontal(image, active);
} else {
AddCornersVertical(image, active);
@@ -553,25 +553,25 @@ void cImageCache::AddCornersGroupVertical(cImage *img) {
bool cImageCache::LoadIcon(std::string name) {
bool success = false;
- if (tvguideConfig.iconsPathSet) {
- cString iconPathTheme = cString::sprintf("%s%s/", *tvguideConfig.iconPath, *tvguideConfig.themeName);
+ if (config.iconsPathSet) {
+ cString iconPathTheme = cString::sprintf("%s%s/", *config.iconPath, *config.themeName);
success = LoadImage(name, *iconPathTheme, "png");
if (success) {
return true;
} else {
- success = LoadImage(name, *tvguideConfig.iconPath, "png");
+ success = LoadImage(name, *config.iconPath, "png");
if (success) {
return true;
}
}
}
if (!success) {
- cString iconPathTheme = cString::sprintf("%s%s/", *tvguideConfig.iconPathDefault, *tvguideConfig.themeName);
+ cString iconPathTheme = cString::sprintf("%s%s/", *config.iconPathDefault, *config.themeName);
success = LoadImage(name, *iconPathTheme, "png");
if (success) {
return true;
} else {
- success = LoadImage(name, *tvguideConfig.iconPathDefault, "png");
+ success = LoadImage(name, *config.iconPathDefault, "png");
if (success) {
return true;
}
@@ -587,24 +587,24 @@ bool cImageCache::LoadLogo(const cChannel *channel) {
std::string logoLower = StrToLowerCase(channel->Name());
bool success = false;
cString extension;
- if (tvguideConfig.logoExtension == 0) {
+ if (config.logoExtension == 0) {
extension = "png";
- } else if (tvguideConfig.logoExtension == 1) {
+ } else if (config.logoExtension == 1) {
extension = "jpg";
}
- if (tvguideConfig.logoPathSet) {
- success = LoadImage(channelID.c_str(), *tvguideConfig.logoPath, *extension);
+ if (config.logoPathSet) {
+ success = LoadImage(channelID.c_str(), *config.logoPath, *extension);
if (success)
return true;
- success = LoadImage(logoLower.c_str(), *tvguideConfig.logoPath, *extension);
+ success = LoadImage(logoLower.c_str(), *config.logoPath, *extension);
if (success)
return true;
}
- success = LoadImage(channelID.c_str(), *tvguideConfig.logoPathDefault, *extension);
+ success = LoadImage(channelID.c_str(), *config.logoPathDefault, *extension);
if (success)
return true;
- success = LoadImage(logoLower.c_str(), *tvguideConfig.logoPathDefault, *extension);
+ success = LoadImage(logoLower.c_str(), *config.logoPathDefault, *extension);
return success;
}
diff --git a/imageloader.c b/imageloader.c
index 67b910c..9707dea 100644
--- a/imageloader.c
+++ b/imageloader.c
@@ -23,22 +23,22 @@ bool cImageLoader::LoadLogo(const cChannel *channel, int width, int height) {
std::string channelID = StrToLowerCase(*(channel->GetChannelID().ToString()));
std::string logoLower = StrToLowerCase(channel->Name());
cString extension;
- if (tvguideConfig.logoExtension == 0) {
+ if (config.logoExtension == 0) {
extension = "png";
- } else if (tvguideConfig.logoExtension == 1) {
+ } else if (config.logoExtension == 1) {
extension = "jpg";
}
bool success = false;
- if (tvguideConfig.logoPathSet) {
- success = LoadImage(channelID.c_str(), *tvguideConfig.logoPath, *extension);
+ if (config.logoPathSet) {
+ success = LoadImage(channelID.c_str(), *config.logoPath, *extension);
if (!success) {
- success = LoadImage(logoLower.c_str(), *tvguideConfig.logoPath, *extension);
+ success = LoadImage(logoLower.c_str(), *config.logoPath, *extension);
}
}
if (!success)
- success = LoadImage(channelID.c_str(), *tvguideConfig.logoPathDefault, *extension);
+ success = LoadImage(channelID.c_str(), *config.logoPathDefault, *extension);
if (!success)
- success = LoadImage(logoLower.c_str(), *tvguideConfig.logoPathDefault, *extension);
+ success = LoadImage(logoLower.c_str(), *config.logoPathDefault, *extension);
if (success)
buffer.sample(Geometry(width, height));
return success;
@@ -48,9 +48,9 @@ bool cImageLoader::LoadEPGImage(int eventID, int width, int height) {
if ((width == 0)||(height==0))
return false;
bool success = false;
- success = LoadImage(*cString::sprintf("%d", eventID), *tvguideConfig.epgImagePath, "jpg");
+ success = LoadImage(*cString::sprintf("%d", eventID), *config.epgImagePath, "jpg");
if (!success)
- success = LoadImage(*cString::sprintf("%d_0", eventID), *tvguideConfig.epgImagePath, "jpg");
+ success = LoadImage(*cString::sprintf("%d_0", eventID), *config.epgImagePath, "jpg");
if (!success)
return false;
buffer.sample( Geometry(width, height));
@@ -58,12 +58,12 @@ bool cImageLoader::LoadEPGImage(int eventID, int width, int height) {
}
bool cImageLoader::LoadAdditionalEPGImage(cString name) {
- int width = tvguideConfig.epgImageWidthLarge;
- int height = tvguideConfig.epgImageHeightLarge;
+ int width = config.epgImageWidthLarge;
+ int height = config.epgImageHeightLarge;
if ((width == 0)||(height==0))
return false;
bool success = false;
- success = LoadImage(*name, *tvguideConfig.epgImagePath, "jpg");
+ success = LoadImage(*name, *config.epgImagePath, "jpg");
if (!success)
return false;
if (height != 0 || width != 0) {
@@ -84,19 +84,19 @@ bool cImageLoader::LoadIcon(const char *cIcon, int size) {
if (size==0)
return false;
bool success = false;
- if (tvguideConfig.iconsPathSet) {
- cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *tvguideConfig.iconPath, *tvguideConfig.themeName);
+ if (config.iconsPathSet) {
+ cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *config.iconPath, *config.themeName);
success = LoadImage(cIcon, *iconPathTheme, "png");
if (!success) {
- cString iconPath = cString::sprintf("%srecmenuicons/", *tvguideConfig.iconPath);
+ cString iconPath = cString::sprintf("%srecmenuicons/", *config.iconPath);
success = LoadImage(cIcon, *iconPath, "png");
}
}
if (!success) {
- cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *tvguideConfig.iconPathDefault, *tvguideConfig.themeName);
+ cString iconPathTheme = cString::sprintf("%s%s/recmenuicons/", *config.iconPathDefault, *config.themeName);
success = LoadImage(cIcon, *iconPathTheme, "png");
if (!success) {
- cString iconPath = cString::sprintf("%srecmenuicons/", *tvguideConfig.iconPathDefault);
+ cString iconPath = cString::sprintf("%srecmenuicons/", *config.iconPathDefault);
success = LoadImage(cIcon, *iconPath, "png");
}
}
@@ -110,20 +110,20 @@ bool cImageLoader::LoadOsdElement(cString name, int width, int height) {
if ((width == 0)||(height==0))
return false;
bool success = false;
- if (tvguideConfig.iconsPathSet) {
- cString path = cString::sprintf("%s%s%s", *tvguideConfig.iconPath, *tvguideConfig.themeName, "/osdElements/");
+ if (config.iconsPathSet) {
+ cString path = cString::sprintf("%s%s%s", *config.iconPath, *config.themeName, "/osdElements/");
success = LoadImage(*name, *path, "png");
if (!success) {
- path = cString::sprintf("%s%s", *tvguideConfig.iconPath, "/osdElements/");
+ path = cString::sprintf("%s%s", *config.iconPath, "/osdElements/");
success = LoadImage(*name, *path, "png");
}
}
if (!success) {
- cString path = cString::sprintf("%s%s%s", *tvguideConfig.iconPathDefault, *tvguideConfig.themeName, "/osdElements/");
+ cString path = cString::sprintf("%s%s%s", *config.iconPathDefault, *config.themeName, "/osdElements/");
success = LoadImage(*name, *path, "png");
}
if (!success) {
- cString path = cString::sprintf("%s%s", *tvguideConfig.iconPathDefault, "/osdElements/");
+ cString path = cString::sprintf("%s%s", *config.iconPathDefault, "/osdElements/");
success = LoadImage(*name, *path, "png");
}
if (!success)
diff --git a/imagemagickwrapper.c b/imagemagickwrapper.c
index 6198dfc..cbaf623 100644
--- a/imagemagickwrapper.c
+++ b/imagemagickwrapper.c
@@ -77,21 +77,21 @@ bool cImageMagickWrapper::LoadImage(std::string FileName, std::string Path, std:
std::stringstream sstrImgFile;
sstrImgFile << Path << FileName << "." << Extension;
std::string imgFile = sstrImgFile.str();
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: trying to load: %s", imgFile.c_str());
buffer.read(imgFile.c_str());
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: %s sucessfully loaded", imgFile.c_str());
} catch( Magick::Warning &warning ) {
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: Magick Warning: %s", warning.what());
return true;
} catch( Magick::Error &error ) {
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: Magick Error: %s", error.what());
return false;
} catch(...) {
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: an unknown Magick error occured during image loading");
return false;
}
@@ -102,21 +102,21 @@ bool cImageMagickWrapper::LoadImage(const char *fullpath) {
if ((fullpath == NULL) || (strlen(fullpath) < 5))
return false;
try {
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: trying to load: %s", fullpath);
buffer.read(fullpath);
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: %s sucessfully loaded", fullpath);
} catch( Magick::Warning &warning ) {
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: Magick Warning: %s", warning.what());
return true;
} catch( Magick::Error &error ) {
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: Magick Error: %s", error.what());
return false;
} catch(...) {
- if (tvguideConfig.debugImageLoading)
+ if (config.debugImageLoading)
esyslog("tvguide: an unknown Magick error occured during image loading");
return false;
}
diff --git a/osdmanager.c b/osdmanager.c
index 93a0bc8..75a58d0 100644
--- a/osdmanager.c
+++ b/osdmanager.c
@@ -17,7 +17,7 @@ bool cOsdManager::setOsd() {
void cOsdManager::setBackground() {
- if (tvguideConfig.displayStatusHeader && tvguideConfig.scaleVideo) {
+ if (config.displayStatusHeader && config.scaleVideo) {
int widthStatus = cOsd::OsdWidth() - geoManager.statusHeaderHeight * 16 / 9;
osd->DrawRectangle(0, 0, widthStatus, geoManager.statusHeaderHeight, theme.Color(clrBackgroundOSD));
osd->DrawRectangle(0, geoManager.statusHeaderHeight, Width(), Height(), theme.Color(clrBackgroundOSD));
diff --git a/recmanager.c b/recmanager.c
index e9501d1..dc199ab 100644
--- a/recmanager.c
+++ b/recmanager.c
@@ -44,7 +44,7 @@ bool cRecManager::RefreshRemoteTimers(void) {
bool cRecManager::CheckEventForTimer(const cEvent *event) {
bool hasTimer = false;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event;
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
@@ -66,7 +66,7 @@ bool cRecManager::CheckEventForTimer(const cEvent *event) {
const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
const cTimer *timer = NULL;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event;
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
@@ -85,7 +85,7 @@ const cTimer *cRecManager::GetTimerForEvent(const cEvent *event) {
cTimer *cRecManager::createTimer(const cEvent *event, std::string path) {
cTimer *timer = NULL;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
timer = createRemoteTimer(event, path);
} else {
timer = createLocalTimer(event, path);
@@ -143,9 +143,9 @@ cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
}
void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string path) {
- if (tvguideConfig.instRecFolderMode == eFolderFixed) {
+ if (config.instRecFolderMode == eFolderFixed) {
Epgsearch_services_v1_2 *epgSearch = new Epgsearch_services_v1_2;
- std::string recDir = tvguideConfig.instRecFixedFolder;
+ std::string recDir = config.instRecFixedFolder;
std::replace(recDir.begin(), recDir.end(), '/', '~');
if (strchr(recDir.c_str(), '%') != NULL) {
if (epgSearchPlugin->Service("Epgsearch-services-v1.1", epgSearch)) {
@@ -193,7 +193,7 @@ void cRecManager::DeleteTimer(int timerID) {
void cRecManager::DeleteTimer(const cEvent *event) {
if (!event)
return;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
DeleteRemoteTimer(event);
} else {
DeleteLocalTimer(event);
@@ -287,7 +287,7 @@ void cRecManager::SaveTimer(const cTimer *t, cTimer newTimerSettings) {
#if VDRVERSNUM < 20300
timer->SetEventFromSchedule();
#endif
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Timer_v1_0 rt;
rt.timer = timer;
if (!pRemoteTimers->Service("RemoteTimers::ModTimer-v1.0", &rt))
@@ -337,7 +337,7 @@ void cRecManager::CreateSeriesTimer(cTimer *seriesTimer) {
#if VDRVERSNUM < 20300
seriesTimer->SetEventFromSchedule();
#endif
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_Timer_v1_0 rt;
rt.timer = seriesTimer;
if (!pRemoteTimers->Service("RemoteTimers::NewTimer-v1.0", &rt))
@@ -717,8 +717,8 @@ const cEvent **cRecManager::LoadReruns(const cEvent *event, int &numResults) {
if (epgSearchAvailable && !isempty(event->Title())) {
Epgsearch_searchresults_v1_0 data;
std::string strQuery = event->Title();
- if (tvguideConfig.useSubtitleRerun > 0) {
- if (tvguideConfig.useSubtitleRerun == 2 || !isempty(event->ShortText()))
+ if (config.useSubtitleRerun > 0) {
+ if (config.useSubtitleRerun == 2 || !isempty(event->ShortText()))
strQuery += "~";
if (!isempty(event->ShortText()))
strQuery += event->ShortText();
@@ -789,9 +789,9 @@ const cEvent **cRecManager::WhatsOnNow(bool nowOrNext, int &numResults) {
const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
#endif
const cChannel *startChannel = NULL, *stopChannel = NULL;
- if (tvguideConfig.favLimitChannels) {
- startChannel = channels->GetByNumber(tvguideConfig.favStartChannel);
- stopChannel = channels->GetByNumber(tvguideConfig.favStopChannel);
+ if (config.favLimitChannels) {
+ startChannel = channels->GetByNumber(config.favStartChannel);
+ stopChannel = channels->GetByNumber(config.favStopChannel);
}
if (!startChannel)
startChannel = channels->First();
@@ -825,13 +825,13 @@ const cEvent **cRecManager::UserDefinedTime(int userTime, int &numResults) {
std::vector<const cEvent*> tmpResults;
int favTime = 0;
if (userTime == 1) {
- favTime = tvguideConfig.favTime1;
+ favTime = config.favTime1;
} else if (userTime == 2) {
- favTime = tvguideConfig.favTime2;
+ favTime = config.favTime2;
} else if (userTime == 3) {
- favTime = tvguideConfig.favTime3;
+ favTime = config.favTime3;
} else if (userTime == 4) {
- favTime = tvguideConfig.favTime4;
+ favTime = config.favTime4;
}
time_t now = time(0);
@@ -857,9 +857,9 @@ const cEvent **cRecManager::UserDefinedTime(int userTime, int &numResults) {
const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
#endif
const cChannel *startChannel = NULL, *stopChannel = NULL;
- if (tvguideConfig.favLimitChannels) {
- startChannel = channels->GetByNumber(tvguideConfig.favStartChannel);
- stopChannel = channels->GetByNumber(tvguideConfig.favStopChannel);
+ if (config.favLimitChannels) {
+ startChannel = channels->GetByNumber(config.favStartChannel);
+ stopChannel = channels->GetByNumber(config.favStopChannel);
}
if (!startChannel)
startChannel = channels->First();
diff --git a/recmenu.c b/recmenu.c
index 4243666..832e362 100644
--- a/recmenu.c
+++ b/recmenu.c
@@ -532,7 +532,7 @@ void cRecMenu::Arrange(bool scroll) {
}
void cRecMenu::Display(bool scroll) {
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
drawBackgroundGraphical(bgRecMenuBack);
} else {
pixmap->Fill(theme.Color(clrBackground));
@@ -674,7 +674,7 @@ eRecMenuState cRecMenu::ProcessKey(eKeys Key) {
cImage *cRecMenu::createScrollbar(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *image = new cImage(cSize(width, height));
image->Fill(clrBgr);
- if (tvguideConfig.style != eStyleFlat) {
+ if (config.style != eStyleFlat) {
int numSteps = 64;
int alphaStep = 0x03;
if (height < 30)
diff --git a/recmenuitem.c b/recmenuitem.c
index 3a0a5ab..33a6b6c 100644
--- a/recmenuitem.c
+++ b/recmenuitem.c
@@ -36,7 +36,7 @@ void cRecMenuItem::SetPixmaps(void) {
}
void cRecMenuItem::setBackground(void) {
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
if (defaultBackground) {
drawBackgroundGraphical(bgButton, active);
}
@@ -52,7 +52,7 @@ void cRecMenuItem::setBackground(void) {
colorBlending = theme.Color(clrGrid1Blending);
colorText = theme.Color(clrFont);
}
- colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
+ colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
if (defaultBackground) {
drawBackground();
drawBorder();
@@ -177,7 +177,7 @@ void cRecMenuItemButtonYesNo::Show(void) {
}
void cRecMenuItemButtonYesNo::setBackground() {
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
drawBackgroundGraphical(bgButton, yesActive&&active);
colorTextBack = clrTransparent;
colorTextNoBack = clrTransparent;
@@ -213,8 +213,8 @@ void cRecMenuItemButtonYesNo::setBackground() {
theme.Color(clrGrid1Blending));
colorTextNo = theme.Color(clrFont);
}
- colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
- colorTextNoBack = (tvguideConfig.style == eStyleFlat)?colorNoBack:clrTransparent;
+ colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
+ colorTextNoBack = (config.style == eStyleFlat)?colorNoBack:clrTransparent;
drawBackground();
drawBorder();
pixmapNo->drawBackground();
@@ -641,8 +641,8 @@ cRecMenuItemSelectDirectory::cRecMenuItemSelectDirectory(cString text,
height = 3 * font->Height() / 2;
pixmapVal = NULL;
folders.push_back(tr("root video folder"));
- if (isSearchTimer && tvguideConfig.instRecFixedFolder.size() > 0)
- folders.push_back(tvguideConfig.instRecFixedFolder);
+ if (isSearchTimer && config.instRecFixedFolder.size() > 0)
+ folders.push_back(config.instRecFixedFolder);
ReadRecordingDirectories(&folders, NULL, "");
numValues = folders.size();
this->currentVal = GetInitial();
@@ -1615,9 +1615,9 @@ void cRecMenuItemTimer::Draw(void) {
channelName = channel->Name();
}
int logoX = DrawIcons();
- int logoWidth = height * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
+ int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio;
cImageLoader imgLoader;
- if (!tvguideConfig.hideChannelLogos) {
+ if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, height)) {
cImage logo = imgLoader.GetImage();
pixmapIcons->DrawImage(cPoint(logoX, 0), logo);
@@ -1865,9 +1865,9 @@ void cRecMenuItemEvent::Draw(void) {
cString channelName = "";
if (channel)
channelName = channel->Name();
- int logoWidth = height * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
+ int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio;
cImageLoader imgLoader;
- if (!tvguideConfig.hideChannelLogos) {
+ if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, height)) {
cImage logo = imgLoader.GetImage();
pixmapText->DrawImage(cPoint(logoX, (height - logo.Height()) / 2), logo);
@@ -2018,7 +2018,7 @@ void cRecMenuItemChannelChooser::DrawValue(void) {
cString textVal = cString::sprintf("%d - %s", channel->Number(), channel->Name());
int textX = width - font->Width(*textVal) - 10;
pixmapChannel->DrawText(cPoint(textX, textY), *textVal, colorText, clrTransparent, font);
- int logoWidth = height * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
+ int logoWidth = height * config.logoWidthRatio / config.logoHeightRatio;
int logoX = textX - logoWidth - 10;
cImageLoader imgLoader;
if (imgLoader.LoadLogo(channel, logoWidth, height - 10)) {
@@ -2416,10 +2416,10 @@ void cRecMenuItemTimelineHeader::DrawCurrentTimer(void) {
const cChannel *channel = timer->Channel();
int x = 0;
if (channel) {
- int logoWidth = infoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
+ int logoWidth = infoHeight * config.logoWidthRatio / config.logoHeightRatio;
bool logoDrawn = false;
cImageLoader imgLoader;
- if (!tvguideConfig.hideChannelLogos) {
+ if (!config.hideChannelLogos) {
if (imgLoader.LoadLogo(channel, logoWidth, infoHeight)) {
cImage logo = imgLoader.GetImage();
pixmapTimerInfo->DrawImage(cPoint(0, 0), logo);
@@ -2427,7 +2427,7 @@ void cRecMenuItemTimelineHeader::DrawCurrentTimer(void) {
logoDrawn = true;
}
}
- if (tvguideConfig.hideChannelLogos || !logoDrawn) {
+ if (config.hideChannelLogos || !logoDrawn) {
int channelNameWidth = fontSmall->Width(channel->Name());
pixmapTimerInfo->DrawText(cPoint(10, (infoHeight - fontSmall->Height())/2), channel->Name(), colorText, clrTransparent, fontSmall);
x += channelNameWidth + 20;
diff --git a/recmenus.c b/recmenus.c
index 24148a3..4c2fcd2 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -7,7 +7,7 @@
cRecMenuMain::cRecMenuMain(bool epgSearchAvailable, bool timerActive, bool switchTimerActive) {
eRecMenuState action = rmsInstantRecord;
if (!timerActive) {
- if (tvguideConfig.instRecFolderMode == eFolderSelect)
+ if (config.instRecFolderMode == eFolderSelect)
action = rmsInstantRecordFolder;
AddMenuItem(new cRecMenuItemButton(tr("Instant Record"), action, true, false, false, true));
} else {
@@ -22,7 +22,7 @@ cRecMenuMain::cRecMenuMain(bool epgSearchAvailable, bool timerActive, bool switc
AddMenuItem(new cRecMenuItemButton(tr("Search Timers"), rmsSearchTimers, false, false, false, true));
}
- if (tvguideConfig.instRecFolderMode == eFolderSelect)
+ if (config.instRecFolderMode == eFolderSelect)
action = rmsSeriesTimerFolder;
else
action = rmsSeriesTimer;
@@ -113,7 +113,7 @@ cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
#endif
cString message;
bool eventHasTimer = false;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event;
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
@@ -426,7 +426,7 @@ cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextStat
AddMenuItemInitial(infoItem);
timerActive = false;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = timer->Event();
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
@@ -1148,8 +1148,8 @@ cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string sea
// --- cRecMenuSwitchTimer ---------------------------------------------------------
cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
- switchMinsBefore = tvguideConfig.switchMinsBefore;
- switchMode = tvguideConfig.switchMode;
+ switchMinsBefore = config.switchMinsBefore;
+ switchMode = config.switchMode;
SetWidthPercent(60);
@@ -1618,26 +1618,26 @@ cRecMenuFavorites::~cRecMenuFavorites(void) {
}
void cRecMenuFavorites::CreateFavoritesMenuItems(void) {
- if (tvguideConfig.favWhatsOnNow) {
+ if (config.favWhatsOnNow) {
myMenuItems.push_back(new cRecMenuItemFavoriteStatic(tr("What's on now"), rmsFavoritesNow, false));
}
- if (tvguideConfig.favWhatsOnNext) {
+ if (config.favWhatsOnNext) {
myMenuItems.push_back(new cRecMenuItemFavoriteStatic(tr("What's on next"), rmsFavoritesNext, false));
}
- if (tvguideConfig.favUseTime1) {
- std::string desc = *cString::sprintf("%s (%s)", tvguideConfig.descUser1.c_str(), NiceTime(tvguideConfig.favTime1).c_str());
+ if (config.favUseTime1) {
+ std::string desc = *cString::sprintf("%s (%s)", config.descUser1.c_str(), NiceTime(config.favTime1).c_str());
myMenuItems.push_back(new cRecMenuItemFavoriteStatic(desc, rmsFavoritesUser1, false));
}
- if (tvguideConfig.favUseTime2) {
- std::string desc = *cString::sprintf("%s (%s)", tvguideConfig.descUser2.c_str(), NiceTime(tvguideConfig.favTime2).c_str());
+ if (config.favUseTime2) {
+ std::string desc = *cString::sprintf("%s (%s)", config.descUser2.c_str(), NiceTime(config.favTime2).c_str());
myMenuItems.push_back(new cRecMenuItemFavoriteStatic(desc, rmsFavoritesUser2, false));
}
- if (tvguideConfig.favUseTime3) {
- std::string desc = *cString::sprintf("%s (%s)", tvguideConfig.descUser3.c_str(), NiceTime(tvguideConfig.favTime3).c_str());
+ if (config.favUseTime3) {
+ std::string desc = *cString::sprintf("%s (%s)", config.descUser3.c_str(), NiceTime(config.favTime3).c_str());
myMenuItems.push_back(new cRecMenuItemFavoriteStatic(desc, rmsFavoritesUser3, false));
}
- if (tvguideConfig.favUseTime4) {
- std::string desc = *cString::sprintf("%s (%s)", tvguideConfig.descUser4.c_str(), NiceTime(tvguideConfig.favTime4).c_str());
+ if (config.favUseTime4) {
+ std::string desc = *cString::sprintf("%s (%s)", config.descUser4.c_str(), NiceTime(config.favTime4).c_str());
myMenuItems.push_back(new cRecMenuItemFavoriteStatic(desc, rmsFavoritesUser4, false));
}
diff --git a/recmenuview.c b/recmenuview.c
index 0fa771d..9778052 100644
--- a/recmenuview.c
+++ b/recmenuview.c
@@ -72,7 +72,7 @@ void cRecMenuView::SetBackground(void) {
int backgroundHeight = geoManager.osdHeight;
pixmapBackground = osdManager.requestPixmap(3, cRect(0, 0, backgroundWidth, backgroundHeight));
pixmapBackground->Fill(theme.Color(clrRecMenuBackground));
- if (tvguideConfig.scaleVideo) {
+ if (config.scaleVideo) {
int tvHeight = geoManager.statusHeaderHeight;
int tvWidth = tvHeight * 16 / 9;
int tvX = geoManager.osdWidth - tvWidth;
@@ -844,22 +844,22 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
case rmsFavoritesUser1: {
int numResults = 0;
const cEvent **result = recManager->UserDefinedTime(1, numResults);
- DisplayFavoriteResults(tvguideConfig.descUser1, result, numResults);
+ DisplayFavoriteResults(config.descUser1, result, numResults);
break; }
case rmsFavoritesUser2: {
int numResults = 0;
const cEvent **result = recManager->UserDefinedTime(2, numResults);
- DisplayFavoriteResults(tvguideConfig.descUser2, result, numResults);
+ DisplayFavoriteResults(config.descUser2, result, numResults);
break; }
case rmsFavoritesUser3: {
int numResults = 0;
const cEvent **result = recManager->UserDefinedTime(3, numResults);
- DisplayFavoriteResults(tvguideConfig.descUser3, result, numResults);
+ DisplayFavoriteResults(config.descUser3, result, numResults);
break; }
case rmsFavoritesUser4: {
int numResults = 0;
const cEvent **result = recManager->UserDefinedTime(4, numResults);
- DisplayFavoriteResults(tvguideConfig.descUser4, result, numResults);
+ DisplayFavoriteResults(config.descUser4, result, numResults);
break; }
/**********************************************************************************************
diff --git a/setup.c b/setup.c
index 4c97158..04e5baf 100644
--- a/setup.c
+++ b/setup.c
@@ -1,7 +1,7 @@
#include "setup.h"
cTvguideSetup::cTvguideSetup() {
- tmpConfig = tvguideConfig;
+ tmpConfig = config;
Setup();
}
@@ -9,8 +9,8 @@ cTvguideSetup::~cTvguideSetup() {
geoManager.SetGeometry(cOsd::OsdWidth(), cOsd::OsdHeight(), true);
fontManager.DeleteFonts();
fontManager.SetFonts();
- tvguideConfig.LoadTheme();
- tvguideConfig.setDynamicValues();
+ config.LoadTheme();
+ config.setDynamicValues();
imgCache.Clear();
imgCache.CreateCache();
}
@@ -56,104 +56,104 @@ eOSState cTvguideSetup::ProcessKey(eKeys Key) {
void cTvguideSetup::Store(void) {
- tvguideConfig = tmpConfig;
- SetupStore("debugImageLoading", tvguideConfig.debugImageLoading);
- SetupStore("useNopacityTheme", tvguideConfig.useNopacityTheme);
- SetupStore("themeIndex", tvguideConfig.themeIndex);
- SetupStore("showMainMenuEntry", tvguideConfig.showMainMenuEntry);
- SetupStore("replaceOriginalSchedule", tvguideConfig.replaceOriginalSchedule);
- SetupStore("displayMode", tvguideConfig.displayMode);
- SetupStore("showTimeInGrid", tvguideConfig.showTimeInGrid);
- SetupStore("displayStatusHeader", tvguideConfig.displayStatusHeader);
- SetupStore("displayChannelGroups", tvguideConfig.displayChannelGroups);
- SetupStore("displayTimeBase", tvguideConfig.displayTimeBase);
- SetupStore("headerHeightPercent", tvguideConfig.headerHeightPercent);
- SetupStore("channelGroupsPercent", tvguideConfig.channelGroupsPercent);
- SetupStore("epgViewBorder", tvguideConfig.epgViewBorder);
- SetupStore("scaleVideo", tvguideConfig.scaleVideo);
- SetupStore("decorateVideo", tvguideConfig.decorateVideo);
- SetupStore("roundedCorners", tvguideConfig.roundedCorners);
- SetupStore("timeFormat", tvguideConfig.timeFormat);
- SetupStore("channelCols", tvguideConfig.channelCols);
- SetupStore("channelRows", tvguideConfig.channelRows);
- SetupStore("displayTime", tvguideConfig.displayTime);
- SetupStore("displayHorizontalTime", tvguideConfig.displayHorizontalTime);
- SetupStore("bigStepHours", tvguideConfig.bigStepHours);
- SetupStore("hugeStepHours", tvguideConfig.hugeStepHours);
- SetupStore("channelJumpMode", tvguideConfig.channelJumpMode);
- SetupStore("blueKeyMode", tvguideConfig.blueKeyMode);
- SetupStore("numkeyMode", tvguideConfig.numkeyMode);
- SetupStore("useRemoteTimers", tvguideConfig.useRemoteTimers);
- SetupStore("closeOnSwitch", tvguideConfig.closeOnSwitch);
- SetupStore("hideLastGroup", tvguideConfig.hideLastGroup);
- SetupStore("hideChannelLogos", tvguideConfig.hideChannelLogos);
- SetupStore("logoExtension", tvguideConfig.logoExtension);
- SetupStore("logoWidthRatio", tvguideConfig.logoWidthRatio);
- SetupStore("logoHeightRatio", tvguideConfig.logoHeightRatio);
- SetupStore("hideEpgImages", tvguideConfig.hideEpgImages);
- SetupStore("epgImageWidth", tvguideConfig.epgImageWidth);
- SetupStore("epgImageHeight", tvguideConfig.epgImageHeight);
- SetupStore("numAdditionalEPGPictures", tvguideConfig.numAdditionalEPGPictures);
- SetupStore("epgImageWidthLarge", tvguideConfig.epgImageWidthLarge);
- SetupStore("epgImageHeightLarge", tvguideConfig.epgImageHeightLarge);
- SetupStore("detailedViewScrollStep", tvguideConfig.detailedViewScrollStep);
- SetupStore("timeLineWidthPercent", tvguideConfig.timeLineWidthPercent);
- SetupStore("timeLineHeightPercent", tvguideConfig.timeLineHeightPercent);
- SetupStore("displayChannelName", tvguideConfig.displayChannelName);
- SetupStore("channelHeaderWidthPercent", tvguideConfig.channelHeaderWidthPercent);
- SetupStore("channelHeaderHeightPercent", tvguideConfig.channelHeaderHeightPercent);
- SetupStore("footerHeightPercent", tvguideConfig.footerHeightPercent);
- SetupStore("instRecFolderMode", tvguideConfig.instRecFolderMode);
- SetupStore("instRecFixedFolder", tvguideConfig.instRecFixedFolder.c_str());
- SetupStore("favWhatsOnNow", tvguideConfig.favWhatsOnNow);
- SetupStore("favWhatsOnNext", tvguideConfig.favWhatsOnNext);
- SetupStore("favUseTime1", tvguideConfig.favUseTime1);
- SetupStore("favUseTime2", tvguideConfig.favUseTime2);
- SetupStore("favUseTime3", tvguideConfig.favUseTime3);
- SetupStore("favUseTime4", tvguideConfig.favUseTime4);
- SetupStore("favTime1", tvguideConfig.favTime1);
- SetupStore("favTime2", tvguideConfig.favTime2);
- SetupStore("favTime3", tvguideConfig.favTime3);
- SetupStore("favTime4", tvguideConfig.favTime4);
- SetupStore("descUser1", tvguideConfig.descUser1.c_str());
- SetupStore("descUser2", tvguideConfig.descUser2.c_str());
- SetupStore("descUser3", tvguideConfig.descUser3.c_str());
- SetupStore("descUser4", tvguideConfig.descUser4.c_str());
- SetupStore("favLimitChannels", tvguideConfig.favLimitChannels);
- SetupStore("favStartChannel", tvguideConfig.favStartChannel);
- SetupStore("favStopChannel", tvguideConfig.favStopChannel);
- SetupStore("switchMode", tvguideConfig.switchMode);
- SetupStore("switchMinsBefore", tvguideConfig.switchMinsBefore);
- SetupStore("fontIndex", tvguideConfig.fontIndex);
- SetupStore("FontButtonDelta", tvguideConfig.FontButtonDelta);
- SetupStore("FontDetailViewDelta", tvguideConfig.FontDetailViewDelta);
- SetupStore("FontDetailHeaderDelta", tvguideConfig.FontDetailHeaderDelta);
- SetupStore("FontMessageBoxDelta", tvguideConfig.FontMessageBoxDelta);
- SetupStore("FontMessageBoxLargeDelta", tvguideConfig.FontMessageBoxLargeDelta);
- SetupStore("FontStatusHeaderDelta", tvguideConfig.FontStatusHeaderDelta);
- SetupStore("FontStatusHeaderLargeDelta", tvguideConfig.FontStatusHeaderLargeDelta);
- SetupStore("FontChannelHeaderDelta", tvguideConfig.FontChannelHeaderDelta);
- SetupStore("FontChannelGroupsDelta", tvguideConfig.FontChannelGroupsDelta);
- SetupStore("FontGridDelta", tvguideConfig.FontGridDelta);
- SetupStore("FontGridSmallDelta", tvguideConfig.FontGridSmallDelta);
- SetupStore("FontTimeLineWeekdayDelta", tvguideConfig.FontTimeLineWeekdayDelta);
- SetupStore("FontTimeLineDateDelta", tvguideConfig.FontTimeLineDateDelta);
- SetupStore("FontTimeLineTimeDelta", tvguideConfig.FontTimeLineTimeDelta);
- SetupStore("FontChannelHeaderHorizontalDelta", tvguideConfig.FontChannelHeaderHorizontalDelta);
- SetupStore("FontChannelGroupsHorizontalDelta", tvguideConfig.FontChannelGroupsHorizontalDelta);
- SetupStore("FontGridHorizontalDelta", tvguideConfig.FontGridHorizontalDelta);
- SetupStore("FontGridHorizontalSmallDelta", tvguideConfig.FontGridHorizontalSmallDelta);
- SetupStore("FontTimeLineDateHorizontalDelta", tvguideConfig.FontTimeLineDateHorizontalDelta);
- SetupStore("FontTimeLineTimeHorizontalDelta", tvguideConfig.FontTimeLineTimeHorizontalDelta);
- SetupStore("FontRecMenuItemDelta", tvguideConfig.FontRecMenuItemDelta);
- SetupStore("FontRecMenuItemSmallDelta", tvguideConfig.FontRecMenuItemSmallDelta);
- SetupStore("FontRecMenuItemLargeDelta", tvguideConfig.FontRecMenuItemLargeDelta);
- SetupStore("displayRerunsDetailEPGView", tvguideConfig.displayRerunsDetailEPGView);
- SetupStore("numReruns", tvguideConfig.numReruns);
- SetupStore("useSubtitleRerun", tvguideConfig.useSubtitleRerun);
- SetupStore("numLogosInitial", tvguideConfig.numLogosInitial);
- SetupStore("numLogosMax", tvguideConfig.numLogosMax);
- SetupStore("limitLogoCache", tvguideConfig.limitLogoCache);
+ config = tmpConfig;
+ SetupStore("debugImageLoading", config.debugImageLoading);
+ SetupStore("useNopacityTheme", config.useNopacityTheme);
+ SetupStore("themeIndex", config.themeIndex);
+ SetupStore("showMainMenuEntry", config.showMainMenuEntry);
+ SetupStore("replaceOriginalSchedule", config.replaceOriginalSchedule);
+ SetupStore("displayMode", config.displayMode);
+ SetupStore("showTimeInGrid", config.showTimeInGrid);
+ SetupStore("displayStatusHeader", config.displayStatusHeader);
+ SetupStore("displayChannelGroups", config.displayChannelGroups);
+ SetupStore("displayTimeBase", config.displayTimeBase);
+ SetupStore("headerHeightPercent", config.headerHeightPercent);
+ SetupStore("channelGroupsPercent", config.channelGroupsPercent);
+ SetupStore("epgViewBorder", config.epgViewBorder);
+ SetupStore("scaleVideo", config.scaleVideo);
+ SetupStore("decorateVideo", config.decorateVideo);
+ SetupStore("roundedCorners", config.roundedCorners);
+ SetupStore("timeFormat", config.timeFormat);
+ SetupStore("channelCols", config.channelCols);
+ SetupStore("channelRows", config.channelRows);
+ SetupStore("displayTime", config.displayTime);
+ SetupStore("displayHorizontalTime", config.displayHorizontalTime);
+ SetupStore("bigStepHours", config.bigStepHours);
+ SetupStore("hugeStepHours", config.hugeStepHours);
+ SetupStore("channelJumpMode", config.channelJumpMode);
+ SetupStore("blueKeyMode", config.blueKeyMode);
+ SetupStore("numkeyMode", config.numkeyMode);
+ SetupStore("useRemoteTimers", config.useRemoteTimers);
+ SetupStore("closeOnSwitch", config.closeOnSwitch);
+ SetupStore("hideLastGroup", config.hideLastGroup);
+ SetupStore("hideChannelLogos", config.hideChannelLogos);
+ SetupStore("logoExtension", config.logoExtension);
+ SetupStore("logoWidthRatio", config.logoWidthRatio);
+ SetupStore("logoHeightRatio", config.logoHeightRatio);
+ SetupStore("hideEpgImages", config.hideEpgImages);
+ SetupStore("epgImageWidth", config.epgImageWidth);
+ SetupStore("epgImageHeight", config.epgImageHeight);
+ SetupStore("numAdditionalEPGPictures", config.numAdditionalEPGPictures);
+ SetupStore("epgImageWidthLarge", config.epgImageWidthLarge);
+ SetupStore("epgImageHeightLarge", config.epgImageHeightLarge);
+ SetupStore("detailedViewScrollStep", config.detailedViewScrollStep);
+ SetupStore("timeLineWidthPercent", config.timeLineWidthPercent);
+ SetupStore("timeLineHeightPercent", config.timeLineHeightPercent);
+ SetupStore("displayChannelName", config.displayChannelName);
+ SetupStore("channelHeaderWidthPercent", config.channelHeaderWidthPercent);
+ SetupStore("channelHeaderHeightPercent", config.channelHeaderHeightPercent);
+ SetupStore("footerHeightPercent", config.footerHeightPercent);
+ SetupStore("instRecFolderMode", config.instRecFolderMode);
+ SetupStore("instRecFixedFolder", config.instRecFixedFolder.c_str());
+ SetupStore("favWhatsOnNow", config.favWhatsOnNow);
+ SetupStore("favWhatsOnNext", config.favWhatsOnNext);
+ SetupStore("favUseTime1", config.favUseTime1);
+ SetupStore("favUseTime2", config.favUseTime2);
+ SetupStore("favUseTime3", config.favUseTime3);
+ SetupStore("favUseTime4", config.favUseTime4);
+ SetupStore("favTime1", config.favTime1);
+ SetupStore("favTime2", config.favTime2);
+ SetupStore("favTime3", config.favTime3);
+ SetupStore("favTime4", config.favTime4);
+ SetupStore("descUser1", config.descUser1.c_str());
+ SetupStore("descUser2", config.descUser2.c_str());
+ SetupStore("descUser3", config.descUser3.c_str());
+ SetupStore("descUser4", config.descUser4.c_str());
+ SetupStore("favLimitChannels", config.favLimitChannels);
+ SetupStore("favStartChannel", config.favStartChannel);
+ SetupStore("favStopChannel", config.favStopChannel);
+ SetupStore("switchMode", config.switchMode);
+ SetupStore("switchMinsBefore", config.switchMinsBefore);
+ SetupStore("fontIndex", config.fontIndex);
+ SetupStore("FontButtonDelta", config.FontButtonDelta);
+ SetupStore("FontDetailViewDelta", config.FontDetailViewDelta);
+ SetupStore("FontDetailHeaderDelta", config.FontDetailHeaderDelta);
+ SetupStore("FontMessageBoxDelta", config.FontMessageBoxDelta);
+ SetupStore("FontMessageBoxLargeDelta", config.FontMessageBoxLargeDelta);
+ SetupStore("FontStatusHeaderDelta", config.FontStatusHeaderDelta);
+ SetupStore("FontStatusHeaderLargeDelta", config.FontStatusHeaderLargeDelta);
+ SetupStore("FontChannelHeaderDelta", config.FontChannelHeaderDelta);
+ SetupStore("FontChannelGroupsDelta", config.FontChannelGroupsDelta);
+ SetupStore("FontGridDelta", config.FontGridDelta);
+ SetupStore("FontGridSmallDelta", config.FontGridSmallDelta);
+ SetupStore("FontTimeLineWeekdayDelta", config.FontTimeLineWeekdayDelta);
+ SetupStore("FontTimeLineDateDelta", config.FontTimeLineDateDelta);
+ SetupStore("FontTimeLineTimeDelta", config.FontTimeLineTimeDelta);
+ SetupStore("FontChannelHeaderHorizontalDelta", config.FontChannelHeaderHorizontalDelta);
+ SetupStore("FontChannelGroupsHorizontalDelta", config.FontChannelGroupsHorizontalDelta);
+ SetupStore("FontGridHorizontalDelta", config.FontGridHorizontalDelta);
+ SetupStore("FontGridHorizontalSmallDelta", config.FontGridHorizontalSmallDelta);
+ SetupStore("FontTimeLineDateHorizontalDelta", config.FontTimeLineDateHorizontalDelta);
+ SetupStore("FontTimeLineTimeHorizontalDelta", config.FontTimeLineTimeHorizontalDelta);
+ SetupStore("FontRecMenuItemDelta", config.FontRecMenuItemDelta);
+ SetupStore("FontRecMenuItemSmallDelta", config.FontRecMenuItemSmallDelta);
+ SetupStore("FontRecMenuItemLargeDelta", config.FontRecMenuItemLargeDelta);
+ SetupStore("displayRerunsDetailEPGView", config.displayRerunsDetailEPGView);
+ SetupStore("numReruns", config.numReruns);
+ SetupStore("useSubtitleRerun", config.useSubtitleRerun);
+ SetupStore("numLogosInitial", config.numLogosInitial);
+ SetupStore("numLogosMax", config.numLogosMax);
+ SetupStore("limitLogoCache", config.limitLogoCache);
}
cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cTvguideConfig* data) : cOsdMenu(Title, 40) {
@@ -299,7 +299,7 @@ void cMenuSetupScreenLayout::Set(void) {
Add(new cMenuEditBoolItem(tr("Display current time baseline"), &tmpConfig->displayTimeBase));
Add(new cMenuEditStraItem(tr("Show Channel Logos"), &tmpConfig->hideChannelLogos, 2, hideChannelLogosItems));
if (!tmpConfig->hideChannelLogos) {
- Add(InfoItem(tr("Logo Path used"), *tvguideConfig.logoPath));
+ Add(InfoItem(tr("Logo Path used"), *config.logoPath));
Add(new cMenuEditStraItem(*cString::sprintf("%s%s", *indent, tr("Logo Extension")), &tmpConfig->logoExtension, 2, logoExtensionItems));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Logo width ratio")), &tmpConfig->logoWidthRatio, 1, 1000));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Logo height ratio")), &tmpConfig->logoHeightRatio, 1, 1000));
@@ -309,7 +309,7 @@ void cMenuSetupScreenLayout::Set(void) {
Add(new cMenuEditStraItem(tr("Show EPG Images"), &tmpConfig->hideEpgImages, 2, hideChannelLogosItems));
if (!tmpConfig->hideEpgImages) {
- Add(InfoItem(tr("EPG Images Path used"), *tvguideConfig.epgImagePath));
+ Add(InfoItem(tr("EPG Images Path used"), *config.epgImagePath));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("EPG Image width")), &tmpConfig->epgImageWidth, 0, 800));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("EPG Image height")), &tmpConfig->epgImageHeight, 0, 800));
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of additional EPG Images")), &tmpConfig->numAdditionalEPGPictures, 0, 20));
@@ -346,7 +346,7 @@ eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) {
cMenuSetupFont::cMenuSetupFont(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Fonts and Fontsizes"), data) {
cFont::GetAvailableFontNames(&fontNames);
- fontNames.Insert(strdup(tvguideConfig.fontNameDefault));
+ fontNames.Insert(strdup(config.fontNameDefault));
Set();
}
diff --git a/setup.h b/setup.h
index 8502eef..fa8911a 100644
--- a/setup.h
+++ b/setup.h
@@ -4,6 +4,8 @@
#include <vdr/menuitems.h>
#include "config.h"
+extern cTvguideConfig config;
+
class cTvguideSetup : public cMenuSetupPage {
public:
cTvguideSetup(void);
diff --git a/statusheader.c b/statusheader.c
index 0ef5562..6041984 100644
--- a/statusheader.c
+++ b/statusheader.c
@@ -17,7 +17,7 @@ cStatusHeader::cStatusHeader(void) {
cStatusHeader::~cStatusHeader(void) {
osdManager.releasePixmap(pixmapText);
osdManager.releasePixmap(pixmapTVFrame);
- if (tvguideConfig.scaleVideo) {
+ if (config.scaleVideo) {
cRect vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null);
cDevice::PrimaryDevice()->ScaleVideo(vidWin);
}
@@ -26,8 +26,8 @@ cStatusHeader::~cStatusHeader(void) {
void cStatusHeader::Draw(void) {
pixmapText->Fill(clrTransparent);
pixmapTVFrame->Fill(clrTransparent);
- if (tvguideConfig.style == eStyleGraphical) {
- if (tvguideConfig.scaleVideo) {
+ if (config.style == eStyleGraphical) {
+ if (config.scaleVideo) {
drawBackgroundGraphical(bgStatusHeaderWindowed);
cImage *tvFrameBack = imgCache.GetOsdElement(oeStatusHeaderTVFrame);
if (tvFrameBack)
@@ -36,7 +36,7 @@ void cStatusHeader::Draw(void) {
drawBackgroundGraphical(bgStatusHeaderFull);
}
} else {
- if (tvguideConfig.decorateVideo) {
+ if (config.decorateVideo) {
DecorateVideoFrame();
}
drawBackground();
@@ -45,7 +45,7 @@ void cStatusHeader::Draw(void) {
}
void cStatusHeader::ScaleVideo(void) {
- if (tvguideConfig.scaleVideo) {
+ if (config.scaleVideo) {
int width = height * 16 / 9;
int x = osdManager.Left() + geoManager.osdWidth - width;
int y = osdManager.Top();
@@ -59,7 +59,7 @@ void cStatusHeader::DrawInfoText(cGrid *grid) {
int border = 10;
int textWidth = 0;
textWidth = width - 2 * border;
- tColor colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
+ tColor colorTextBack = (config.style == eStyleFlat)?color:clrTransparent;
pixmapText->Fill(clrTransparent);
int x = border;
int y = border;
diff --git a/styledpixmap.c b/styledpixmap.c
index 0cd4646..7b059c4 100644
--- a/styledpixmap.c
+++ b/styledpixmap.c
@@ -22,9 +22,9 @@ void cStyledPixmap::setPixmap(cPixmap *pixmap) {
}
void cStyledPixmap::drawBackground() {
- if (tvguideConfig.style == eStyleBlendingDefault){
+ if (config.style == eStyleBlendingDefault){
drawBlendedBackground();
- } else if (tvguideConfig.style == eStyleBlendingMagick){
+ } else if (config.style == eStyleBlendingMagick){
drawSparsedBackground();
} else {
pixmap->Fill(color);
@@ -129,7 +129,7 @@ void cStyledPixmap::drawBorder() {
int height = pixmap->ViewPort().Height();
drawDefaultBorder(width, height);
- if (tvguideConfig.roundedCorners) {
+ if (config.roundedCorners) {
int borderRadius = 12;
drawRoundedCorners(width, height, borderRadius);
}
diff --git a/switchtimer.c b/switchtimer.c
index 1f6eea9..b3b9ab6 100644
--- a/switchtimer.c
+++ b/switchtimer.c
@@ -6,15 +6,13 @@ cSwitchTimers SwitchTimers;
cSwitchTimer::cSwitchTimer(void) {
eventID = 0;
startTime = 0;
- switchMinsBefore = tvguideConfig.switchMinsBefore;
- switchMode = tvguideConfig.switchMode;
+ switchMinsBefore = config.switchMinsBefore;
+ switchMode = config.switchMode;
}
cSwitchTimer::cSwitchTimer(const cEvent* Event) {
eventID = 0;
startTime = 0;
-// switchMinsBefore = tvguideConfig.switchMinsBefore;
-// switchModes = tvguideConfig.switchModes;
if (Event) {
eventID = Event->EventID();
channelID = Event->ChannelID();
diff --git a/timeline.c b/timeline.c
index fd016bc..ad6b619 100644
--- a/timeline.c
+++ b/timeline.c
@@ -3,7 +3,7 @@
cTimeLine::cTimeLine(cMyTime *myTime) {
this->myTime = myTime;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
geoManager.statusHeaderHeight + geoManager.clockHeight,
geoManager.dateVieverWidth,
@@ -20,7 +20,7 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight,
geoManager.osdWidth,
geoManager.timeLineGridHeight));
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth,
geoManager.statusHeaderHeight,
geoManager.dateVieverWidth,
@@ -36,12 +36,12 @@ cTimeLine::cTimeLine(cMyTime *myTime) {
timeBase = osdManager.requestPixmap(3, cRect(geoManager.channelGroupsWidth + geoManager.channelHeaderWidth,
geoManager.statusHeaderHeight,
geoManager.timeLineGridWidth,
- geoManager.timeLineHeight + tvguideConfig.channelRows * geoManager.rowHeight));
+ geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight));
}
timeBase->Fill(clrTransparent);
int clockY;
int clockX;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
clockY = geoManager.statusHeaderHeight;
clockX = 0;
}
@@ -65,7 +65,7 @@ cTimeLine::~cTimeLine(void) {
void cTimeLine::drawDateViewer() {
cString weekDay = myTime->GetWeekday();
cString date = myTime->GetDate();
- if (tvguideConfig.style != eStyleGraphical) {
+ if (config.style != eStyleGraphical) {
dateViewer->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
dateViewer->drawBackground();
dateViewer->drawBorder();
@@ -78,9 +78,9 @@ void cTimeLine::drawDateViewer() {
dateViewer->Fill(clrTransparent);
}
tColor colorFont = theme.Color(clrButtonYellow);
- tColor colorFontBack = (tvguideConfig.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent;
+ tColor colorFontBack = (config.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
int textHeightWeekday = fontManager.FontTimeLineWeekday->Height();
int textHeightDate = fontManager.FontTimeLineDate->Height();
int weekdayWidth = fontManager.FontTimeLineWeekday->Width(*weekDay);
@@ -88,7 +88,7 @@ void cTimeLine::drawDateViewer() {
int y = ((geoManager.dateVieverHeight - textHeightWeekday - textHeightDate) / 2);
dateViewer->DrawText(cPoint((geoManager.timeLineWidth - weekdayWidth) / 2, y), *weekDay, colorFont, colorFontBack, fontManager.FontTimeLineWeekday);
dateViewer->DrawText(cPoint((geoManager.timeLineWidth - dateWidth) / 2, y + textHeightWeekday), *date, colorFont, colorFontBack, fontManager.FontTimeLineDate);
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
cString strDate = cString::sprintf("%s %s", *weekDay, *date);
int x = ((dateViewer->Width() - fontManager.FontTimeLineDateHorizontal->Width(*strDate)) / 2);
int y = ((dateViewer->Height() - fontManager.FontTimeLineDateHorizontal->Height()) / 2);
@@ -105,7 +105,7 @@ void cTimeLine::drawTimeline() {
int imgHeight = geoManager.timeLineGridHeight;
const cImage *img1 = NULL;
const cImage *img2 = NULL;
- if (tvguideConfig.style == eStyleGraphical) {
+ if (config.style == eStyleGraphical) {
img1 = imgCache.GetOsdElement(oeTimeline1);
img2 = imgCache.GetOsdElement(oeTimeline2);
} else {
@@ -122,8 +122,8 @@ void cTimeLine::drawTimeline() {
if (i%2==0) {
img = img1;
colorFont = theme.Color(clrTimeline2);
- colorBackground = (tvguideConfig.style == eStyleFlat)?theme.Color(clrTimeline1):clrTransparent;
- if (tvguideConfig.timeFormat == e12Hours) {
+ colorBackground = (config.style == eStyleFlat)?theme.Color(clrTimeline1):clrTransparent;
+ if (config.timeFormat == e12Hours) {
if (i == 0)
sprintf(timetext, "12:00 PM");
else if (i/2 < 13)
@@ -136,8 +136,8 @@ void cTimeLine::drawTimeline() {
} else {
img = img2;
colorFont = theme.Color(clrTimeline1);
- colorBackground = (tvguideConfig.style == eStyleFlat)?theme.Color(clrTimeline2):clrTransparent;
- if (tvguideConfig.timeFormat == e12Hours) {
+ colorBackground = (config.style == eStyleFlat)?theme.Color(clrTimeline2):clrTransparent;
+ if (config.timeFormat == e12Hours) {
if (i == 1)
sprintf(timetext, "12:30 PM");
else if (i/2 < 13)
@@ -148,25 +148,25 @@ void cTimeLine::drawTimeline() {
sprintf(timetext, "%d:30", i/2);
}
}
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
posY = i*geoManager.minutePixel*30;
timeline->DrawImage(cPoint(0, posY), *img);
- if (tvguideConfig.style != eStyleGraphical) {
+ if (config.style != eStyleGraphical) {
decorateTile(0, posY, imgWidth+2, imgHeight);
}
textWidth = fontManager.FontTimeLineTime->Width(timetext);
timeline->DrawText(cPoint((geoManager.timeLineWidth-textWidth)/2, posY + 5), timetext, colorFont, colorBackground, fontManager.FontTimeLineTime);
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
posX = i*geoManager.minutePixel*30;
timeline->DrawImage(cPoint(posX, 0), *img);
- if (tvguideConfig.style != eStyleGraphical) {
+ if (config.style != eStyleGraphical) {
decorateTile(posX, 0, imgWidth, imgHeight+2);
}
timeline->DrawText(cPoint(posX + 15, (dateViewer->Height() - fontManager.FontTimeLineTimeHorizontal->Height())/2), timetext, colorFont, colorBackground, fontManager.FontTimeLineTimeHorizontal);
}
}
setTimeline();
- if (tvguideConfig.style != eStyleGraphical) {
+ if (config.style != eStyleGraphical) {
delete img1;
delete img2;
}
@@ -183,7 +183,7 @@ void cTimeLine::decorateTile(int posX, int posY, int tileWidth, int tileHeight)
timeline->DrawRectangle(cRect(2+posX,posY+tileHeight-3,tileWidth-4,1), theme.Color(clrBorder)); //bottom
timeline->DrawRectangle(cRect(posX+tileWidth-3,posY+2,1,tileHeight-4), theme.Color(clrBorder)); //right
- if (tvguideConfig.roundedCorners) {
+ if (config.roundedCorners) {
int borderRadius = 12;
drawRoundedCorners(posX, posY, tileWidth, tileHeight, borderRadius);
}
@@ -211,7 +211,7 @@ void cTimeLine::drawCurrentTimeBase(void) {
if (!nowVisible)
return;
int deltaTime = (myTime->GetNow() - myTime->GetStart()) / 60 * geoManager.minutePixel;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
timeBase->DrawRectangle(cRect(0, deltaTime - 2, timeBase->ViewPort().Width(), 4), theme.Color(clrTimeBase));
} else {
timeBase->DrawRectangle(cRect(deltaTime-2, 0, 4, timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
@@ -221,7 +221,7 @@ void cTimeLine::drawCurrentTimeBase(void) {
cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *image = NULL;
- if (tvguideConfig.style == eStyleBlendingDefault) {
+ if (config.style == eStyleBlendingDefault) {
image = new cImage(cSize(width, height));
image->Fill(clrBgr);
int stepY = 0.5*height / 64;
@@ -236,7 +236,7 @@ cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, t
}
alpha += 0x04;
}
- } else if (tvguideConfig.style == eStyleBlendingMagick) {
+ } else if (config.style == eStyleBlendingMagick) {
cImageLoader imgLoader;
if (imgLoader.DrawBackground(clrBgr, clrBlend, width, height)) {
image = new cImage(imgLoader.GetImage());
@@ -251,27 +251,27 @@ cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, t
void cTimeLine::setTimeline() {
int offset = myTime->GetTimelineOffset();
int xNew, yNew;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
xNew = 0;
yNew = -offset*geoManager.minutePixel;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
xNew = -offset*geoManager.minutePixel;
yNew = 0;
}
timeline->SetDrawPortPoint(cPoint(xNew, yNew));
- if (tvguideConfig.displayTimeBase)
+ if (config.displayTimeBase)
drawCurrentTimeBase();
}
void cTimeLine::drawClock() {
- if (tvguideConfig.displayMode == eVertical)
+ if (config.displayMode == eVertical)
clock->Fill(clrTransparent);
cString currentTime = myTime->GetCurrentTime();
- const cFont *font = (tvguideConfig.displayMode == eVertical)?fontManager.FontTimeLineTime:fontManager.FontTimeLineTimeHorizontal;
+ const cFont *font = (config.displayMode == eVertical)?fontManager.FontTimeLineTime:fontManager.FontTimeLineTimeHorizontal;
int textHeight = font->Height();
int clockTextWidth = font->Width(*currentTime);
- tColor colorFontBack = (tvguideConfig.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent;
- if (tvguideConfig.style == eStyleGraphical) {
+ tColor colorFontBack = (config.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent;
+ if (config.style == eStyleGraphical) {
clock->drawBackgroundGraphical(bgClock);
} else {
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
diff --git a/timer.c b/timer.c
index 6a082a4..998c597 100644
--- a/timer.c
+++ b/timer.c
@@ -18,9 +18,9 @@ void cMyTime::Now() {
t = time(0);
tStart = t;
tStart = GetRounded();
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)/geoManager.minutePixel*60;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth)/geoManager.minutePixel*60;
}
}
@@ -41,9 +41,9 @@ bool cMyTime::DelStep(int step) {
void cMyTime::SetTime(time_t newTime) {
tStart = newTime;
- if (tvguideConfig.displayMode == eVertical) {
+ if (config.displayMode == eVertical) {
tEnd = tStart + (geoManager.osdHeight - geoManager.statusHeaderHeight - geoManager.channelHeaderHeight - geoManager.channelGroupsHeight - geoManager.footerHeight)/geoManager.minutePixel*60;
- } else if (tvguideConfig.displayMode == eHorizontal) {
+ } else if (config.displayMode == eHorizontal) {
tEnd = tStart + (geoManager.osdWidth - geoManager.channelHeaderWidth - geoManager.channelGroupsWidth)/geoManager.minutePixel*60;
}
}
@@ -84,9 +84,9 @@ cString cMyTime::GetCurrentTime() {
t = time(0);
tm *st = localtime(&t);
//snprintf(text, sizeof(text), "%d:%02d", st->tm_hour, st->tm_min);
- if (tvguideConfig.timeFormat == e12Hours) {
+ if (config.timeFormat == e12Hours) {
strftime(buf, sizeof(buf), "%I:%M %p", st);
- } else if (tvguideConfig.timeFormat == e24Hours)
+ } else if (config.timeFormat == e24Hours)
strftime(buf, sizeof(buf), "%H:%M", st);
return buf;
diff --git a/tvguide.c b/tvguide.c
index 8995724..705bc2c 100644
--- a/tvguide.c
+++ b/tvguide.c
@@ -45,7 +45,7 @@ public:
virtual void MainThreadHook(void);
virtual cString Active(void);
virtual time_t WakeupTime(void);
- virtual const char *MainMenuEntry(void) { return (tvguideConfig.showMainMenuEntry)?MAINMENUENTRY:NULL; }
+ virtual const char *MainMenuEntry(void) { return (config.showMainMenuEntry) ? MAINMENUENTRY : NULL; }
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
@@ -78,13 +78,13 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) {
while ((c = getopt_long(argc, argv, "e:i:l:", long_options, NULL)) != -1) {
switch (c) {
case 'e':
- tvguideConfig.SetImagesPath(cString(optarg));
+ config.SetImagesPath(cString(optarg));
break;
case 'i':
- tvguideConfig.SetIconsPath(cString(optarg));
+ config.SetIconsPath(cString(optarg));
break;
case 'l':
- tvguideConfig.SetLogoPath(cString(optarg));
+ config.SetLogoPath(cString(optarg));
break;
default:
return false;
@@ -94,10 +94,10 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) {
}
bool cPluginTvguide::Initialize(void) {
- tvguideConfig.SetDefaultPathes();
- tvguideConfig.LoadTheme();
- tvguideConfig.SetStyle();
- tvguideConfig.setDynamicValues();
+ config.SetDefaultPathes();
+ config.LoadTheme();
+ config.SetStyle();
+ config.setDynamicValues();
geoManager.SetGeometry(cOsd::OsdWidth(), cOsd::OsdHeight());
fontManager.SetFonts();
imgCache.CreateCache();
@@ -134,11 +134,11 @@ cMenuSetupPage *cPluginTvguide::SetupMenu(void) {
}
bool cPluginTvguide::SetupParse(const char *Name, const char *Value) {
- return tvguideConfig.SetupParse(Name, Value);
+ return config.SetupParse(Name, Value);
}
bool cPluginTvguide::Service(const char *Id, void *Data) {
- if (strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0 && tvguideConfig.replaceOriginalSchedule != 0) {
+ if (strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0 && config.replaceOriginalSchedule != 0) {
if (Data == NULL)
return true;
cOsdObject **guide = (cOsdObject**) Data;
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;
diff --git a/view.c b/view.c
index e0a607b..806a3da 100644
--- a/view.c
+++ b/view.c
@@ -71,7 +71,7 @@ void cView::SetGeometry(void) {
scrollbarWidth = 40;
width = geoManager.osdWidth - scrollbarWidth;
height = geoManager.osdHeight;
- border = tvguideConfig.epgViewBorder;
+ border = config.epgViewBorder;
headerWidth = geoManager.headerContentWidth;
headerHeight = geoManager.epgViewHeaderHeight;
if (tabbed)
@@ -89,8 +89,8 @@ void cView::DrawHeader(void) {
}
pixmapHeader->Fill(clrTransparent);
pixmapHeaderLogo->Fill(clrTransparent);
- if (tvguideConfig.style == eStyleGraphical) {
- if (tvguideConfig.scaleVideo) {
+ if (config.style == eStyleGraphical) {
+ if (config.scaleVideo) {
pixmapHeader->drawBackgroundGraphical(bgStatusHeaderWindowed);
} else {
pixmapHeader->drawBackgroundGraphical(bgStatusHeaderFull);
@@ -101,9 +101,9 @@ void cView::DrawHeader(void) {
}
//Channel Logo
int logoHeight = 2 * headerHeight / 3;
- int logoWidth = logoHeight * tvguideConfig.logoWidthRatio / tvguideConfig.logoHeightRatio;
+ int logoWidth = logoHeight * config.logoWidthRatio / config.logoHeightRatio;
int xText = border / 2;
- if (channel && !tvguideConfig.hideChannelLogos) {
+ if (channel && !config.hideChannelLogos) {
cImageLoader imgLoader;
if (imgLoader.LoadLogo(channel, logoWidth, logoHeight)) {
cImage logo = imgLoader.GetImage();
@@ -125,7 +125,7 @@ void cView::DrawHeader(void) {
if (!event)
return;
const cTimer *ti;
- if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ if (config.useRemoteTimers && pRemoteTimers) {
RemoteTimers_GetMatch_v1_0 rtMatch;
rtMatch.event = event;
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
@@ -450,7 +450,7 @@ void cView::DrawScrollbar(void) {
cImage *cView::CreateScrollbarImage(int width, int height, tColor clrBgr, tColor clrBlend) {
cImage *image = new cImage(cSize(width, height));
image->Fill(clrBgr);
- if (tvguideConfig.style != eStyleFlat) {
+ if (config.style != eStyleFlat) {
int numSteps = 64;
int alphaStep = 0x03;
if (height < 30)
@@ -485,7 +485,7 @@ bool cView::KeyUp(void) {
if (aktHeight >= 0) {
return false;
}
- int step = tvguideConfig.detailedViewScrollStep * font->Height();
+ int step = config.detailedViewScrollStep * font->Height();
int newY = aktHeight + step;
if (newY > 0)
newY = 0;
@@ -503,7 +503,7 @@ bool cView::KeyDown(void) {
if (totalHeight - ((-1)*aktHeight) == screenHeight) {
return false;
}
- int step = tvguideConfig.detailedViewScrollStep * font->Height();
+ int step = config.detailedViewScrollStep * font->Height();
int newY = aktHeight - step;
if ((-1)*newY > totalHeight - screenHeight)
newY = (-1)*(totalHeight - screenHeight);
@@ -540,9 +540,9 @@ void cEPGView::SetTabs(void) {
void cEPGView::CheckEPGImages(void) {
if (eventID > 0) {
- for (int i=1; i <= tvguideConfig.numAdditionalEPGPictures; i++) {
+ for (int i=1; i <= config.numAdditionalEPGPictures; i++) {
cString epgimage;
- epgimage = cString::sprintf("%s%d_%d.jpg", *tvguideConfig.epgImagePath, eventID, i);
+ epgimage = cString::sprintf("%s%d_%d.jpg", *config.epgImagePath, eventID, i);
FILE *fp = fopen(*epgimage, "r");
if (fp) {
std::stringstream ss;
@@ -560,8 +560,8 @@ void cEPGView::CheckEPGImages(void) {
}
void cEPGView::DrawImages(void) {
- int imgWidth = tvguideConfig.epgImageWidthLarge;
- int imgHeight = tvguideConfig.epgImageHeightLarge;
+ int imgWidth = config.epgImageWidthLarge;
+ int imgHeight = config.epgImageHeightLarge;
int totalHeight = numEPGPics * (imgHeight + border);