Cache params

This commit is contained in:
Suzanne Soy 2021-10-06 04:22:46 +01:00
parent 350fe5293b
commit 80b79e886a
2 changed files with 4 additions and 3 deletions

View File

@ -13,9 +13,9 @@ SearchResults.registerResultProvider('document',
SearchResults.registerResultProvider('toolbar', SearchResults.registerResultProvider('toolbar',
getItemGroupsCached = lambda: __import__('ResultsToolbar').toolbarResultsProvider(), getItemGroupsCached = lambda: __import__('ResultsToolbar').toolbarResultsProvider(),
getItemGroupsUncached = lambda: []) getItemGroupsUncached = lambda: [])
SearchResults.registerResultProvider('toolbar', SearchResults.registerResultProvider('param',
getItemGroupsCached = lambda: [], getItemGroupsCached = lambda: __import__('ResultsPreferences').paramResultsProvider(),
getItemGroupsUncached = lambda: __import__('ResultsPreferences').paramResultsProvider()) getItemGroupsUncached = lambda: [])
SearchResults.registerResultHandler('refreshTools', SearchResults.registerResultHandler('refreshTools',
action = lambda nfo: __import__('ResultsRefreshTools').refreshToolsAction(nfo), action = lambda nfo: __import__('ResultsRefreshTools').refreshToolsAction(nfo),

View File

@ -8,6 +8,7 @@ genericToolIcon = QtGui.QIcon(QtGui.QIcon(os.path.dirname(__file__) + '/Tango-To
def getParam(grpPath, type_, name): def getParam(grpPath, type_, name):
return { return {
# TODO: use letter icon based on the type, as the preferences editor does
'icon': genericToolIcon, 'icon': genericToolIcon,
'text': name, 'text': name,
'toolTip': '', 'toolTip': '',