diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-01-29 13:29:47 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-01-29 13:29:47 (GMT) |
commit | afd0aa680a5233fd70cf7bf71de6e1db3b087562 (patch) | |
tree | eb4dc949ab8238e16a8e9e7d0b43e082c643dc5c /Mac | |
parent | 5a8115c94b02bab70437f9eac53464c56e32bfd2 (diff) | |
download | cpython-afd0aa680a5233fd70cf7bf71de6e1db3b087562.zip cpython-afd0aa680a5233fd70cf7bf71de6e1db3b087562.tar.gz cpython-afd0aa680a5233fd70cf7bf71de6e1db3b087562.tar.bz2 |
Replace {Enable,Disable,Check}Item with their carbon-compatible equivalents {Enable,Disable,Check}MenuItem.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Lib/FrameWork.py | 24 | ||||
-rw-r--r-- | Mac/Tools/IDE/PyConsole.py | 2 | ||||
-rw-r--r-- | Mac/Tools/IDE/Wapplication.py | 8 | ||||
-rw-r--r-- | Mac/Tools/IDE/Wmenus.py | 4 |
4 files changed, 19 insertions, 19 deletions
diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py index 780ee63..75381fc 100644 --- a/Mac/Lib/FrameWork.py +++ b/Mac/Lib/FrameWork.py @@ -478,15 +478,15 @@ class MenuBar: if wid and self.parent._windows.has_key(wid): window = self.parent._windows[wid] if hasattr(window, "domenu_" + callback): - menu.menu.EnableItem(i + 1) + menu.menu.EnableMenuItem(i + 1) elif hasattr(self.parent, "domenu_" + callback): - menu.menu.EnableItem(i + 1) + menu.menu.EnableMenuItem(i + 1) else: - menu.menu.DisableItem(i + 1) + menu.menu.DisableMenuItem(i + 1) elif hasattr(self.parent, "domenu_" + callback): - menu.menu.EnableItem(i + 1) + menu.menu.EnableMenuItem(i + 1) else: - menu.menu.DisableItem(i + 1) + menu.menu.DisableMenuItem(i + 1) elif callback: pass @@ -587,13 +587,13 @@ class Menu: def enable(self, onoff): if onoff: - self.menu.EnableItem(0) + self.menu.EnableMenuItem(0) if self._parent: - self._parent.menu.EnableItem(self._parent_item) + self._parent.menu.EnableMenuItem(self._parent_item) else: - self.menu.DisableItem(0) + self.menu.DisableMenuItem(0) if self._parent: - self._parent.menu.DisableItem(self._parent_item) + self._parent.menu.DisableMenuItem(self._parent_item) if self.bar and self.bar.parent: self.bar.parent.needmenubarredraw = 1 @@ -629,13 +629,13 @@ class MenuItem: del self.item def check(self, onoff): - self.menu.menu.CheckItem(self.item, onoff) + self.menu.menu.CheckMenuItem(self.item, onoff) def enable(self, onoff): if onoff: - self.menu.menu.EnableItem(self.item) + self.menu.menu.EnableMenuItem(self.item) else: - self.menu.menu.DisableItem(self.item) + self.menu.menu.DisableMenuItem(self.item) def settext(self, text): self.menu.menu.SetMenuItemText(self.item, text) diff --git a/Mac/Tools/IDE/PyConsole.py b/Mac/Tools/IDE/PyConsole.py index 0dbea77..5276131 100644 --- a/Mac/Tools/IDE/PyConsole.py +++ b/Mac/Tools/IDE/PyConsole.py @@ -167,7 +167,7 @@ class PyConsole(W.Window): # XXX this functionality should be generally available in Wmenus submenuid = self.namespacemenu.menu.menu.GetItemMark(3) menu = self.namespacemenu.menu.bar.menus[submenuid] - menu.menu.CheckItem(i + 1, 1) + menu.menu.CheckMenuItem(i + 1, 1) def browsenamespace(self): import PyBrowser, W diff --git a/Mac/Tools/IDE/Wapplication.py b/Mac/Tools/IDE/Wapplication.py index 3269d35..ae238a9 100644 --- a/Mac/Tools/IDE/Wapplication.py +++ b/Mac/Tools/IDE/Wapplication.py @@ -200,13 +200,13 @@ class Application(FrameWork.Application): def checkopenwindowsmenu(self): if self._openwindowscheckmark: - self.openwindowsmenu.menu.CheckItem(self._openwindowscheckmark, 0) + self.openwindowsmenu.menu.CheckMenuItem(self._openwindowscheckmark, 0) window = Win.FrontWindow() if window: for item, wid in self._openwindows.items(): if wid == window: #self.pythonwindowsmenuitem.check(1) - self.openwindowsmenu.menu.CheckItem(item, 1) + self.openwindowsmenu.menu.CheckMenuItem(item, 1) self._openwindowscheckmark = item break else: @@ -236,9 +236,9 @@ class Application(FrameWork.Application): def enablemenubar(self, onoff): for m in self.menubar.menus.values(): if onoff: - m.menu.EnableItem(0) + m.menu.EnableMenuItem(0) elif m.menu.GetMenuItemText(3) <> 'Cut': # ew... - m.menu.DisableItem(0) + m.menu.DisableMenuItem(0) MenuToolbox.DrawMenuBar() def makemenubar(self): diff --git a/Mac/Tools/IDE/Wmenus.py b/Mac/Tools/IDE/Wmenus.py index 6cbd41d..49a1a08 100644 --- a/Mac/Tools/IDE/Wmenus.py +++ b/Mac/Tools/IDE/Wmenus.py @@ -101,7 +101,7 @@ class PopupWidget(Wbase.ClickableWidget): l, t, r, b = self._bounds l, t = Qd.LocalToGlobal((l+1, t+1)) Wbase.SetCursor("arrow") - self.menu.menu.EnableItem(0) + self.menu.menu.EnableMenuItem(0) reply = self.menu.menu.PopUpMenuSelect(t, l, 1) if reply: id = (reply & 0xffff0000) >> 16 @@ -190,7 +190,7 @@ class PopupMenu(PopupWidget): l, t, r, b = self._bounds l, t = Qd.LocalToGlobal((l+1, t+1)) Wbase.SetCursor("arrow") - self.menu.menu.EnableItem(0) + self.menu.menu.EnableMenuItem(0) reply = self.menu.menu.PopUpMenuSelect(t, l, 1) if reply: id = (reply & 0xffff0000) >> 16 |