From 63069bcc5f0cd5dd0f489ebdbd0c12250e01bd03 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 23 Sep 2016 09:44:43 -0400 Subject: Finish up the depretiation of the old systemapps fetching function. --- src-qt5/core/libLumina/LuminaXDG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core/libLumina/LuminaXDG.cpp') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 0e33f254..d89c7f46 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -906,13 +906,13 @@ QStringList LXDG::systemApplicationDirs(){ return sysapps; }*/ -QList LXDG::systemDesktopFiles(bool showAll, bool showHidden){ +/*QList LXDG::systemDesktopFiles(bool showAll, bool showHidden){ //If this is going to be used regularly, it is better to use a custom instance of an XDGDesktopList() which self-updates instead. // Since this function will need to re-read the entire system app registry every time. XDGDesktopList sysapps; sysapps.updateList(); return sysapps.apps(showAll, showHidden); -} +}*/ QHash > LXDG::sortDesktopCats(QList apps){ //Sort the list of applications into their different categories (main categories only) -- cgit From 44d27b05e75aff8e4d304847c60d143eb9f33814 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 23 Sep 2016 13:48:40 -0400 Subject: Add a new file to be distributed with Lumina: Include a copy of the "globs2" file from the FreeDesktop mimetype database, to be used as a fallback if the official mimetype database is not installed/found on the system. Also adjust the mimetype loader to use this fallback as needed. --- src-qt5/core/libLumina/LuminaXDG.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/LuminaXDG.cpp') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index d89c7f46..96f77ff9 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -1499,7 +1499,11 @@ QStringList LXDG::loadMimeFileGlobs2(){ } file.close(); } - } + if(i==dirs.length()-1 && mimeglobs.isEmpty()){ + //Could not find the mimetype database on the system - use the fallback file distributed with Lumina + dirs << LOS::LuminaShare(); + } + }//end loop over dirs } return mimeglobs; } -- cgit