From d09c93fc664fc1d18c5639c5cd49724528cf2f4c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 27 Jan 2014 21:38:53 +0530 Subject: [PATCH] Keyboard shortcuts for find next and previous in diff view --- src/calibre/gui2/tweak_book/diff/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/calibre/gui2/tweak_book/diff/main.py b/src/calibre/gui2/tweak_book/diff/main.py index 2ef6dbe909..c9376de99a 100644 --- a/src/calibre/gui2/tweak_book/diff/main.py +++ b/src/calibre/gui2/tweak_book/diff/main.py @@ -248,6 +248,13 @@ class Diff(Dialog): text = self.view.view.left.selected_text + self.view.view.right.selected_text if text: QApplication.clipboard().setText(text) + return + if ev.matches(QKeySequence.FindNext): + self.sbn.click() + return + if ev.matches(QKeySequence.FindPrevious): + self.sbp.click() + return return Dialog.keyPressEvent(self, ev) if __name__ == '__main__':