SearchBar/ResultsRefreshTools.py
2024-11-30 18:22:43 +01:00

32 lines
791 B
Python

import os
from PySide import QtGui
import Serialize_SearchBar
def refreshToolsAction(nfo):
import RefreshTools
RefreshTools.refreshToolsAction()
def refreshToolsToolTip(nfo, setParent):
return (
Serialize_SearchBar.iconToHTML(genericToolIcon)
+ "<p>Load all workbenches to refresh this list of tools. This may take a minute, depending on the number of installed workbenches.</p>"
)
genericToolIcon = QtGui.QIcon(QtGui.QIcon(os.path.dirname(__file__) + "/Tango-Tools-spanner-hammer.svg"))
def refreshToolsResultsProvider():
return [
{
"icon": genericToolIcon,
"text": "Refresh list of tools",
"toolTip": "",
"action": {"handler": "refreshTools"},
"subitems": [],
}
]