diff options
author | Ken Moore <ken@pcbsd.org> | 2016-08-22 13:18:38 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2016-08-22 13:18:38 -0400 |
commit | eb27e089376031025d84e5235c44ff55e2118413 (patch) | |
tree | 2830de3d80039f27675bf91c79949220a2f1b369 /src-qt5/core | |
parent | Remove the old badge (diff) | |
download | lumina-eb27e089376031025d84e5235c44ff55e2118413.tar.gz lumina-eb27e089376031025d84e5235c44ff55e2118413.tar.bz2 lumina-eb27e089376031025d84e5235c44ff55e2118413.zip |
Add some extra checks to the LuminaXDG application listing routine for when it was the first run or not.
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/libLumina/LuminaXDG.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index c53fa2ef..a714aa83 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -35,6 +35,7 @@ void XDGDesktopList::updateList(){ QStringList found, newfiles; //for avoiding duplicate apps (might be files with same name in different priority directories) QStringList oldkeys = files.keys(); bool appschanged = false; + bool firstrun = lastCheck.isNull() || oldkeys.isEmpty(); lastCheck = QDateTime::currentDateTime(); //Variables for internal loop use only (to prevent re-initializing variable on every iteration) bool ok; QString path; QDir dir; QStringList apps; XDGDesktop dFile; @@ -61,8 +62,8 @@ void XDGDesktopList::updateList(){ } //end loop over apps } //end loop over appDirs //Save the extra info to the internal lists - removedApps = oldkeys; //files which were removed - newApps = newfiles; //files which were added + if(!firstrun){ removedApps = oldkeys; }//files which were removed + if(!firstrun){ newApps = newfiles; }//files which were added //Now go through and cleanup any old keys where the associated file does not exist anymore for(int i=0; i<oldkeys.length(); i++){ files.remove(oldkeys[i]); |