mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Handle the apple menu differently under Carbon.
This commit is contained in:
parent
abd703d0ce
commit
6b498de165
1 changed files with 6 additions and 2 deletions
|
@ -676,10 +676,14 @@ class AppleMenu(Menu):
|
||||||
|
|
||||||
def __init__(self, bar, abouttext="About me...", aboutcallback=None):
|
def __init__(self, bar, abouttext="About me...", aboutcallback=None):
|
||||||
Menu.__init__(self, bar, "\024")
|
Menu.__init__(self, bar, "\024")
|
||||||
self.additem(abouttext, None, aboutcallback)
|
|
||||||
self.addseparator()
|
|
||||||
if MacOS.runtimemodel == 'ppc':
|
if MacOS.runtimemodel == 'ppc':
|
||||||
|
self.additem(abouttext, None, aboutcallback)
|
||||||
|
self.addseparator()
|
||||||
self.menu.AppendResMenu('DRVR')
|
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):
|
def dispatch(self, id, item, window, event):
|
||||||
if item == 1:
|
if item == 1:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue