Fix gtk-critical error when setting mac menubar.
Port of 3147cf5 from master.
This commit is contained in:
parent
c46f7dde41
commit
df1ffe06e1
1711
gramps/gui/viewmanager.py
Normal file
1711
gramps/gui/viewmanager.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -380,7 +380,7 @@ class ViewManager(CLIManager):
|
|||||||
hpane.add2(self.notebook)
|
hpane.add2(self.notebook)
|
||||||
self.menubar = self.uimanager.get_widget('/MenuBar')
|
self.menubar = self.uimanager.get_widget('/MenuBar')
|
||||||
self.toolbar = self.uimanager.get_widget('/ToolBar')
|
self.toolbar = self.uimanager.get_widget('/ToolBar')
|
||||||
vbox.pack_start(self.menubar, False)
|
self.__attach_menubar(vbox)
|
||||||
vbox.pack_start(self.toolbar, False)
|
vbox.pack_start(self.toolbar, False)
|
||||||
vbox.add(hpane)
|
vbox.add(hpane)
|
||||||
vbox.pack_end(self.__setup_statusbar(), False)
|
vbox.pack_end(self.__setup_statusbar(), False)
|
||||||
@ -857,6 +857,9 @@ class ViewManager(CLIManager):
|
|||||||
|
|
||||||
self.uimanager.add_ui_from_string(UIDEFAULT)
|
self.uimanager.add_ui_from_string(UIDEFAULT)
|
||||||
self.uimanager.ensure_update()
|
self.uimanager.ensure_update()
|
||||||
|
|
||||||
|
def __attach_menubar(self, vbox):
|
||||||
|
vbox.pack_start(self.menubar, False, True, 0)
|
||||||
if _GTKOSXAPPLICATION:
|
if _GTKOSXAPPLICATION:
|
||||||
menubar = self.uimanager.get_widget("/MenuBar")
|
menubar = self.uimanager.get_widget("/MenuBar")
|
||||||
menubar.hide()
|
menubar.hide()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user