mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add an action and a shortcut to move the focus from quickview to the book list
This commit is contained in:
parent
abe47f1de6
commit
3600a12d71
@ -74,6 +74,15 @@ class ShowQuickviewAction(InterfaceAction):
|
|||||||
group=self.action_spec[0])
|
group=self.action_spec[0])
|
||||||
self.focus_action.triggered.connect(self.focus_quickview)
|
self.focus_action.triggered.connect(self.focus_quickview)
|
||||||
|
|
||||||
|
self.focus_bl_action = QAction(self.gui)
|
||||||
|
self.gui.addAction(self.focus_bl_action)
|
||||||
|
self.gui.keyboard.register_shortcut('Focus from Quickview',
|
||||||
|
_('Focus from docked Quickview to the book list'),
|
||||||
|
description=_('Move the focus from docked Quickview to the book list'),
|
||||||
|
default_keys=('Alt+Q',), action=self.focus_bl_action,
|
||||||
|
group=self.action_spec[0])
|
||||||
|
self.focus_bl_action.triggered.connect(self.focus_booklist)
|
||||||
|
|
||||||
self.search_action = QAction(self.gui)
|
self.search_action = QAction(self.gui)
|
||||||
self.gui.addAction(self.search_action)
|
self.gui.addAction(self.search_action)
|
||||||
self.gui.keyboard.register_shortcut('Search from Quickview', _('Search from Quickview'),
|
self.gui.keyboard.register_shortcut('Search from Quickview', _('Search from Quickview'),
|
||||||
@ -164,6 +173,9 @@ class ShowQuickviewAction(InterfaceAction):
|
|||||||
else:
|
else:
|
||||||
self.current_instance.set_focus()
|
self.current_instance.set_focus()
|
||||||
|
|
||||||
|
def focus_booklist(self):
|
||||||
|
self.gui.library_view.setFocus()
|
||||||
|
|
||||||
def search_quickview(self):
|
def search_quickview(self):
|
||||||
if not self.current_instance or self.current_instance.is_closed:
|
if not self.current_instance or self.current_instance.is_closed:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user