diff options
author | Ken Moore <moorekou@gmail.com> | 2016-03-11 11:09:51 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-03-11 11:09:51 -0500 |
commit | cdc5e2e146ac7bbe68731b3090225fc84e3a1b5d (patch) | |
tree | 6050ba0e59a072216b5177c14d0e51d08e27530c /libLumina/LuminaXDG.cpp | |
parent | Clean up some random gnome icon paths in the lumina-fileinfo mainUI.ui file. (diff) | |
download | lumina-cdc5e2e146ac7bbe68731b3090225fc84e3a1b5d.tar.gz lumina-cdc5e2e146ac7bbe68731b3090225fc84e3a1b5d.tar.bz2 lumina-cdc5e2e146ac7bbe68731b3090225fc84e3a1b5d.zip |
Significant update to mime-type handling.
1) Register/use the "inode/directory" mimetype for the default file manager.
2) Register/use the "x-scheme-handler/http[s]" mimetypes for the default web browser
Note: Still have not found valid mimetypes for the default terminal/email apps yet - so those still use the alternate lumina settings.
Diffstat (limited to 'libLumina/LuminaXDG.cpp')
-rw-r--r-- | libLumina/LuminaXDG.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp index a1754b2f..c3c89d37 100644 --- a/libLumina/LuminaXDG.cpp +++ b/libLumina/LuminaXDG.cpp @@ -871,7 +871,9 @@ QString LXDG::findDefaultAppForMime(QString mime){ } // Now check for any white-listed files in this work dir // find the full path to the file (should run even if nothing in this file) + //qDebug() << "WhiteList:" << white; for(int w=0; w<white.length(); w++){ + if(white[w].isEmpty()){ continue; } //First check for absolute paths to *.desktop file if( white[w].startsWith("/") ){ if( QFile::exists(white[w]) ){ cdefault=white[w]; break; } @@ -884,9 +886,10 @@ QString LXDG::findDefaultAppForMime(QString mime){ QStringList xdirs; xdirs << QString(getenv("XDG_DATA_HOME"))+"/applications/"; tmp = QString(getenv("XDG_DATA_DIRS")).split(":"); - for(int t=0; t<tmp.length(); t++){ dirs << tmp[t]+"/applications/"; } + for(int t=0; t<tmp.length(); t++){ xdirs << tmp[t]+"/applications/"; } //Now scan these dirs bool found = false; + //qDebug() << "Scan dirs:" << white[w] << xdirs; for(int x=0; x<xdirs.length() && !found; x++){ if(QFile::exists(xdirs[x]+white[w])){cdefault=xdirs[x]+white[w]; found = true; } } |