Added more description to applications in VM Settings

Sometimes only the .desktop filename distinguishes between applications,
so now the tooltip will list that filename
This commit is contained in:
Marta Marczykowska-Górecka 2020-07-14 21:22:41 +02:00
parent a6a7560bab
commit fabd601f49
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B

View File

@ -28,7 +28,11 @@ from PyQt5 import QtWidgets, QtCore # pylint: disable=import-error
class AppListWidgetItem(QtWidgets.QListWidgetItem):
def __init__(self, name, ident, tooltip=None, parent=None):
super(AppListWidgetItem, self).__init__(name, parent)
if tooltip:
additional_description = ".desktop filename: " + str(ident)
if not tooltip:
tooltip = additional_description
else:
tooltip += "\n" + additional_description
self.setToolTip(tooltip)
self.ident = ident