aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-05-20 15:33:34 -0400
committerKen Moore <ken@pcbsd.org>2015-05-20 15:33:34 -0400
commitdca8d5af9d14a41821ecb548cc251536a84642c5 (patch)
tree4889cecdfe2ce8a314dffb008e02f8bc54bb7a9a
parentFix the issues with running commands with lots of forward slashes in the comm... (diff)
downloadlumina-dca8d5af9d14a41821ecb548cc251536a84642c5.tar.gz
lumina-dca8d5af9d14a41821ecb548cc251536a84642c5.tar.bz2
lumina-dca8d5af9d14a41821ecb548cc251536a84642c5.zip
Add a fix for loading icons for Wine applications.
-rw-r--r--libLumina/LuminaXDG.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp
index 9e8a8dce..dcdb2e38 100644
--- a/libLumina/LuminaXDG.cpp
+++ b/libLumina/LuminaXDG.cpp
@@ -104,9 +104,22 @@ XDGDesktop LXDG::loadDesktopFile(QString filePath, bool& ok){
if(!DF.showInList.isEmpty()){
DF.name.append(" ("+DF.showInList.join(", ")+")");
}
- //Quick fix for showing "wine" applications (which quite often don't list a category)
+ //Quick fix for showing "wine" applications (which quite often don't list a category, or have other differences)
if(DF.catList.isEmpty() && filePath.contains("/wine/")){
DF.catList << "Wine"; //Internal Lumina category only (not in XDG specs as of 11/14/14)
+ //Also add a fix for the location of Wine icons
+ if( !DF.icon.isEmpty() ){
+ QStringList sizes; sizes << "256x256" << "128x128" << "64x64" << "48x48" << "32x32" << "16x16";
+ QString upath = QDir::homePath()+"/.local/share/icons/hicolor/%1/apps/%2.png";
+ //qDebug() << "Wine App: Check icon" << upath;
+ for(int i=0; i<sizes.length(); i++){
+ if( QFile::exists(upath.arg(sizes[i],DF.icon)) ){
+ DF.icon = upath.arg(sizes[i],DF.icon);
+ //qDebug() << " - Found Icon:" << DF.icon;
+ break;
+ }
+ }
+ }
}
//Return the structure
//if (hasName && hasType) ok = true; //without Name and Type, the structure cannot be a valid .desktop file
bgstack15