diff --git a/qtgui/opensessioncontroller.py b/qtgui/opensessioncontroller.py index da11aff..40cf460 100644 --- a/qtgui/opensessioncontroller.py +++ b/qtgui/opensessioncontroller.py @@ -108,15 +108,14 @@ class ClientItem(QtWidgets.QTreeWidgetItem): icon = programIcons[clientDict["executable"]] 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") - if not self.text(nameColumn): #Empty string because program not found + if clientDict["reportedName"] is None: self.setText(nameColumn, clientDict["executable"]) - 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") + #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)")) + class ClientTable(object): """Controls the QTreeWidget that holds loaded clients"""