diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-09-11 18:26:55 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-09-11 18:26:55 -0400 |
commit | 3591a104eecb1258cd40c34fb76232e204a6d8b7 (patch) | |
tree | 7214ed1559d5b0a96ff94d3e9ceb7b58ecac0827 /src-qt5/core/libLumina/LuminaXDG.cpp | |
parent | Set default tooltip to be translateable in case issues arise (diff) | |
download | lumina-3591a104eecb1258cd40c34fb76232e204a6d8b7.tar.gz lumina-3591a104eecb1258cd40c34fb76232e204a6d8b7.tar.bz2 lumina-3591a104eecb1258cd40c34fb76232e204a6d8b7.zip |
Added video file detection and correct desktop file translation
Diffstat (limited to 'src-qt5/core/libLumina/LuminaXDG.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LuminaXDG.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index c1e7e199..ab1000ab 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -75,9 +75,9 @@ void XDGDesktop::sync(){ //------------------- if(var=="Name"){ if(insection){ - if(name.isEmpty() && loc.isEmpty()){ name = val; } - else if(name.isEmpty() && loc==slang){ name = val; } //short locale code - else if(loc == lang){ name = val; } + if(loc==slang){ name = val;} //short locale code + else if(loc==lang){ name = val;} + else if(name.isEmpty() && loc.isEmpty()){ /*qDebug() << "Empty" << val;*/ name = val; } }else if(inaction){ if(CDA.name.isEmpty() && loc.isEmpty()){ CDA.name = val; } else if(CDA.name.isEmpty() && loc==slang){ CDA.name = val; } //short locale code @@ -704,7 +704,14 @@ XDGDesktop* LFileInfo::XDG(){ return desk; } -// -- Check if this is a readable image file (for thumbnail support) +// -- Check if this is a readable video file (for thumbnail support) +bool LFileInfo::isVideo(){ + if(!mime.startsWith("video/")){ return false; } + //Check the hardcoded list of known supported video formats to see if the thumbnail can be generated + return ( !LUtils::videoExtensions().filter(this->suffix().toLower()).isEmpty() ); +} + +// -- Check if this is a readable image file bool LFileInfo::isImage(){ if(!mime.startsWith("image/")){ return false; } //quick return for non-image files //Check the Qt subsystems to see if this image file can be read |