summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/FrameWork.py
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2003-01-09 23:18:39 (GMT)
committerJust van Rossum <just@letterror.com>2003-01-09 23:18:39 (GMT)
commitf07518ac22df9e09c59b7ebb0bf82ffe89438726 (patch)
treea125ab8e0184a25f9afbb90e506a90aee634de48 /Lib/plat-mac/FrameWork.py
parentaddc11edf0cad647bfaf2bb17354cd82eff2877b (diff)
downloadcpython-f07518ac22df9e09c59b7ebb0bf82ffe89438726.zip
cpython-f07518ac22df9e09c59b7ebb0bf82ffe89438726.tar.gz
cpython-f07518ac22df9e09c59b7ebb0bf82ffe89438726.tar.bz2
support unicode in menu items
Diffstat (limited to 'Lib/plat-mac/FrameWork.py')
-rw-r--r--Lib/plat-mac/FrameWork.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/plat-mac/FrameWork.py b/Lib/plat-mac/FrameWork.py
index 5ebf9d1..f465d84 100644
--- a/Lib/plat-mac/FrameWork.py
+++ b/Lib/plat-mac/FrameWork.py
@@ -561,7 +561,10 @@ class Menu:
self.menu.AppendMenu('x') # add a dummy string
self.items.append((label, shortcut, callback, kind))
item = len(self.items)
- self.menu.SetMenuItemText(item, label) # set the actual text
+ if isinstance(label, unicode):
+ self.menu.SetMenuItemTextWithCFString(item, label)
+ else:
+ self.menu.SetMenuItemText(item, label)
if shortcut and type(shortcut) == type(()):
modifiers, char = shortcut[:2]
self.menu.SetItemCmd(item, ord(char))