Changeset 391 for python/trunk/Lib/plat-mac/FrameWork.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/plat-mac/FrameWork.py
r2 r391 220 220 return 221 221 (what, message, when, where, modifiers) = event 222 if eventname.has_key(what):222 if what in eventname: 223 223 name = "do_" + eventname[what] 224 224 else: … … 251 251 if gotone: 252 252 window = dlg.GetDialogWindow() 253 if self._windows.has_key(window):253 if window in self._windows: 254 254 self._windows[window].do_itemhit(item, event) 255 255 else: … … 265 265 # Find the correct name. 266 266 # 267 if part name.has_key(partcode):267 if partcode in partname: 268 268 name = "do_" + partname[partcode] 269 269 else: … … 280 280 MacOS.HandleEvent(event) 281 281 return 282 elif self._windows.has_key(wid):282 elif wid in self._windows: 283 283 # It is a window. Hand off to correct window. 284 284 window = self._windows[wid] … … 367 367 # See whether the front window wants it 368 368 w = MyFrontWindow() 369 if w and self._windows.has_key(w):369 if w and w in self._windows: 370 370 window = self._windows[w] 371 371 try: … … 382 382 (what, message, when, where, modifiers) = event 383 383 wid = WhichWindow(message) 384 if wid and self._windows.has_key(wid):384 if wid and wid in self._windows: 385 385 window = self._windows[wid] 386 386 window.do_rawupdate(wid, event) … … 392 392 (what, message, when, where, modifiers) = event 393 393 wid = WhichWindow(message) 394 if wid and self._windows.has_key(wid):394 if wid and wid in self._windows: 395 395 window = self._windows[wid] 396 396 window.do_activate(modifiers & 1, event) … … 412 412 (what, message, when, where, modifiers) = event 413 413 wid = MyFrontWindow() 414 if wid and self._windows.has_key(wid):414 if wid and wid in self._windows: 415 415 window = self._windows[wid] 416 416 window.do_activate(message & 1, event) … … 436 436 (what, message, when, where, modifiers) = event 437 437 nicewhat = repr(what) 438 if eventname.has_key(what):438 if what in eventname: 439 439 nicewhat = eventname[what] 440 440 print nicewhat, … … 516 516 if type(callback) == types.StringType: 517 517 wid = MyFrontWindow() 518 if wid and self.parent._windows.has_key(wid):518 if wid and wid in self.parent._windows: 519 519 window = self.parent._windows[wid] 520 520 if hasattr(window, "domenu_" + callback): … … 532 532 533 533 def dispatch(self, id, item, window, event): 534 if self.menus.has_key(id):534 if id in self.menus: 535 535 self.menus[id].dispatch(id, item, window, event) 536 536 else: … … 606 606 title, shortcut, callback, mtype = self.items[item-1] 607 607 if callback: 608 if not self.bar.parent or type(callback) <>types.StringType:608 if not self.bar.parent or type(callback) != types.StringType: 609 609 menuhandler = callback 610 610 else: 611 611 # callback is string 612 612 wid = MyFrontWindow() 613 if wid and self.bar.parent._windows.has_key(wid):613 if wid and wid in self.bar.parent._windows: 614 614 window = self.bar.parent._windows[wid] 615 615 if hasattr(window, "domenu_" + callback): … … 752 752 753 753 def open(self, bounds=(40, 40, 400, 400), resid=None): 754 if resid <>None:754 if resid != None: 755 755 self.wid = GetNewWindow(resid, -1) 756 756 else: … … 830 830 # the activate event. 831 831 # 832 if MyFrontWindow() <>window:832 if MyFrontWindow() != window: 833 833 window.SelectWindow() 834 834 return … … 879 879 880 880 def do_inContent(self, partcode, window, event): 881 if MyFrontWindow() <>window:881 if MyFrontWindow() != window: 882 882 window.SelectWindow() 883 883 return
Note:
See TracChangeset
for help on using the changeset viewer.