aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/MimeIconProvider.h
diff options
context:
space:
mode:
authorwilliam <william.os4y@gmail.com>2015-03-20 08:02:04 +0100
committerwilliam <william.os4y@gmail.com>2015-03-20 08:02:04 +0100
commitd9ff9adac5b379cd9d96277dd48d0259b8545921 (patch)
treed7ba249ca026a1f1680df717caa5248d30a4b222 /lumina-fm/MimeIconProvider.h
parentMerge remote-tracking branch 'upstream/master' into fmNumbers (diff)
parentUpdate some panel plugins so that they minimize empty space when only an icon... (diff)
downloadlumina-d9ff9adac5b379cd9d96277dd48d0259b8545921.tar.gz
lumina-d9ff9adac5b379cd9d96277dd48d0259b8545921.tar.bz2
lumina-d9ff9adac5b379cd9d96277dd48d0259b8545921.zip
Merge remote-tracking branch 'upstream/master' into fmNumbers
Diffstat (limited to 'lumina-fm/MimeIconProvider.h')
-rw-r--r--lumina-fm/MimeIconProvider.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lumina-fm/MimeIconProvider.h b/lumina-fm/MimeIconProvider.h
index 344d6801..0c9ba98e 100644
--- a/lumina-fm/MimeIconProvider.h
+++ b/lumina-fm/MimeIconProvider.h
@@ -34,8 +34,16 @@ public:
if(showthumbnails && (info.suffix().toLower()=="png" || info.suffix().toLower()=="jpg") ){
//make sure to only load small versions of the files into memory: could have hundreds of them...
return QIcon( QPixmap(info.absoluteFilePath()).scaledToHeight(64) );
+ }else if(info.fileName().endsWith(".desktop") ){
+ bool ok = false;
+ XDGDesktop desk = LXDG::loadDesktopFile(info.absoluteFilePath(), ok);
+ if(ok){
+ return LXDG::findIcon(desk.icon, "unknown");
+ }else{
+ return LXDG::findMimeIcon(info.fileName());
+ }
}else{
- return LXDG::findMimeIcon(info.suffix());
+ return LXDG::findMimeIcon(info.fileName());
}
}else{
return LXDG::findIcon("unknown","");
bgstack15