Replace fixed ".kde/share/apps" directory with TDEStandardDirs calls.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/1/head
Mavridis Philippe 3 years ago
parent ed38fe0346
commit fe486d9c2f
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -125,11 +125,11 @@ void IconThemesConfig::loadThemes()
TQStringList themesDirs; TQStringList themesDirs;
// if no local deKorator folders // if no local deKorator folders
if ( ! TQDir( TQDir::homeDirPath() + "/.kde/share/apps/" ).exists( "deKorator" ) ) if ( ! TQDir( TDEGlobal::dirs()->localtdedir()+TDEGlobal::dirs()->kde_default("data") ).exists( "deKorator" ) )
{ {
tqWarning( "no dirs, will make them..." ); tqWarning( "no dirs, will make them..." );
TDEIO::mkdir( TQDir::homeDirPath() + "/.kde/share/apps/deKorator/" ); TDEIO::mkdir( TDEGlobal::dirs()->localtdedir()+TDEGlobal::dirs()->kde_default("data")+"deKorator/" );
TDEIO::mkdir( TQDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/" ); TDEIO::mkdir( TDEGlobal::dirs()->localtdedir()+TDEGlobal::dirs()->kde_default("data")+"deKorator/themes/" );
} }
else else
{ {
@ -225,7 +225,7 @@ void IconThemesConfig::installNewTheme()
bool IconThemesConfig::installThemes( const TQStringList &themes, const TQString &archiveName ) bool IconThemesConfig::installThemes( const TQStringList &themes, const TQString &archiveName )
{ {
bool everythingOk = true; bool everythingOk = true;
TQString localThemesDir = TQDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/"; TQString localThemesDir = TDEGlobal::dirs()->localtdedir()+TDEGlobal::dirs()->kde_default("data")+"deKorator/themes/";
// //
KProgressDialog progressDiag( parent_, "themeinstallprogress", KProgressDialog progressDiag( parent_, "themeinstallprogress",
i18n( "Installing icon themes" ), i18n( "Installing icon themes" ),
@ -337,7 +337,7 @@ void IconThemesConfig::removeSelectedTheme()
if ( r != KMessageBox::Continue ) return ; if ( r != KMessageBox::Continue ) return ;
TQString delTheme = selected->text( 0 ); TQString delTheme = selected->text( 0 );
TQString deldirStr = TQDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/" + delTheme; TQString deldirStr = TDEGlobal::dirs()->localtdedir()+TDEGlobal::dirs()->kde_default("data") + "deKorator/themes/" + delTheme;
TQDir dir = TQDir( deldirStr ); TQDir dir = TQDir( deldirStr );
dir.rename( deldirStr, deldirStr + "del" ); dir.rename( deldirStr, deldirStr + "del" );

Loading…
Cancel
Save