This commit is contained in:
Kovid Goyal 2011-05-18 20:59:00 -06:00
parent 1e4cab886d
commit 2d169def5f

View File

@ -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]