fixed a bug that skindesigner is not shown after first selection

This commit is contained in:
louis 2014-09-28 10:47:54 +02:00
parent 073af3baa5
commit 9488e28015
5 changed files with 22 additions and 8 deletions

View File

@ -2,11 +2,14 @@
#include "libcore/helpers.h"
cSkinDesigner::cSkinDesigner(void) : cSkin("skindesigner", &::Theme) {
esyslog("skindesigner: konstruktor designer");
backupSkin = NULL;
useBackupSkin = false;
SetOSDSize();
osdSkin = Setup.OSDSkin;
osdTheme = Setup.OSDTheme;
config.SetPathes();
config.SetChannelLogoSize();
config.CheckDecimalPoint();
@ -60,6 +63,7 @@ cSkinDisplayMenu *cSkinDesigner::DisplayMenu(void) {
cSkinDisplayMenu *displayMenu = NULL;
if (!useBackupSkin) {
ReloadCaches();
firstDisplay = false;
displayMenu = new cSDDisplayMenu(menuTemplate);
} else {
displayMenu = backupSkin->DisplayMenu();
@ -174,7 +178,6 @@ bool cSkinDesigner::LoadTemplates(void) {
esyslog("skindesigner: error parsing globals, aborting");
return false;
}
//globals->Debug();
DeleteTemplates();
@ -301,9 +304,14 @@ bool cSkinDesigner::OsdSizeChanged(void) {
}
bool cSkinDesigner::ThemeChanged(void) {
bool changed = false;
if (osdSkin.compare(Setup.OSDSkin) != 0) {
osdSkin = Setup.OSDSkin;
changed = true;
}
if (osdTheme.compare(Setup.OSDTheme) != 0) {
osdTheme = Setup.OSDTheme;
return true;
changed = true;
}
return false;
return changed;
}

View File

@ -17,6 +17,7 @@ private:
cSkinLCARS *backupSkin;
bool useBackupSkin;
cRect osdSize;
std::string osdSkin;
std::string osdTheme;
cGlobals *globals;
cTemplate *channelTemplate;

View File

@ -176,7 +176,12 @@ void cXmlParser::DeleteDocument(void) {
*********************************************************************/
string cXmlParser::GetPath(string xmlFile) {
return *cString::sprintf("%s%s/xmlfiles/%s", *config.skinPath, Setup.OSDTheme, xmlFile.c_str());
string activeSkin = Setup.OSDSkin;
string theme = "default";
if (!activeSkin.compare("skindesigner")) {
theme = Setup.OSDTheme;
}
return *cString::sprintf("%s%s/xmlfiles/%s", *config.skinPath, theme.c_str(), xmlFile.c_str());
}
void cXmlParser::ParseGlobalColors(xmlNodePtr node) {

View File

@ -6,11 +6,11 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skindesigner 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-09-27 11:02+0200\n"
"POT-Creation-Date: 2014-09-27 11:11+0200\n"
"PO-Revision-Date: 2014-09-27 11:02+0200\n"
"Last-Translator: Louis Braun <louis.braun@gmx.de>\n"
"Language: de_DE \n"
"Language-Team: \n"
"Language: de_DE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@ -93,10 +93,10 @@ bool cPluginSkinDesigner::Initialize(void) {
bool cPluginSkinDesigner::Start(void) {
if (!cOsdProvider::SupportsTrueColor()) {
esyslog("skinDesigner: No TrueColor OSD found! Using default Skin LCARS!");
esyslog("skindesigner: No TrueColor OSD found! Using default Skin LCARS!");
return new cSkinLCARS();
} else
dsyslog("skinDesigner: TrueColor OSD found");
dsyslog("skindesigner: TrueColor OSD found");
skinDesigner = new cSkinDesigner();
return skinDesigner;
}