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

View File

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

View File

@ -176,7 +176,12 @@ void cXmlParser::DeleteDocument(void) {
*********************************************************************/ *********************************************************************/
string cXmlParser::GetPath(string xmlFile) { 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) { void cXmlParser::ParseGlobalColors(xmlNodePtr node) {

View File

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

View File

@ -93,10 +93,10 @@ bool cPluginSkinDesigner::Initialize(void) {
bool cPluginSkinDesigner::Start(void) { bool cPluginSkinDesigner::Start(void) {
if (!cOsdProvider::SupportsTrueColor()) { 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(); return new cSkinLCARS();
} else } else
dsyslog("skinDesigner: TrueColor OSD found"); dsyslog("skindesigner: TrueColor OSD found");
skinDesigner = new cSkinDesigner(); skinDesigner = new cSkinDesigner();
return skinDesigner; return skinDesigner;
} }