Metadata diff dialog: Allow pressing alt+shift+right to trigger the reject button

This commit is contained in:
Kovid Goyal 2021-07-30 09:17:42 +05:30
parent a0d6206ab6
commit 39e0c04a9f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -645,6 +645,11 @@ class CompareMany(QDialog):
b.setToolTip(reject_all_tooltip)
b.clicked.connect(self.reject_all_remaining)
self.sb = b = bb.addButton(_('R&eject'), QDialogButtonBox.ButtonRole.ActionRole)
ac = QAction(self)
ac.setShortcut(QKeySequence(Qt.Modifier.ALT | Qt.Modifier.SHIFT | Qt.Key.Key_Right))
ac.triggered.connect(b.click)
self.addAction(ac)
b.setToolTip(_('Reject changes and move to next [{}]').format(ac.shortcut().toString(QKeySequence.SequenceFormat.NativeText)))
connect_lambda(b.clicked, self, lambda self: self.next_item(False))
b.setIcon(QIcon(I('minus.png'))), b.setAutoDefault(False)
if reject_button_tooltip: