summaryrefslogtreecommitdiffstats
path: root/kdecore/kstandarddirs.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 21:21:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 21:21:15 +0000
commit96900dbce3aaa1fcac74a07a71482c5c6fcd3cab (patch)
treebf3fc68d0dcc660fce0e21171373a2d4e2395707 /kdecore/kstandarddirs.cpp
parent5f99bff82d3413803bcc652999f4f631058179d6 (diff)
downloadtdelibs-96900dbce3aaa1fcac74a07a71482c5c6fcd3cab.tar.gz
tdelibs-96900dbce3aaa1fcac74a07a71482c5c6fcd3cab.zip
* Large set of SuSE patches to fix bugs and add functionality
* kdemm is included but not used by knotify as it does not work out of the box git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1171141 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kstandarddirs.cpp')
-rw-r--r--kdecore/kstandarddirs.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp
index 2568dc7df..800c0e191 100644
--- a/kdecore/kstandarddirs.cpp
+++ b/kdecore/kstandarddirs.cpp
@@ -94,13 +94,13 @@ KStandardDirsSingleton* KStandardDirsSingleton::self() {
return s_self;
}
-static const char* const types[] = {"html", "icon", "apps", "sound",
- "data", "locale", "services", "mime",
+static const char* const types[] = {"html", "html-bundle", "icon", "apps", "sound",
+ "data", "locale", "locale-bundle", "services", "mime",
"servicetypes", "config", "exe",
"wallpaper", "lib", "pixmap", "templates",
"module", "qtplugins",
"xdgdata-apps", "xdgdata-dirs", "xdgconf-menu",
- "xdgdata-icon", "xdgdata-pixmap",
+ "xdgdata-icon", "xdgdata-pixmap", "xdgconf-autostart",
"kcfg", "emoticons", 0 };
static int tokenize( TQStringList& token, const TQString& str,
@@ -719,7 +719,10 @@ void KStandardDirs::createSpecialResource(const char *type)
{
char hostname[256];
hostname[0] = 0;
- gethostname(hostname, 255);
+ if( getenv("XAUTHLOCALHOSTNAME"))
+ strlcpy(hostname, getenv("XAUTHLOCALHOSTNAME"), 255 );
+ else
+ gethostname(hostname, 255);
TQString dir = TQString("%1%2-%3").arg(localkdedir()).arg(type).arg(hostname);
char link[1024];
link[1023] = 0;
@@ -1024,6 +1027,8 @@ static int tokenize( TQStringList& tokens, const TQString& str,
TQString KStandardDirs::kde_default(const char *type) {
if (!strcmp(type, "data"))
return "share/apps/";
+ if (!strcmp(type, "html-bundle"))
+ return "share/doc-bundle/HTML/";
if (!strcmp(type, "html"))
return "share/doc/kde/HTML/";
if (!strcmp(type, "icon"))
@@ -1036,6 +1041,8 @@ TQString KStandardDirs::kde_default(const char *type) {
return "share/applnk/";
if (!strcmp(type, "sound"))
return "share/sounds/";
+ if (!strcmp(type, "locale-bundle"))
+ return "share/locale-bundle/";
if (!strcmp(type, "locale"))
return "share/locale/";
if (!strcmp(type, "services"))
@@ -1068,6 +1075,8 @@ TQString KStandardDirs::kde_default(const char *type) {
return "desktop-directories/";
if (!strcmp(type, "xdgconf-menu"))
return "menus/";
+ if (!strcmp(type, "xdgconf-autostart"))
+ return "autostart/";
if (!strcmp(type, "kcfg"))
return "share/config.kcfg";
if (!strcmp(type, "emoticons"))