mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
1) Add a bit of space to the left edge for when the tag browser isn't open
2) Make the name of the plugin "Quickview". 3) Make the Q shortcut "Toggle Quickview" instead of "Show Quickview"
This commit is contained in:
parent
87b244d8bb
commit
abe47f1de6
@ -898,7 +898,7 @@ class ActionFetchNews(InterfaceActionBase):
|
|||||||
|
|
||||||
|
|
||||||
class ActionQuickview(InterfaceActionBase):
|
class ActionQuickview(InterfaceActionBase):
|
||||||
name = 'Show Quickview'
|
name = 'Quickview'
|
||||||
actual_plugin = 'calibre.gui2.actions.show_quickview:ShowQuickviewAction'
|
actual_plugin = 'calibre.gui2.actions.show_quickview:ShowQuickviewAction'
|
||||||
description = _('Show a list of related books quickly')
|
description = _('Show a list of related books quickly')
|
||||||
|
|
||||||
|
@ -54,14 +54,18 @@ def get_quickview_action_plugin():
|
|||||||
|
|
||||||
class ShowQuickviewAction(InterfaceAction):
|
class ShowQuickviewAction(InterfaceAction):
|
||||||
|
|
||||||
name = 'Show Quickview'
|
name = 'Quickview'
|
||||||
action_spec = (_('Show Quickview'), 'quickview.png', None, _('Q'))
|
action_spec = (_('Quickview'), 'quickview.png', None, None)
|
||||||
dont_add_to = frozenset(['context-menu-device'])
|
dont_add_to = frozenset(['context-menu-device'])
|
||||||
action_type = 'current'
|
action_type = 'current'
|
||||||
|
|
||||||
current_instance = None
|
current_instance = None
|
||||||
|
|
||||||
def genesis(self):
|
def genesis(self):
|
||||||
|
self.gui.keyboard.register_shortcut('Toggle Quickview', _('Toggle Quickview'),
|
||||||
|
description=_('Open/close the Quickview panel/window'),
|
||||||
|
default_keys=('Q',), action=self.qaction,
|
||||||
|
group=self.action_spec[0])
|
||||||
self.focus_action = QAction(self.gui)
|
self.focus_action = QAction(self.gui)
|
||||||
self.gui.addAction(self.focus_action)
|
self.gui.addAction(self.focus_action)
|
||||||
self.gui.keyboard.register_shortcut('Focus To Quickview', _('Focus to Quickview'),
|
self.gui.keyboard.register_shortcut('Focus To Quickview', _('Focus to Quickview'),
|
||||||
|
@ -166,7 +166,7 @@ class LibraryWidget(Splitter): # {{{
|
|||||||
parent.quickview_splitter.addWidget(stack)
|
parent.quickview_splitter.addWidget(stack)
|
||||||
|
|
||||||
l = QVBoxLayout()
|
l = QVBoxLayout()
|
||||||
l.setContentsMargins(0, 0, 0, 0)
|
l.setContentsMargins(4, 0, 0, 0)
|
||||||
quickview_widget.setLayout(l)
|
quickview_widget.setLayout(l)
|
||||||
parent.quickview_splitter.addWidget(quickview_widget)
|
parent.quickview_splitter.addWidget(quickview_widget)
|
||||||
parent.quickview_splitter.hide_quickview_widget()
|
parent.quickview_splitter.hide_quickview_widget()
|
||||||
@ -571,8 +571,10 @@ class LayoutMixin(object): # {{{
|
|||||||
button_order = ('sb', 'tb', 'cb', 'gv', 'qv', 'bd')
|
button_order = ('sb', 'tb', 'cb', 'gv', 'qv', 'bd')
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
self.qv = find_plugin('Show Quickview')
|
# This must use the base method to find the plugin because it hasn't
|
||||||
if self.qv:
|
# been fully initialized yet
|
||||||
|
self.qv = find_plugin('Quickview')
|
||||||
|
if self.qv and self.qv.actual_plugin_:
|
||||||
self.qv = self.qv.actual_plugin_
|
self.qv = self.qv.actual_plugin_
|
||||||
|
|
||||||
self.status_bar = StatusBar(self)
|
self.status_bar = StatusBar(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user