Fix hidden search bar state not being restored on calibre restart. Fixes #1705916 [[Enhancement] Remeber if Search bar is hidden](https://bugs.launchpad.net/calibre/+bug/1705916)

This commit is contained in:
Kovid Goyal 2017-07-23 21:29:19 +05:30
parent 0f78497dc5
commit 1be4c69f08
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -365,7 +365,7 @@ class SearchBarButton(LayoutButton): # {{{
def __init__(self, gui):
sc = 'Alt+Shift+F'
LayoutButton.__init__(self, I('search.png'), _('Search bar'), parent=gui, shortcut=sc)
self.set_state_to_show()
self.set_state_to_hide()
self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
gui.addAction(self.action_toggle)
gui.keyboard.register_shortcut('search bar toggle' + self.label, unicode(self.action_toggle.text()),