Fix hardcoded reference to .kde profile

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 42573cc6b4
commit 3af7196c10

@ -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);

Loading…
Cancel
Save