From 3af7196c106fb887db114b01f14c0f9975368bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 26 Mar 2016 16:38:44 +0100 Subject: [PATCH] Fix hardcoded reference to .kde profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- config/tdestyle_baghira_config.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/config/tdestyle_baghira_config.cpp b/config/tdestyle_baghira_config.cpp index f94c50b..a408b4c 100644 --- a/config/tdestyle_baghira_config.cpp +++ b/config/tdestyle_baghira_config.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -521,7 +522,7 @@ void tdestyle_baghira_config::load(TQString &fileName) //Kicker dialog_->removeKickerBevel->setChecked( config->readBoolEntry( "Special_RemoveKickerBevel", true)); dialog_->roundTasks->setChecked( config->readBoolEntry( "Special_RoundTaskbuttons", false)); - TQFile file(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop"); + TQFile file(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data") + "kicker/applets/menuapplet.desktop"); dialog_->replaceMenubar->setChecked( menuReplaced = file.exists() ); //Scrollbars dialog_->animateSlider->setChecked( config->readBoolEntry( "Special_AnimateSlider", true)); @@ -719,17 +720,17 @@ void tdestyle_baghira_config::save(TQString &fileName) //Kicker config->writeEntry("Special_RemoveKickerBevel", dialog_->removeKickerBevel->isOn()); config->writeEntry("Special_RoundTaskbuttons", dialog_->roundTasks->isOn()); - TQDir tmpDir(TQDir::homeDirPath() + "/.kde"); - if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde"); - tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share"); - if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share"); - tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps"); - if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps"); - tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps/kicker"); - if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps/kicker"); - tmpDir.setPath(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); - if (!tmpDir.exists()) tmpDir.mkdir(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets"); - TQFile file(TQDir::homeDirPath() + "/.kde/share/apps/kicker/applets/menuapplet.desktop"); + TQDir tmpDir(TDEGlobal::dirs()->localtdedir()); + if (!tmpDir.exists()) tmpDir.mkdir(TDEGlobal::dirs()->localtdedir()); + tmpDir.setPath(TDEGlobal::dirs()->localtdedir() + "share"); + if (!tmpDir.exists()) tmpDir.mkdir(TDEGlobal::dirs()->localtdedir() + "share"); + tmpDir.setPath(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data")); + if (!tmpDir.exists()) tmpDir.mkdir(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data")); + tmpDir.setPath(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data") + "kicker"); + if (!tmpDir.exists()) tmpDir.mkdir(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data") + "kicker"); + tmpDir.setPath(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data") + "kicker/applets"); + if (!tmpDir.exists()) tmpDir.mkdir(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data") + "kicker/applets"); + TQFile file(TDEGlobal::dirs()->localtdedir() + TDEStandardDirs::kde_default("data") + "kicker/applets/menuapplet.desktop"); if (dialog_->replaceMenubar->isOn()) { file.open(IO_WriteOnly);