|
|
@ -170,6 +170,7 @@ class SupportedProgramsDatabase(object): |
|
|
|
"""Qt Settings will send us this""" |
|
|
|
self.programs = cache["programs"] #list of dicts |
|
|
|
findicons.updateCache(cache["iconPaths"]) |
|
|
|
logger.info("Restoring program list from serialized cache") |
|
|
|
self.nsmExecutables = set(d["argodejoExec"] for d in self.programs) |
|
|
|
|
|
|
|
def getCache(self)->dict: |
|
|
@ -247,29 +248,6 @@ class SupportedProgramsDatabase(object): |
|
|
|
except KeyError: |
|
|
|
pass #Double entries like zyn-jack zyn-alsa etc. |
|
|
|
|
|
|
|
""" |
|
|
|
if exe in self.knownDesktopFiles: #Shortcut through internal database |
|
|
|
entry = self.knownDesktopFiles[exe] |
|
|
|
else: #Reverse Search desktop files. |
|
|
|
for entry in self.desktopEntries: |
|
|
|
if "exec" in entry and exe.lower() in entry["exec"].lower(): |
|
|
|
break #found entry. break inner loop to keep it |
|
|
|
else: #Foor loop ended. Did not find any matching desktop file |
|
|
|
#If we omit continue it will just write exe and fullPath in any desktop file. |
|
|
|
continue |
|
|
|
|
|
|
|
#Found match! |
|
|
|
entry["argodejoFullPath"] = fullPath |
|
|
|
#We don't want .desktop syntax like "qmidiarp %F" |
|
|
|
entry["argodejoExec"] = exe |
|
|
|
matches.append(entry) |
|
|
|
|
|
|
|
try: |
|
|
|
leftovers.remove((exe,fullPath)) |
|
|
|
except KeyError: |
|
|
|
pass #Double entries like zyn-jack zyn-alsa etc. |
|
|
|
""" |
|
|
|
|
|
|
|
for exe,fullPath in leftovers: |
|
|
|
pseudoEntry = {"name": exe.title(), "argodejoExec":exe, "argodejoFullPath":fullPath} |
|
|
|
matches.append(pseudoEntry) |
|
|
|