@@ -236,6 +236,11 @@ def browser_menus(self):
236236 Creates a menubar attribute for the browser.
237237 """
238238 self .menubar = menubar = Tk_ .Menu (self )
239+ if sys .platform == 'darwin' and self .main_window is not None :
240+ Python_menu = Tk_ .Menu (menubar , name = 'apple' )
241+ Python_menu .add_command (label = 'About SnapPy...' ,
242+ command = self .main_window .about_window )
243+ menubar .add_cascade (label = 'SnapPy' , menu = Python_menu )
239244 File_menu = Tk_ .Menu (menubar , name = 'file' )
240245 add_menu (self , File_menu , 'Open...' , None , 'disabled' )
241246 add_menu (self , File_menu , 'Save as...' , self .save )
@@ -247,20 +252,21 @@ def browser_menus(self):
247252 menubar .add_cascade (label = 'View' , menu = Tk_ .Menu (menubar , name = 'view' ))
248253 menubar .add_cascade (label = 'Window' , menu = WindowMenu (menubar ))
249254 help_menu = HelpMenu (menubar )
250-
251- def dirichlet_help ():
252- InfoWindow (self , 'Viewer Help' , self .dirichlet_viewer .widget .help_text )
253- help_menu .extra_command (label = help_polyhedron_viewer_label , command = dirichlet_help )
254-
255- def horoball_help ():
256- InfoWindow (self , 'Viewer Help' , self .horoball_viewer .widget .help_text )
257- help_menu .extra_command (label = help_horoball_viewer_label , command = horoball_help )
255+ help_menu .extra_command (label = help_polyhedron_viewer_label ,
256+ command = self .dirichlet_help )
257+ help_menu .extra_command (label = help_horoball_viewer_label ,
258+ command = self .horoball_help )
258259 menubar .add_cascade (label = 'Help' , menu = help_menu )
259260
260261
261262def plink_menus (self ):
262263 """Menus for the SnapPyLinkEditor."""
263264 self .menubar = menubar = Tk_ .Menu (self .window )
265+ if sys .platform == 'darwin' :
266+ Python_menu = Tk_ .Menu (menubar , name = 'apple' )
267+ Python_menu .add_command (label = 'About SnapPy...' ,
268+ command = self .main_window .about_window )
269+ menubar .add_cascade (label = 'SnapPy' , menu = Python_menu )
264270 File_menu = Tk_ .Menu (menubar , name = 'file' )
265271 add_menu (self .window , File_menu , 'Open...' , self .load )
266272 add_menu (self .window , File_menu , 'Save as...' , self .save )
@@ -293,6 +299,11 @@ def dirichlet_menus(self):
293299 parent Toplevel.
294300 """
295301 self .menubar = menubar = Tk_ .Menu (self .parent )
302+ if sys .platform == 'darwin' :
303+ Python_menu = Tk_ .Menu (menubar , name = 'apple' )
304+ Python_menu .add_command (label = 'About SnapPy...' ,
305+ command = self .main_window .about_window )
306+ menubar .add_cascade (label = 'SnapPy' , menu = Python_menu )
296307 File_menu = Tk_ .Menu (menubar , name = 'file' )
297308 add_menu (self .master , File_menu , 'Open...' , None , 'disabled' )
298309 add_menu (self .master , File_menu , 'Save as...' , None , 'disabled' )
@@ -307,7 +318,7 @@ def dirichlet_menus(self):
307318 menubar .add_cascade (label = 'Edit ' , menu = EditMenu (menubar , self .master .edit_actions ))
308319 menubar .add_cascade (label = 'Window' , menu = WindowMenu (menubar ))
309320 help_menu = HelpMenu (menubar )
310- help_menu .extra_command (label = help_polyhedron_viewer_label , command = self .widget . help )
321+ help_menu .extra_command (label = help_polyhedron_viewer_label , command = self .help_window )
311322 help_menu .activate ([help_polyhedron_viewer_label , help_report_bugs_label ])
312323 self .menubar .add_cascade (label = 'Help' , menu = help_menu )
313324
@@ -318,6 +329,11 @@ def horoball_menus(self):
318329 master Toplevel.
319330 """
320331 self .menubar = menubar = Tk_ .Menu (self .master )
332+ if sys .platform == 'darwin' :
333+ Python_menu = Tk_ .Menu (menubar , name = 'apple' )
334+ Python_menu .add_command (label = 'About SnapPy...' ,
335+ command = self .main_window .about_window )
336+ menubar .add_cascade (label = 'SnapPy' , menu = Python_menu )
321337 File_menu = Tk_ .Menu (menubar , name = 'file' )
322338 add_menu (self .master , File_menu , 'Open...' , None , 'disabled' )
323339 add_menu (self .master , File_menu , 'Save as...' , None , 'disabled' )
@@ -328,7 +344,7 @@ def horoball_menus(self):
328344 menubar .add_cascade (label = 'Edit ' , menu = EditMenu (menubar , self .master .edit_actions ))
329345 menubar .add_cascade (label = 'Window' , menu = WindowMenu (menubar ))
330346 help_menu = HelpMenu (menubar )
331- help_menu .extra_command (label = help_horoball_viewer_label , command = self .widget . help )
347+ help_menu .extra_command (label = help_horoball_viewer_label , command = self .help_window )
332348 help_menu .activate ([help_horoball_viewer_label , help_report_bugs_label ])
333349 self .menubar .add_cascade (label = 'Help' , menu = help_menu )
334350
@@ -337,6 +353,11 @@ def inside_view_menus(self):
337353 """Menus for the standalone Inside viewer. Called by the view Frame, not the
338354 master Toplevel."""
339355 self .menubar = menubar = Tk_ .Menu (self .master )
356+ if sys .platform == 'darwin' :
357+ Python_menu = Tk_ .Menu (menubar , name = 'apple' )
358+ Python_menu .add_command (label = 'About SnapPy...' ,
359+ command = self .main_window .about_window )
360+ menubar .add_cascade (label = 'SnapPy' , menu = Python_menu )
340361 File_menu = Tk_ .Menu (menubar , name = 'file' )
341362 add_menu (self .master , File_menu , 'Open...' , None , 'disabled' )
342363 add_menu (self .master , File_menu , 'Save as...' , None , 'disabled' )
0 commit comments