From fe486d9c2fcb27775c63272356d089e1ced3a82f Mon Sep 17 00:00:00 2001
From: Mavridis Philippe <mavridisf@gmail.com>
Date: Sat, 26 Jun 2021 16:34:45 +0300
Subject: Replace fixed ".kde/share/apps" directory with TDEStandardDirs calls.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
---
 client/config/themes.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/client/config/themes.cpp b/client/config/themes.cpp
index 0033f1b..5525b6a 100644
--- a/client/config/themes.cpp
+++ b/client/config/themes.cpp
@@ -125,11 +125,11 @@ void IconThemesConfig::loadThemes()
     TQStringList themesDirs;
 
     // 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..." );
-        TDEIO::mkdir( TQDir::homeDirPath() + "/.kde/share/apps/deKorator/" );
-        TDEIO::mkdir( TQDir::homeDirPath() + "/.kde/share/apps/deKorator/themes/" );
+        TDEIO::mkdir( TDEGlobal::dirs()->localtdedir()+TDEGlobal::dirs()->kde_default("data")+"deKorator/" );
+        TDEIO::mkdir( TDEGlobal::dirs()->localtdedir()+TDEGlobal::dirs()->kde_default("data")+"deKorator/themes/" );
     }
     else
     {
@@ -225,7 +225,7 @@ void IconThemesConfig::installNewTheme()
 bool IconThemesConfig::installThemes( const TQStringList &themes, const TQString &archiveName )
 {
     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",
                                   i18n( "Installing icon themes" ),
@@ -337,7 +337,7 @@ void IconThemesConfig::removeSelectedTheme()
     if ( r != KMessageBox::Continue ) return ;
 
     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 );
     dir.rename( deldirStr, deldirStr + "del" );
 
-- 
cgit v1.2.1