Fix gtk-critical error when setting mac menubar.

Port of 3147cf5 from master.
This commit is contained in:
John Ralls 2015-04-17 15:11:08 -07:00
parent c46f7dde41
commit df1ffe06e1
2 changed files with 1715 additions and 1 deletions

1711
gramps/gui/viewmanager.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -380,7 +380,7 @@ class ViewManager(CLIManager):
hpane.add2(self.notebook)
self.menubar = self.uimanager.get_widget('/MenuBar')
self.toolbar = self.uimanager.get_widget('/ToolBar')
vbox.pack_start(self.menubar, False)
self.__attach_menubar(vbox)
vbox.pack_start(self.toolbar, False)
vbox.add(hpane)
vbox.pack_end(self.__setup_statusbar(), False)
@ -857,6 +857,9 @@ class ViewManager(CLIManager):
self.uimanager.add_ui_from_string(UIDEFAULT)
self.uimanager.ensure_update()
def __attach_menubar(self, vbox):
vbox.pack_start(self.menubar, False, True, 0)
if _GTKOSXAPPLICATION:
menubar = self.uimanager.get_widget("/MenuBar")
menubar.hide()