@ -108,15 +108,14 @@ class ClientItem(QtWidgets.QTreeWidgetItem):
icon = programIcons [ clientDict [ " executable " ] ]
icon = programIcons [ clientDict [ " executable " ] ]
self . setIcon ( self . parentController . clientsTreeWidgetColumns . index ( " reportedName " ) , icon ) #reported name is correct here. this is just the column.
self . setIcon ( self . parentController . clientsTreeWidgetColumns . index ( " reportedName " ) , icon ) #reported name is correct here. this is just the column.
#TODO: this should be an nsmd status. Check if excecutable exists. nsmd just reports "stopped", and worse: after a long timeout.
nameColumn = self . parentController . clientsTreeWidgetColumns . index ( " reportedName " )
nameColumn = self . parentController . clientsTreeWidgetColumns . index ( " reportedName " )
if not self . text ( nameColumn ) : #Empty string because program not found
if clientDict [ " reportedName " ] is None :
self . setText ( nameColumn , clientDict [ " executable " ] )
self . setText ( nameColumn , clientDict [ " executable " ] )
#TODO: this should be an nsmd status. Check if excecutable exists. nsmd just reports "stopped", and worse: after a long timeout.
if clientDict [ " lastStatus " ] == " stopped " and clientDict [ " reportedName " ] is None :
self . setText ( self . parentController . clientsTreeWidgetColumns . index ( " lastStatus " ) , QtCore . QCoreApplication . translate ( " OpenSession " , " (command not found) " ) )
self . setText ( self . parentController . clientsTreeWidgetColumns . index ( " lastStatus " ) , QtCore . QCoreApplication . translate ( " OpenSession " , " (command not found) " ) )
#We cannot disable the item because then it can't be selected for resume
#self.setDisabled(clientDict["lastStatus"] == "stopped")
class ClientTable ( object ) :
class ClientTable ( object ) :
""" Controls the QTreeWidget that holds loaded clients """
""" Controls the QTreeWidget that holds loaded clients """