summaryrefslogtreecommitdiff
path: root/imagecache.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 11:28:11 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 11:44:39 +0200
commit0766d679806e1ed098f562672e88ef324c3cd680 (patch)
tree727689519e3f2a6b098f7dc1337cb639f44d3321 /imagecache.c
parent3513f82a8c4e01bc375453c9dcb8001b7ea82cd2 (diff)
downloadvdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.gz
vdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.bz2
Change tvguideConfig to Config
Diffstat (limited to 'imagecache.c')
-rw-r--r--imagecache.c52
1 files changed, 26 insertions, 26 deletions
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;
}