|
|
@ -188,7 +188,7 @@ def sessionRoot(): |
|
|
|
def currentSession(): |
|
|
|
return nsmServerControl.internalState["currentSession"] |
|
|
|
|
|
|
|
def sessionList(): |
|
|
|
def sessionList()->list: |
|
|
|
"""Updates the list each call. Use only this from a GUI for active query. |
|
|
|
Otherwise sessionRemove and sessionCopy will not have updated the list""" |
|
|
|
r = nsmServerControl.exportSessionsAsDicts() |
|
|
@ -197,24 +197,29 @@ def sessionList(): |
|
|
|
def buildSystemPrograms(): |
|
|
|
"""Build a list of dicts with the .desktop files (or similar) of all NSM compatible programs |
|
|
|
present on the system""" |
|
|
|
return True |
|
|
|
programDatabase.build() |
|
|
|
|
|
|
|
def getSystemPrograms(): |
|
|
|
def getSystemPrograms()->list: |
|
|
|
"""Returns the cached database from buildProgramDatabase. No automatic update. Empty on program |
|
|
|
start""" |
|
|
|
return [] |
|
|
|
return programDatabase.programs |
|
|
|
|
|
|
|
def setSystemsPrograms(listOfDicts:list): |
|
|
|
return True |
|
|
|
programDatabase.loadPrograms(listOfDicts) |
|
|
|
|
|
|
|
def getNsmExecutables()->set: |
|
|
|
"""Cached access fort fast membership tests. Is this program in the PATH?""" |
|
|
|
return set() |
|
|
|
return programDatabase.nsmExecutables |
|
|
|
|
|
|
|
def getUnfilteredExecutables(): |
|
|
|
def getUnfilteredExecutables()->list: |
|
|
|
"""Return a list of unique names without paths or directories of all exectuables in users $PATH. |
|
|
|
This is intended for a program starter prompt. GUI needs to supply tab completition or search |
|
|
|
itself""" |
|
|
|
itself""" |
|
|
|
return [] |
|
|
|
return programDatabase.unfilteredExecutables |
|
|
|
|
|
|
|
|
|
|
|