From 3b77377b548970b622afbf64126733db2a435c87 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 2 Aug 2021 20:50:45 +0530 Subject: [PATCH] Add a signal to track enter key presses used by the action chains plugin --- src/calibre/gui2/library/alternate_views.py | 1 + src/calibre/gui2/ui.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/calibre/gui2/library/alternate_views.py b/src/calibre/gui2/library/alternate_views.py index e78e333fa2..6868a19873 100644 --- a/src/calibre/gui2/library/alternate_views.py +++ b/src/calibre/gui2/library/alternate_views.py @@ -71,6 +71,7 @@ def handle_enter_press(self, ev, special_action=None, has_edit_cell=True): if special_action is not None: special_action(self.currentIndex()) gui.iactions['View'].view_triggered(self.currentIndex()) + gui.enter_key_pressed_in_book_list.emit(self) return True diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index f4bfa5150e..96e2cb1cb3 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -109,6 +109,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ proceed_requested = pyqtSignal(object, object) book_converted = pyqtSignal(object, object) + enter_key_pressed_in_book_list = pyqtSignal(object) # used by action chains plugin shutting_down = False def __init__(self, opts, parent=None, gui_debug=None):