mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Fixed a error while changing a Theme
This commit is contained in:
parent
cd62a9bd6b
commit
8794891599
5
config.c
5
config.c
@ -95,6 +95,7 @@ cTVGuideConfig::cTVGuideConfig() {
|
|||||||
FontRecMenuItemLargeDelta = 0;
|
FontRecMenuItemLargeDelta = 0;
|
||||||
timeFormat = 1;
|
timeFormat = 1;
|
||||||
useNopacityTheme = 1;
|
useNopacityTheme = 1;
|
||||||
|
useNopacityThemeCurrent = -1;
|
||||||
themeIndex = -1;
|
themeIndex = -1;
|
||||||
themeIndexCurrent = -1;
|
themeIndexCurrent = -1;
|
||||||
themeName = "";
|
themeName = "";
|
||||||
@ -124,13 +125,14 @@ bool cTVGuideConfig::LoadTheme() {
|
|||||||
//is correct theme already loaded?
|
//is correct theme already loaded?
|
||||||
if (nOpacityTheme.size() == 0)
|
if (nOpacityTheme.size() == 0)
|
||||||
nOpacityTheme = Setup.OSDTheme;
|
nOpacityTheme = Setup.OSDTheme;
|
||||||
if ((themeIndex > -1) && (themeIndex == themeIndexCurrent)) {
|
if ((themeIndex > -1) && (themeIndex == themeIndexCurrent) && (useNopacityTheme == useNopacityThemeCurrent)) {
|
||||||
if (!nOpacityTheme.compare(Setup.OSDTheme)) {
|
if (!nOpacityTheme.compare(Setup.OSDTheme)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
nOpacityTheme = Setup.OSDTheme;
|
nOpacityTheme = Setup.OSDTheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
esyslog("tvguide: loading new Theme");
|
||||||
//Load available Themes
|
//Load available Themes
|
||||||
cThemes themes;
|
cThemes themes;
|
||||||
themes.Load(*cString("tvguide"));
|
themes.Load(*cString("tvguide"));
|
||||||
@ -167,6 +169,7 @@ bool cTVGuideConfig::LoadTheme() {
|
|||||||
themeIndex = 0;
|
themeIndex = 0;
|
||||||
|
|
||||||
themeIndexCurrent = themeIndex;
|
themeIndexCurrent = themeIndex;
|
||||||
|
useNopacityThemeCurrent = useNopacityTheme;
|
||||||
|
|
||||||
const char *themePath = themes.FileName(themeIndex);
|
const char *themePath = themes.FileName(themeIndex);
|
||||||
if (access(themePath, F_OK) == 0) {
|
if (access(themePath, F_OK) == 0) {
|
||||||
|
1
config.h
1
config.h
@ -149,6 +149,7 @@ class cTVGuideConfig {
|
|||||||
int FontRecMenuItemLargeDelta;
|
int FontRecMenuItemLargeDelta;
|
||||||
int timeFormat;
|
int timeFormat;
|
||||||
int useNopacityTheme;
|
int useNopacityTheme;
|
||||||
|
int useNopacityThemeCurrent;
|
||||||
int themeIndex;
|
int themeIndex;
|
||||||
int themeIndexCurrent;
|
int themeIndexCurrent;
|
||||||
cString themeName;
|
cString themeName;
|
||||||
|
Loading…
Reference in New Issue
Block a user