mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the focus-back-to-booklist action work when undocked
This commit is contained in:
parent
3600a12d71
commit
428e72eb66
@ -77,9 +77,9 @@ class ShowQuickviewAction(InterfaceAction):
|
|||||||
self.focus_bl_action = QAction(self.gui)
|
self.focus_bl_action = QAction(self.gui)
|
||||||
self.gui.addAction(self.focus_bl_action)
|
self.gui.addAction(self.focus_bl_action)
|
||||||
self.gui.keyboard.register_shortcut('Focus from Quickview',
|
self.gui.keyboard.register_shortcut('Focus from Quickview',
|
||||||
_('Focus from docked Quickview to the book list'),
|
_('Focus from Quickview to the book list'),
|
||||||
description=_('Move the focus from docked Quickview to the book list'),
|
description=_('Move the focus from Quickview to the book list'),
|
||||||
default_keys=('Alt+Q',), action=self.focus_bl_action,
|
default_keys=('Shift+Alt+Q',), action=self.focus_bl_action,
|
||||||
group=self.action_spec[0])
|
group=self.action_spec[0])
|
||||||
self.focus_bl_action.triggered.connect(self.focus_booklist)
|
self.focus_bl_action.triggered.connect(self.focus_booklist)
|
||||||
|
|
||||||
@ -129,6 +129,7 @@ class ShowQuickviewAction(InterfaceAction):
|
|||||||
|
|
||||||
def set_search_shortcut(self):
|
def set_search_shortcut(self):
|
||||||
if self.current_instance and not self.current_instance.is_closed:
|
if self.current_instance and not self.current_instance.is_closed:
|
||||||
|
self.current_instance.addAction(self.focus_bl_action)
|
||||||
self.current_instance.set_shortcuts(self.search_action.shortcut().toString(),
|
self.current_instance.set_shortcuts(self.search_action.shortcut().toString(),
|
||||||
self.menuless_qaction.shortcut().toString())
|
self.menuless_qaction.shortcut().toString())
|
||||||
|
|
||||||
@ -174,6 +175,7 @@ class ShowQuickviewAction(InterfaceAction):
|
|||||||
self.current_instance.set_focus()
|
self.current_instance.set_focus()
|
||||||
|
|
||||||
def focus_booklist(self):
|
def focus_booklist(self):
|
||||||
|
self.gui.activateWindow()
|
||||||
self.gui.library_view.setFocus()
|
self.gui.library_view.setFocus()
|
||||||
|
|
||||||
def search_quickview(self):
|
def search_quickview(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user