diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-05 09:33:38 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-05 09:33:38 -0500 |
commit | 658707d49e5359eaf9dfa4c398ee492e90f8f1aa (patch) | |
tree | 77ecd4a8cef19877dcb8187e40effc9f7de807f2 /tdeio | |
parent | 9a2e58b31d564c7e87150d56c0318cbab1ae400e (diff) | |
download | tdelibs-658707d49e5359eaf9dfa4c398ee492e90f8f1aa.tar.gz tdelibs-658707d49e5359eaf9dfa4c398ee492e90f8f1aa.zip |
Resolve remainder of Bug 891
Diffstat (limited to 'tdeio')
-rw-r--r-- | tdeio/tdeio/kservice.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tdeio/tdeio/kservice.cpp b/tdeio/tdeio/kservice.cpp index 55ad2862b..5ccb9f33c 100644 --- a/tdeio/tdeio/kservice.cpp +++ b/tdeio/tdeio/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 = "XDG_DATA_DIRS=/usr/share 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 = "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-TDE-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"); |