summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-18 14:56:37 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-18 14:56:37 -0500
commita37d43794f4369915068f585f6ff4720e93dd2af (patch)
tree634c22996d6ec5c9ccc3a3c7329dfd78e99ff096 /tdecore
parentbfc7b3bdbe73a4da9387b239614a433031d75256 (diff)
downloadtdelibs-a37d43794f4369915068f585f6ff4720e93dd2af.tar.gz
tdelibs-a37d43794f4369915068f585f6ff4720e93dd2af.zip
Allow paths to be saved without [$e] suffix on entry key
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdeconfigbase.cpp7
-rw-r--r--tdecore/tdeconfigbase.h23
2 files changed, 30 insertions, 0 deletions
diff --git a/tdecore/tdeconfigbase.cpp b/tdecore/tdeconfigbase.cpp
index a3b15185b..e8d384dbe 100644
--- a/tdecore/tdeconfigbase.cpp
+++ b/tdecore/tdeconfigbase.cpp
@@ -1178,6 +1178,13 @@ void TDEConfigBase::writePathEntry( const char *pKey, const TQString & path,
writeEntry(pKey, translatePath(path), bPersistent, bGlobal, bNLS, true);
}
+void TDEConfigBase::writePathEntry( const char *pKey, const TQString & path,
+ bool bPersistent, bool bGlobal,
+ bool bNLS, bool expand)
+{
+ writeEntry(pKey, translatePath(path), bPersistent, bGlobal, bNLS, expand);
+}
+
void TDEConfigBase::writePathEntry ( const TQString& pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
diff --git a/tdecore/tdeconfigbase.h b/tdecore/tdeconfigbase.h
index 1166703ce..a1ddbb4d3 100644
--- a/tdecore/tdeconfigbase.h
+++ b/tdecore/tdeconfigbase.h
@@ -1577,6 +1577,29 @@ public:
bool bNLS = false );
/**
+ * Writes a file path.
+ *
+ * It is checked whether the path is located under $HOME. If so the
+ * path is written out with the user's home-directory replaced with
+ * $HOME. The path should be read back with readPathEntry()
+ *
+ * @param pKey The key to write.
+ * @param path The path to write.
+ * @param bPersistent If @p bPersistent is false, the entry's dirty
+ * flag will not be set and thus the entry will not be written to
+ * disk at deletion time.
+ * @param bGlobal If @p bGlobal is true, the pair is not saved to the
+ * application specific config file, but to the global KDE config file.
+ * @param bNLS If @p bNLS is true, the locale tag is added to the key
+ * when writing it back.
+ * @param expand If @p expand is true, environment variables will be
+ * expanded on read.
+ */
+ void writePathEntry( const char *pKey, const TQString & path,
+ bool bPersistent, bool bGlobal,
+ bool bNLS, bool expand );
+
+ /**
* writePathEntry() overridden to accept a list of paths (strings).
*
* It is checked whether the paths are located under $HOME. If so each of