// This file is generated by tdeconfig_compiler from kverbos.kcfg.
// All changes you do to this file will be lost.

#include "prefs.h"

#include <kstaticdeleter.h>

Prefs *Prefs::mSelf = 0;
static KStaticDeleter<Prefs> staticPrefsDeleter;

Prefs *Prefs::self()
{
  if ( !mSelf ) {
    staticPrefsDeleter.setObject( mSelf, new Prefs() );
    mSelf->readConfig();
  }

  return mSelf;
}

Prefs::Prefs(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "kverbosrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "Language" ) );


          	TDEConfigBase *globalConf = TDEGlobal::config();
    		globalConf->setGroup("Locale");
    		TQString m_language = globalConf->readEntry("Language", "en");
    		//keep only the first 2 characters
		m_language = m_language.left(2);
		kdDebug()<< m_language <<endl;
		//later, scan for present languages
		if (m_language!="de")
			m_language = "en";
    	    
  TDEConfigSkeleton::ItemString  *itemUserLanguage;
  itemUserLanguage = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "UserLanguage" ), mUserLanguage, m_language );
  addItem( itemUserLanguage, TQString::fromLatin1( "UserLanguage" ) );
}

Prefs::~Prefs()
{
  if ( mSelf == this )
    staticPrefsDeleter.setObject( mSelf, 0, false );
}

