From: Kevin A. <ka...@us...> - 2004-09-14 23:37:28
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26870 Modified Files: menu.py Log Message: fixed getMenuId handling of & and Mac Quit menu item Index: menu.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/menu.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** menu.py 10 May 2004 17:24:22 -0000 1.38 --- menu.py 14 Sep 2004 23:37:19 -0000 1.39 *************** *** 361,365 **** id = -1 for m in self.menus: ! menuLabel = m.label.strip('&') if m.name == aString: id = self.FindMenu(menuLabel) --- 361,365 ---- id = -1 for m in self.menus: ! menuLabel = m.label.replace('&', '') if m.name == aString: id = self.FindMenu(menuLabel) *************** *** 367,371 **** for mi in m.items: if mi.name == aString: ! menuItemLabel = mi.label.split('\t')[0].strip('&') id = self.FindMenuItem(menuLabel, menuItemLabel) break --- 367,377 ---- for mi in m.items: if mi.name == aString: ! menuItemLabel = mi.label.split('\t')[0].replace('&', '') ! if menuItemLabel == 'Exit' and wx.Platform == '__WXMAC__': ! # KEA 2004-09-14 ! # I think this is the only label WXMAC changes ! # but I wonder if this won't work for other languages?! ! # maybe the Quit menu item would always have the same id? ! menuItemLabel = 'Quit' id = self.FindMenuItem(menuLabel, menuItemLabel) break |