mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix right lcicking on the show search bar button not working
This commit is contained in:
parent
cd7813f8a8
commit
1bddc1c9ef
@ -992,10 +992,14 @@ class LayoutButton(QToolButton):
|
||||
|
||||
def mouseReleaseEvent(self, ev):
|
||||
if ev.button() == Qt.RightButton:
|
||||
from calibre.gui2.ui import get_gui
|
||||
gui = get_gui()
|
||||
if self.icname == 'search':
|
||||
gui.iactions['Preferences'].do_config(initial_plugin=('Interface', 'Search'), close_after_initial=True)
|
||||
ev.accept()
|
||||
return
|
||||
tab_name = {'book':'book_details', 'grid':'cover_grid', 'cover_flow':'cover_browser', 'tags':'tag_browser'}.get(self.icname)
|
||||
if tab_name:
|
||||
from calibre.gui2.ui import get_gui
|
||||
gui = get_gui()
|
||||
if gui is not None:
|
||||
gui.iactions['Preferences'].do_config(initial_plugin=('Interface', 'Look & Feel', tab_name+'_tab'), close_after_initial=True)
|
||||
ev.accept()
|
||||
|
Loading…
x
Reference in New Issue
Block a user