summaryrefslogtreecommitdiffstats
path: root/kio
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-05 09:33:38 -0500
committerSlávek Banko <slavek.banko@axis.cz>2013-04-06 15:03:50 +0200
commited0d72dedcd806a12e749111f6cff13b278657b5 (patch)
treed9adf8a8b92150b1184709bd6bbe91a2dda6a3ad /kio
parentda981a1873c133f540e30f5b62af80f4b0c963a3 (diff)
downloadtdelibs-ed0d72dedcd806a12e749111f6cff13b278657b5.tar.gz
tdelibs-ed0d72dedcd806a12e749111f6cff13b278657b5.zip
Resolve remainder of Bug 891
(cherry picked from commit 658707d49e5359eaf9dfa4c398ee492e90f8f1aa)
Diffstat (limited to 'kio')
-rw-r--r--kio/kio/kservice.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp
index 5860935f1..27b4859c1 100644
--- a/kio/kio/kservice.cpp
+++ b/kio/kio/kservice.cpp
@@ -98,6 +98,13 @@ KService::init( KDesktopFile *config )
bool absPath = !TQDir::isRelativePath(entryPath());
bool kde4application = config->fileName().contains("/share/applications/kde4/");
+ TQString kde4applicationprefix;
+ if (kde4application) {
+ // extract prefix
+ kde4applicationprefix = config->fileName();
+ int pos = kde4applicationprefix.find("/share/applications/kde4/");
+ kde4applicationprefix.truncate(pos-1);
+ }
config->setDesktopGroup();
@@ -198,7 +205,7 @@ KService::init( KDesktopFile *config )
m_strExec = config->readPathEntry( "Exec" );
if (kde4application && !m_strExec.startsWith("/")) {
- m_strExec = "KDEHOME=$HOME/" KDE4_DEFAULT_HOME " XDG_DATA_DIRS=/usr/share KDEDIRS=/usr/ XDG_CONFIG_DIRS=/etc/xdg/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$PATH "+m_strExec;
+ m_strExec = "KDEHOME=$HOME/" KDE4_DEFAULT_HOME " KDEDIRS=" + kde4applicationprefix + "/ XDG_DATA_DIRS=" + kde4applicationprefix + "/share XDG_CONFIG_DIRS=/etc/xdg/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$PATH "+m_strExec;
} else if (config->readBoolEntry("X-KDE-SubstituteUID")) {
int space = m_strExec.find(" ");
if (space==-1)
@@ -213,10 +220,10 @@ KService::init( KDesktopFile *config )
m_strIcon = config->readEntry( "Icon", "unknown" );
if (kde4application) {
- if (TQFile::exists("/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png")) {
- m_strIcon = "/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png";
- } else if (TQFile::exists("/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png")) {
- m_strIcon = "/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png";
+ if (TQFile::exists(kde4applicationprefix + "/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png")) {
+ m_strIcon = kde4applicationprefix + "/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png";
+ } else if (TQFile::exists(kde4applicationprefix + "/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png")) {
+ m_strIcon = kde4applicationprefix + "/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png";
}
}
entryMap.remove("Icon");