]> granicus.if.org Git - python/commitdiff
Handle the apple menu differently under Carbon.
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 15 Mar 2001 14:39:03 +0000 (14:39 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 15 Mar 2001 14:39:03 +0000 (14:39 +0000)
Mac/Lib/FrameWork.py

index 8a2ef17e960fe6b0a78b981bf7303859003720fb..4735fc42e6cb09691611a479b5bad81b99c77ad4 100644 (file)
@@ -676,10 +676,14 @@ class AppleMenu(Menu):
        
        def __init__(self, bar, abouttext="About me...", aboutcallback=None):
                Menu.__init__(self, bar, "\024")
-               self.additem(abouttext, None, aboutcallback)
-               self.addseparator()
                if MacOS.runtimemodel == 'ppc':
+                       self.additem(abouttext, None, aboutcallback)
+                       self.addseparator()
                        self.menu.AppendResMenu('DRVR')
+               else:
+                       # Additem()'s tricks do not work for "apple" menu under Carbon
+                       self.menu.InsertMenuItem(abouttext, 0)
+                       self.items.append((abouttext, None, aboutcallback, None))
        
        def dispatch(self, id, item, window, event):
                if item == 1: