diff options
author | Slávek Banko <[email protected]> | 2016-03-26 16:38:44 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-03-26 16:38:44 +0100 |
commit | 3af7196c106fb887db114b01f14c0f9975368bb4 (patch) | |
tree | 8cf2b3f8269a40bacf920cc9e5621971d90bfdf0 /config/tdestyle_baghira_config.cpp | |
parent | 42573cc6b43972357d166b0eabf665b1de64f0ac (diff) | |
download | tde-style-baghira-3af7196c106fb887db114b01f14c0f9975368bb4.tar.gz tde-style-baghira-3af7196c106fb887db114b01f14c0f9975368bb4.zip |
Fix hardcoded reference to .kde profile
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'config/tdestyle_baghira_config.cpp')
-rw-r--r-- | config/tdestyle_baghira_config.cpp | 25 |
1 files 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 <tdeglobalsettings.h> #include <kprocess.h> #include <tdeparts/genericfactory.h> +#include <kstandarddirs.h> #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -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); |