mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
...
This commit is contained in:
parent
1e4cab886d
commit
2d169def5f
@ -277,6 +277,13 @@ class BarsManager(QObject):
|
||||
bar.init_bar(actions)
|
||||
|
||||
def update_bars(self):
|
||||
'''
|
||||
This shows the correct main toolbar and rebuilds the menubar based on
|
||||
whether a device is connected or not. Note that the toolbars are
|
||||
explicitly not rebuilt, this is to workaround a Qt limitation iwth
|
||||
QToolButton's popup menus and modal dialogs. If you want the toolbars
|
||||
rebuilt, call init_bars().
|
||||
'''
|
||||
showing_device = self.location_manager.has_device
|
||||
main_bar = self.main_bars[1 if showing_device else 0]
|
||||
child_bar = self.child_bars[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user