diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-12 00:19:11 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-12 00:19:11 -0400 |
commit | 1f132f55739c42f67cf720d621e250a377c348db (patch) | |
tree | 2b1c46ce7d279fa206956666a694f398d8b9799c /lumina-fm | |
parent | Just a bit of cleanup in libLumina and adjust the deskopview plugin a bit for... (diff) | |
download | lumina-1f132f55739c42f67cf720d621e250a377c348db.tar.gz lumina-1f132f55739c42f67cf720d621e250a377c348db.tar.bz2 lumina-1f132f55739c42f67cf720d621e250a377c348db.zip |
Make sure to load any specific icons for *.desktop files in lumina-fm.
Diffstat (limited to 'lumina-fm')
-rw-r--r-- | lumina-fm/MimeIconProvider.h | 10 |
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",""); |