|
|
@ -31,6 +31,7 @@ import engine.api as api |
|
|
|
|
|
|
|
#Qt |
|
|
|
from .descriptiontextwidget import DescriptionController |
|
|
|
from .helper import iconFromString |
|
|
|
|
|
|
|
iconSize = QtCore.QSize(16,16) |
|
|
|
|
|
|
@ -107,12 +108,17 @@ class ClientItem(QtWidgets.QTreeWidgetItem): |
|
|
|
programIcons = self.parentController.mainWindow.programIcons |
|
|
|
assert programIcons |
|
|
|
assert "executable" in clientDict, clientDict |
|
|
|
iconColumn = self.parentController.clientsTreeWidgetColumns.index("reportedName") |
|
|
|
if clientDict["executable"] in programIcons: |
|
|
|
icon = programIcons[clientDict["executable"]] |
|
|
|
self.setIcon(self.parentController.clientsTreeWidgetColumns.index("reportedName"), icon) #reported name is correct here. this is just the column. |
|
|
|
assert icon, icon |
|
|
|
self.setIcon(iconColumn, icon) #reported name is correct here. this is just the column. |
|
|
|
else: #Not NSM client added by the prompt widget |
|
|
|
icon = QtGui.QIcon.fromTheme(clientDict["executable"]) |
|
|
|
self.setIcon(self.parentController.clientsTreeWidgetColumns.index("reportedName"), icon) |
|
|
|
if not icon.isNull(): |
|
|
|
self.setIcon(iconColumn, icon) |
|
|
|
else: |
|
|
|
self.setIcon(iconColumn, iconFromString(clientDict["executable"])) |
|
|
|
|
|
|
|
nameColumn = self.parentController.clientsTreeWidgetColumns.index("reportedName") |
|
|
|
if clientDict["reportedName"] is None: |
|
|
|