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:
Charles Haley 2017-07-09 14:21:00 +02:00
parent 87b244d8bb
commit abe47f1de6
3 changed files with 12 additions and 6 deletions

View File

@ -898,7 +898,7 @@ class ActionFetchNews(InterfaceActionBase):
class ActionQuickview(InterfaceActionBase):
name = 'Show Quickview'
name = 'Quickview'
actual_plugin = 'calibre.gui2.actions.show_quickview:ShowQuickviewAction'
description = _('Show a list of related books quickly')

View File

@ -54,14 +54,18 @@ def get_quickview_action_plugin():
class ShowQuickviewAction(InterfaceAction):
name = 'Show Quickview'
action_spec = (_('Show Quickview'), 'quickview.png', None, _('Q'))
name = 'Quickview'
action_spec = (_('Quickview'), 'quickview.png', None, None)
dont_add_to = frozenset(['context-menu-device'])
action_type = 'current'
current_instance = None
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.gui.addAction(self.focus_action)
self.gui.keyboard.register_shortcut('Focus To Quickview', _('Focus to Quickview'),

View File

@ -166,7 +166,7 @@ class LibraryWidget(Splitter): # {{{
parent.quickview_splitter.addWidget(stack)
l = QVBoxLayout()
l.setContentsMargins(0, 0, 0, 0)
l.setContentsMargins(4, 0, 0, 0)
quickview_widget.setLayout(l)
parent.quickview_splitter.addWidget(quickview_widget)
parent.quickview_splitter.hide_quickview_widget()
@ -571,8 +571,10 @@ class LayoutMixin(object): # {{{
button_order = ('sb', 'tb', 'cb', 'gv', 'qv', 'bd')
# }}}
self.qv = find_plugin('Show Quickview')
if self.qv:
# This must use the base method to find the plugin because it hasn't
# been fully initialized yet
self.qv = find_plugin('Quickview')
if self.qv and self.qv.actual_plugin_:
self.qv = self.qv.actual_plugin_
self.status_bar = StatusBar(self)