clarify 'delete unused' button, and don't show when n/a

This commit is contained in:
Damien Elmes 2018-03-01 14:00:05 +10:00
parent 0fce9fba9d
commit 724513ca91

View File

@ -1039,11 +1039,13 @@ will be lost. Continue?"""))
layout.addWidget(text)
box = QDialogButtonBox(QDialogButtonBox.Close)
layout.addWidget(box)
b = QPushButton(_("Delete Unused"))
b.setAutoDefault(False)
box.addButton(b, QDialogButtonBox.ActionRole)
b.clicked.connect(
lambda c, u=unused, d=diag: self.deleteUnused(u, d))
if unused:
b = QPushButton(_("Delete Unused Files"))
b.setAutoDefault(False)
box.addButton(b, QDialogButtonBox.ActionRole)
b.clicked.connect(
lambda c, u=unused, d=diag: self.deleteUnused(u, d))
box.rejected.connect(diag.reject)
diag.setMinimumHeight(400)
diag.setMinimumWidth(500)