diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-11 11:28:11 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-07-11 11:44:39 +0200 |
commit | 0766d679806e1ed098f562672e88ef324c3cd680 (patch) | |
tree | 727689519e3f2a6b098f7dc1337cb639f44d3321 /imageloader.c | |
parent | 3513f82a8c4e01bc375453c9dcb8001b7ea82cd2 (diff) | |
download | vdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.gz vdr-plugin-tvguide-0766d679806e1ed098f562672e88ef324c3cd680.tar.bz2 |
Change tvguideConfig to Config
Diffstat (limited to 'imageloader.c')
-rw-r--r-- | imageloader.c | 44 |
1 files changed, 22 insertions, 22 deletions
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) |