Change cTvguideConfig to cTVGuideConfig

This commit is contained in:
kamel5 2019-07-11 11:37:01 +02:00
parent 0766d67980
commit 81759f95cb
4 changed files with 31 additions and 31 deletions

View File

@ -1,7 +1,7 @@
#include <string>
#include "config.h"
cTvguideConfig::cTvguideConfig() {
cTVGuideConfig::cTVGuideConfig() {
debugImageLoading = 0;
showMainMenuEntry = 1;
replaceOriginalSchedule = 0;
@ -112,15 +112,15 @@ cTvguideConfig::cTvguideConfig() {
iconsPathSet = false;
}
cTvguideConfig::~cTvguideConfig() {
cTVGuideConfig::~cTVGuideConfig() {
}
void cTvguideConfig::setDynamicValues() {
void cTVGuideConfig::setDynamicValues() {
numGrids = (displayMode == eVertical)?channelCols:channelRows;
jumpChannels = numGrids;
}
bool cTvguideConfig::LoadTheme() {
bool cTVGuideConfig::LoadTheme() {
//is correct theme already loaded?
if (nOpacityTheme.size() == 0)
nOpacityTheme = Setup.OSDTheme;
@ -178,7 +178,7 @@ bool cTvguideConfig::LoadTheme() {
}
void cTvguideConfig::SetStyle(void) {
void cTVGuideConfig::SetStyle(void) {
if (theme.Color(clrStyle) == CLR_STYLE_FLAT) {
style = eStyleFlat;
esyslog("tvguide: set flat style");
@ -195,25 +195,25 @@ void cTvguideConfig::SetStyle(void) {
}
void cTvguideConfig::SetLogoPath(cString path) {
void cTVGuideConfig::SetLogoPath(cString path) {
logoPath = checkSlashAtEnd(*path);
logoPathSet = true;
esyslog("tvguide: Logo Path set to %s", *logoPath);
}
void cTvguideConfig::SetImagesPath(cString path) {
void cTVGuideConfig::SetImagesPath(cString path) {
epgImagePath = checkSlashAtEnd(*path);
imagesPathSet = true;
esyslog("tvguide: EPG Image Path set to %s", *epgImagePath);
}
void cTvguideConfig::SetIconsPath(cString path) {
void cTVGuideConfig::SetIconsPath(cString path) {
iconPath = checkSlashAtEnd(*path);
iconsPathSet = true;
esyslog("tvguide: Icon Path set to %s", *iconPath);
}
void cTvguideConfig::SetDefaultPathes(void) {
void cTVGuideConfig::SetDefaultPathes(void) {
logoPathDefault = cString::sprintf("%s/logos/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
iconPathDefault = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
epgImagePathDefault = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N));
@ -229,7 +229,7 @@ void cTvguideConfig::SetDefaultPathes(void) {
}
}
cString cTvguideConfig::checkSlashAtEnd(std::string path) {
cString cTVGuideConfig::checkSlashAtEnd(std::string path) {
try {
if (!(path.at(path.size()-1) == '/'))
return cString::sprintf("%s/", path.c_str());
@ -237,7 +237,7 @@ cString cTvguideConfig::checkSlashAtEnd(std::string path) {
return path.c_str();
}
bool cTvguideConfig::SetupParse(const char *Name, const char *Value) {
bool cTVGuideConfig::SetupParse(const char *Name, const char *Value) {
if (strcmp(Name, "timeFormat") == 0) timeFormat = atoi(Value);
else if (strcmp(Name, "debugImageLoading") == 0) debugImageLoading = atoi(Value);
else if (strcmp(Name, "showMainMenuEntry") == 0) showMainMenuEntry = atoi(Value);

View File

@ -43,12 +43,12 @@ enum eInstRecFolderMode {
eFolderFixed
};
class cTvguideConfig {
class cTVGuideConfig {
private:
cString checkSlashAtEnd(std::string path);
public:
cTvguideConfig();
~cTvguideConfig();
cTVGuideConfig();
~cTVGuideConfig();
int debugImageLoading;
int showMainMenuEntry;
int replaceOriginalSchedule;
@ -175,7 +175,7 @@ class cTvguideConfig {
};
#ifdef DEFINE_CONFIG
cTvguideConfig config;
cTVGuideConfig config;
cOsdManager osdManager;
cGeometryManager geoManager;
cFontManager fontManager;
@ -183,7 +183,7 @@ class cTvguideConfig {
cTheme theme;
cPlugin* pRemoteTimers = NULL;
#else
extern cTvguideConfig config;
extern cTVGuideConfig config;
extern cOsdManager osdManager;
extern cGeometryManager geoManager;
extern cFontManager fontManager;

12
setup.c
View File

@ -156,7 +156,7 @@ void cTvguideSetup::Store(void) {
SetupStore("limitLogoCache", config.limitLogoCache);
}
cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cTvguideConfig* data) : cOsdMenu(Title, 40) {
cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cTVGuideConfig* data) : cOsdMenu(Title, 40) {
tmpConfig = data;
indent = " ";
}
@ -183,7 +183,7 @@ eOSState cMenuSetupSubMenu::ProcessKey(eKeys Key) {
//----- General Settings -------------------------------------------------------------------------------------------------------------
cMenuSetupGeneral::cMenuSetupGeneral(cTvguideConfig* data) : cMenuSetupSubMenu(tr("General Settings"), data) {
cMenuSetupGeneral::cMenuSetupGeneral(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("General Settings"), data) {
themes.Load(*cString("tvguide"));
timeFormatItems[0] = "12h";
timeFormatItems[1] = "24h";
@ -252,7 +252,7 @@ eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) {
//----- Screen Presentation -------------------------------------------------------------------------------------------------------------
cMenuSetupScreenLayout::cMenuSetupScreenLayout(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Screen Presentation"), data) {
cMenuSetupScreenLayout::cMenuSetupScreenLayout(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Screen Presentation"), data) {
displayModeItems[0] = "vertical";
displayModeItems[1] = "horizontal";
hideChannelLogosItems[0] = trVDR("yes");
@ -344,7 +344,7 @@ eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) {
//-----Fonts and Fontsizes -------------------------------------------------------------------------------------------------------
cMenuSetupFont::cMenuSetupFont(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Fonts and Fontsizes"), data) {
cMenuSetupFont::cMenuSetupFont(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Fonts and Fontsizes"), data) {
cFont::GetAvailableFontNames(&fontNames);
fontNames.Insert(strdup(config.fontNameDefault));
Set();
@ -392,7 +392,7 @@ void cMenuSetupFont::Set(void) {
//----- Recording Menus and Favorites -------------------------------------------------------------------------------------------------------
cMenuSetupFavorites::cMenuSetupFavorites(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Recording Menus and Favorites"), data) {
cMenuSetupFavorites::cMenuSetupFavorites(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Recording Menus and Favorites"), data) {
strn0cpy(description1, data->descUser1.c_str(), sizeof(description1));
strn0cpy(description2, data->descUser2.c_str(), sizeof(description2));
strn0cpy(description3, data->descUser3.c_str(), sizeof(description3));
@ -493,7 +493,7 @@ eOSState cMenuSetupFavorites::ProcessKey(eKeys Key) {
}
//-----Image Caching-------------------------------------------------------------------------------------------------------------
cMenuSetupImageCache::cMenuSetupImageCache(cTvguideConfig* data) : cMenuSetupSubMenu(tr("Image Loading and Caching"), data) {
cMenuSetupImageCache::cMenuSetupImageCache(cTVGuideConfig* data) : cMenuSetupSubMenu(tr("Image Loading and Caching"), data) {
Set();
}

18
setup.h
View File

@ -4,14 +4,14 @@
#include <vdr/menuitems.h>
#include "config.h"
extern cTvguideConfig config;
extern cTVGuideConfig config;
class cTvguideSetup : public cMenuSetupPage {
public:
cTvguideSetup(void);
virtual ~cTvguideSetup();
private:
cTvguideConfig tmpConfig;
cTVGuideConfig tmpConfig;
void Setup(void);
protected:
virtual eOSState ProcessKey(eKeys Key);
@ -21,13 +21,13 @@ class cTvguideSetup : public cMenuSetupPage {
class cMenuSetupSubMenu : public cOsdMenu {
protected:
cTvguideConfig *tmpConfig;
cTVGuideConfig *tmpConfig;
virtual eOSState ProcessKey(eKeys Key);
virtual void Set(void) = 0;
cOsdItem *InfoItem(const char *label, const char *value);
cString indent;
public:
cMenuSetupSubMenu(const char *Title, cTvguideConfig *data);
cMenuSetupSubMenu(const char *Title, cTVGuideConfig *data);
};
class cMenuSetupGeneral : public cMenuSetupSubMenu {
@ -41,7 +41,7 @@ class cMenuSetupGeneral : public cMenuSetupSubMenu {
const char *useSubtitleRerunTexts[3];
void Set(void);
public:
cMenuSetupGeneral(cTvguideConfig *data);
cMenuSetupGeneral(cTVGuideConfig *data);
};
class cMenuSetupScreenLayout : public cMenuSetupSubMenu {
@ -52,7 +52,7 @@ class cMenuSetupScreenLayout : public cMenuSetupSubMenu {
const char * logoExtensionItems[2];
void Set(void);
public:
cMenuSetupScreenLayout(cTvguideConfig *data);
cMenuSetupScreenLayout(cTVGuideConfig *data);
};
class cMenuSetupFont : public cMenuSetupSubMenu {
@ -60,7 +60,7 @@ class cMenuSetupFont : public cMenuSetupSubMenu {
cStringList fontNames;
void Set(void);
public:
cMenuSetupFont(cTvguideConfig *data);
cMenuSetupFont(cTVGuideConfig *data);
};
class cMenuSetupFavorites : public cMenuSetupSubMenu {
@ -75,14 +75,14 @@ class cMenuSetupFavorites : public cMenuSetupSubMenu {
void Set(void);
virtual eOSState ProcessKey(eKeys Key);
public:
cMenuSetupFavorites(cTvguideConfig *data);
cMenuSetupFavorites(cTVGuideConfig *data);
};
class cMenuSetupImageCache : public cMenuSetupSubMenu {
protected:
void Set(void);
public:
cMenuSetupImageCache(cTvguideConfig *data);
cMenuSetupImageCache(cTVGuideConfig *data);
};
#endif //__TVGUIDE_SETUP_H