@ -68,7 +68,7 @@ NoatunApp::NoatunApp()
// set the default config data
// set the default config data
// TODO: Maybe a first time wizard instead?
// TODO: Maybe a first time wizard instead?
K Config * config = TDEGlobal : : config ( ) ; // +
TDE Config * config = TDEGlobal : : config ( ) ; // +
config - > setGroup ( TQString ( ) ) ; // 1
config - > setGroup ( TQString ( ) ) ; // 1
if ( ! config - > readEntry ( " Modules " ) . length ( ) )
if ( ! config - > readEntry ( " Modules " ) . length ( ) )
{
{
@ -146,7 +146,7 @@ NoatunApp::NoatunApp()
NoatunApp : : ~ NoatunApp ( )
NoatunApp : : ~ NoatunApp ( )
{
{
saveEngineState ( ) ;
saveEngineState ( ) ;
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " Volume " , player ( ) - > volume ( ) ) ;
config - > writeEntry ( " Volume " , player ( ) - > volume ( ) ) ;
config - > writeEntry ( " LoopStyle " , player ( ) - > loopStyle ( ) ) ;
config - > writeEntry ( " LoopStyle " , player ( ) - > loopStyle ( ) ) ;
@ -184,7 +184,7 @@ inline bool logicalXOR(bool A, bool B)
# define READBOOLOPT_EX(name, string, def, group, reversal) \
# define READBOOLOPT_EX(name, string, def, group, reversal) \
bool NoatunApp : : name ( ) const \
bool NoatunApp : : name ( ) const \
{ \
{ \
K Config * config = TDEGlobal : : config ( ) ; \
TDE Config * config = TDEGlobal : : config ( ) ; \
config - > setGroup ( group ) ; \
config - > setGroup ( group ) ; \
return logicalXOR ( config - > readBoolEntry ( string , def ) , reversal ) ; \
return logicalXOR ( config - > readBoolEntry ( string , def ) , reversal ) ; \
}
}
@ -211,14 +211,14 @@ bool NoatunApp::clearOnStart() const
int NoatunApp : : startupPlayMode ( ) const
int NoatunApp : : startupPlayMode ( ) const
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
return config - > readNumEntry ( " StartupPlayMode " , autoPlay ( ) ? Play : Restore ) ;
return config - > readNumEntry ( " StartupPlayMode " , autoPlay ( ) ? Play : Restore ) ;
}
}
void NoatunApp : : setStartupPlayMode ( int mode )
void NoatunApp : : setStartupPlayMode ( int mode )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " StartupPlayMode " , mode ) ;
config - > writeEntry ( " StartupPlayMode " , mode ) ;
config - > sync ( ) ;
config - > sync ( ) ;
@ -226,7 +226,7 @@ void NoatunApp::setStartupPlayMode(int mode)
void NoatunApp : : setHackUpPlaylist ( bool b )
void NoatunApp : : setHackUpPlaylist ( bool b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " HackUpPlaylist " , b ) ;
config - > writeEntry ( " HackUpPlaylist " , b ) ;
config - > sync ( ) ;
config - > sync ( ) ;
@ -237,7 +237,7 @@ void NoatunApp::setFastMixer(bool b)
bool whatBefore = fastMixer ( ) ;
bool whatBefore = fastMixer ( ) ;
if ( whatBefore ! = b )
if ( whatBefore ! = b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " FastMixer " , b ) ;
config - > writeEntry ( " FastMixer " , b ) ;
config - > sync ( ) ;
config - > sync ( ) ;
@ -247,7 +247,7 @@ void NoatunApp::setFastMixer(bool b)
void NoatunApp : : setOneInstance ( bool b )
void NoatunApp : : setOneInstance ( bool b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( " KDE " ) ;
config - > setGroup ( " KDE " ) ;
config - > writeEntry ( " MultipleInstances " , ! b ) ;
config - > writeEntry ( " MultipleInstances " , ! b ) ;
config - > sync ( ) ;
config - > sync ( ) ;
@ -255,7 +255,7 @@ void NoatunApp::setOneInstance(bool b)
void NoatunApp : : setLoopList ( bool b )
void NoatunApp : : setLoopList ( bool b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " LoopList " , b ) ;
config - > writeEntry ( " LoopList " , b ) ;
TDEGlobal : : config ( ) - > sync ( ) ;
TDEGlobal : : config ( ) - > sync ( ) ;
@ -263,7 +263,7 @@ void NoatunApp::setLoopList(bool b)
void NoatunApp : : setAutoPlay ( bool b )
void NoatunApp : : setAutoPlay ( bool b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " AutoPlay " , b ) ;
config - > writeEntry ( " AutoPlay " , b ) ;
TDEGlobal : : config ( ) - > sync ( ) ;
TDEGlobal : : config ( ) - > sync ( ) ;
@ -271,7 +271,7 @@ void NoatunApp::setAutoPlay(bool b)
void NoatunApp : : setRememberPositions ( bool b )
void NoatunApp : : setRememberPositions ( bool b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " RememberPositions " , b ) ;
config - > writeEntry ( " RememberPositions " , b ) ;
TDEGlobal : : config ( ) - > sync ( ) ;
TDEGlobal : : config ( ) - > sync ( ) ;
@ -279,7 +279,7 @@ void NoatunApp::setRememberPositions(bool b)
void NoatunApp : : setSaveDirectory ( const TQString & s )
void NoatunApp : : setSaveDirectory ( const TQString & s )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writePathEntry ( " SaveDirectory " , s ) ;
config - > writePathEntry ( " SaveDirectory " , s ) ;
config - > sync ( ) ;
config - > sync ( ) ;
@ -287,21 +287,21 @@ void NoatunApp::setSaveDirectory(const TQString &s)
TQString NoatunApp : : saveDirectory ( ) const
TQString NoatunApp : : saveDirectory ( ) const
{
{
K Config * c = TDEGlobal : : config ( ) ;
TDE Config * c = TDEGlobal : : config ( ) ;
c - > setGroup ( TQString ( ) ) ;
c - > setGroup ( TQString ( ) ) ;
return c - > readPathEntry ( " SaveDirectory " , TQString ( getenv ( " HOME " ) ) ) ;
return c - > readPathEntry ( " SaveDirectory " , TQString ( getenv ( " HOME " ) ) ) ;
}
}
TQString NoatunApp : : titleFormat ( ) const
TQString NoatunApp : : titleFormat ( ) const
{
{
K Config * c = TDEGlobal : : config ( ) ;
TDE Config * c = TDEGlobal : : config ( ) ;
c - > setGroup ( TQString ( ) ) ;
c - > setGroup ( TQString ( ) ) ;
return c - > readEntry ( " TitleFormat " , " $( \" [ \" author \" ] - \" )$(title)$( \" ( \" bitrate \" kbps) \" ) " ) ;
return c - > readEntry ( " TitleFormat " , " $( \" [ \" author \" ] - \" )$(title)$( \" ( \" bitrate \" kbps) \" ) " ) ;
}
}
void NoatunApp : : setTitleFormat ( const TQString & format )
void NoatunApp : : setTitleFormat ( const TQString & format )
{
{
K Config * c = TDEGlobal : : config ( ) ;
TDE Config * c = TDEGlobal : : config ( ) ;
c - > setGroup ( TQString ( ) ) ;
c - > setGroup ( TQString ( ) ) ;
return c - > writeEntry ( " TitleFormat " , format ) ;
return c - > writeEntry ( " TitleFormat " , format ) ;
}
}
@ -313,7 +313,7 @@ void NoatunApp::setClearOnStart(bool b)
void NoatunApp : : setClearOnOpen ( bool b )
void NoatunApp : : setClearOnOpen ( bool b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " ClearOnOpen " , b ) ;
config - > writeEntry ( " ClearOnOpen " , b ) ;
config - > sync ( ) ;
config - > sync ( ) ;
@ -321,7 +321,7 @@ void NoatunApp::setClearOnOpen(bool b)
void NoatunApp : : setDisplayRemaining ( bool b )
void NoatunApp : : setDisplayRemaining ( bool b )
{
{
K Config * config = TDEGlobal : : config ( ) ;
TDE Config * config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " DisplayRemaining " , b ) ;
config - > writeEntry ( " DisplayRemaining " , b ) ;
config - > sync ( ) ;
config - > sync ( ) ;
@ -501,7 +501,7 @@ TQImage NoatunApp::readPNG(const TQString &filename)
void NoatunApp : : restoreEngineState ( )
void NoatunApp : : restoreEngineState ( )
{
{
K Config* config = TDEGlobal : : config ( ) ;
TDE Config* config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
int state = config - > readNumEntry ( " EngineState " , Arts : : posPlaying ) ;
int state = config - > readNumEntry ( " EngineState " , Arts : : posPlaying ) ;
switch ( state )
switch ( state )
@ -521,7 +521,7 @@ void NoatunApp::restoreEngineState()
void NoatunApp : : saveEngineState ( )
void NoatunApp : : saveEngineState ( )
{
{
K Config* config = TDEGlobal : : config ( ) ;
TDE Config* config = TDEGlobal : : config ( ) ;
config - > setGroup ( TQString ( ) ) ;
config - > setGroup ( TQString ( ) ) ;
config - > writeEntry ( " EngineState " , player ( ) - > engine ( ) - > state ( ) ) ;
config - > writeEntry ( " EngineState " , player ( ) - > engine ( ) - > state ( ) ) ;
// we don't sync here since it's done in the destructor afterwards anyway
// we don't sync here since it's done in the destructor afterwards anyway