Commit a4fb459d authored by Pierre-Luc Beaudoin's avatar Pierre-Luc Beaudoin
Browse files

Fix for bug 0000001, when there is no skin at startup.

parent 041947ea
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include "src/user_cfg.h"
#include "globals.h" #include "globals.h"
#include "DebugOutput.hpp" #include "DebugOutput.hpp"
#include "SkinManagerImpl.hpp" #include "SkinManagerImpl.hpp"
...@@ -41,9 +42,9 @@ void ...@@ -41,9 +42,9 @@ void
SkinManagerImpl::load() SkinManagerImpl::load()
{ {
bool ok; bool ok;
load(mSettings.readEntry("Skin", "metal", &ok)); load(mSettings.readEntry("Skin", DFT_SKIN, &ok));
if(!ok) { if(!ok) {
mSettings.writeEntry("Skin", "metal"); mSettings.writeEntry("Skin", DFT_SKIN);
} }
} }
...@@ -57,7 +58,14 @@ SkinManagerImpl::save() ...@@ -57,7 +58,14 @@ SkinManagerImpl::save()
void void
SkinManagerImpl::load(const QString &skin) SkinManagerImpl::load(const QString &skin)
{ {
mSkin = skin; if(skin.isNull())
{
mSkin = QString(DFT_SKIN);
}
else
{
mSkin = skin;
}
if(mApp) { if(mApp) {
taxidermy::Taxidermist taxidermist = mHunter.getTaxidermist(skin); taxidermy::Taxidermist taxidermist = mHunter.getTaxidermist(skin);
taxidermist.update(mApp); taxidermist.update(mApp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment