Permalink
Browse files

Use KDE4 style xml config for determing whether splash screen should be

shown.
  • Loading branch information...
1 parent 3c1be4c commit 9fdfac708e5db3e1dcad814027e715bea402b876 @laudrup committed Jun 29, 2011
Showing with 11 additions and 11 deletions.
  1. +8 −2 creox/{creox4.kcfg → creox.kcfg}
  2. +2 −8 creox/crsplashscreen.cpp
  3. +1 −1 creox/settings.kcfgc
@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
<kcfg>
- <kcfgfile name="kjotsrc"/>
+ <kcfgfile name="creox"/>
<include>kglobalsettings.h</include>
- <group name="kjots">
+<group name="general">
+ <entry name="showSplashScreen" type="Bool">
+ <label>Show splash screen at start up</label>
+ <default>true</default>
+ </entry>
+</group>
+ <group name="jack">
<entry name="leftInputChannel" type="Int">
<label>Left input channel</label>
<default>0</default>
@@ -23,13 +23,10 @@
#include <KGlobal>
#include <KStandardDirs>
-#include <KConfig>
-#include <KConfigGroup>
+#include "settings.h"
#include "crsplashscreen.h"
-#include <QDebug>
-
CrSplashScreen* CrSplashScreen::s_this = 0;
CrSplashScreen::CrSplashScreen(const QString& strPixmapName, const char *name )
@@ -38,10 +35,7 @@ CrSplashScreen::CrSplashScreen(const QString& strPixmapName, const char *name )
{
setBackgroundMode(Qt::NoBackground);
- KConfigGroup conf = KGlobal::config()->group(QString::fromLatin1("Splash_Screen"));
- m_bLoadOnStartup = conf.readEntry("loadOnStartup", true);
-
- if(m_bLoadOnStartup){
+ if(Settings::showSplashScreen()){
const KStandardDirs* const stdDirs = KGlobal::dirs();
const QString strFileName(stdDirs->findResource("appdata", QString::fromLatin1("pics/") + strPixmapName));
@@ -1,4 +1,4 @@
-File=creox4.kcfg
+File=creox.kcfg
ClassName=Settings
Singleton=true
Mutators=true

0 comments on commit 9fdfac7

Please sign in to comment.