[Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wapplication.py,1.15,1.16 Wwindows.py,1.15,1.16 PyEdit.py,1.27,1.28
Just van Rossum
jvr@users.sourceforge.net
Mon, 04 Feb 2002 04:50:26 -0800
Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory usw-pr-cvs1:/tmp/cvs-serv1441
Modified Files:
Wapplication.py Wwindows.py PyEdit.py
Log Message:
Added minimal support for floating windows.
Index: Wapplication.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wapplication.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Wapplication.py 2002/01/21 23:00:52 1.15
--- Wapplication.py 2002/02/04 12:50:24 1.16
***************
*** 7,13 ****
import traceback
from types import *
-
from Carbon import Menu; MenuToolbox = Menu; del Menu
KILLUNKNOWNWINDOWS = 0 # Set to 0 for debugging.
--- 7,18 ----
import traceback
from types import *
from Carbon import Menu; MenuToolbox = Menu; del Menu
+ if hasattr(Win, "FrontNonFloatingWindow"):
+ MyFrontWindow = Win.FrontNonFloatingWindow
+ else:
+ MyFrontWindow = Win.FrontWindow
+
+
KILLUNKNOWNWINDOWS = 0 # Set to 0 for debugging.
***************
*** 116,120 ****
def do_frontWindowMethod(self, attr, *args):
! wid = Win.FrontWindow()
if wid and self._windows.has_key(wid):
window = self._windows[wid]
--- 121,125 ----
def do_frontWindowMethod(self, attr, *args):
! wid = MyFrontWindow()
if wid and self._windows.has_key(wid):
window = self._windows[wid]
***************
*** 147,151 ****
ch = self.fkeymaps[keycode]
modifiers = modifiers | FrameWork.cmdKey
! wid = Win.FrontWindow()
if modifiers & FrameWork.cmdKey and not modifiers & FrameWork.shiftKey:
if wid and self._windows.has_key(wid):
--- 152,156 ----
ch = self.fkeymaps[keycode]
modifiers = modifiers | FrameWork.cmdKey
! wid = MyFrontWindow()
if modifiers & FrameWork.cmdKey and not modifiers & FrameWork.shiftKey:
if wid and self._windows.has_key(wid):
***************
*** 176,180 ****
(what, message, when, where, modifiers) = event
self.checkopenwindowsmenu()
! wid = Win.FrontWindow()
if wid and self._windows.has_key(wid):
self.checkmenus(self._windows[wid])
--- 181,185 ----
(what, message, when, where, modifiers) = event
self.checkopenwindowsmenu()
! wid = MyFrontWindow()
if wid and self._windows.has_key(wid):
self.checkmenus(self._windows[wid])
***************
*** 210,214 ****
if self._openwindowscheckmark:
self.openwindowsmenu.menu.CheckMenuItem(self._openwindowscheckmark, 0)
! window = Win.FrontWindow()
if window:
for item, wid in self._openwindows.items():
--- 215,219 ----
if self._openwindowscheckmark:
self.openwindowsmenu.menu.CheckMenuItem(self._openwindowscheckmark, 0)
! window = MyFrontWindow()
if window:
for item, wid in self._openwindows.items():
***************
*** 442,446 ****
def _getmenuhandler(self, callback):
menuhandler = None
! wid = Win.FrontWindow()
if wid and self.bar.parent._windows.has_key(wid):
window = self.bar.parent._windows[wid]
--- 447,451 ----
def _getmenuhandler(self, callback):
menuhandler = None
! wid = MyFrontWindow()
if wid and self.bar.parent._windows.has_key(wid):
window = self.bar.parent._windows[wid]
Index: Wwindows.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wwindows.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Wwindows.py 2002/01/21 23:00:52 1.15
--- Wwindows.py 2002/02/04 12:50:24 1.16
***************
*** 8,12 ****
--- 8,17 ----
from types import InstanceType, StringType
+ if hasattr(Win, "FrontNonFloatingWindow"):
+ MyFrontWindow = Win.FrontNonFloatingWindow
+ else:
+ MyFrontWindow = Win.FrontWindow
+
class Window(FrameWork.Window, Wbase.SelectableWidget):
***************
*** 489,495 ****
def do_key(self, event):
(what, message, when, where, modifiers) = event
! w = Win.FrontWindow()
! if w <> self.wid:
! return
c = chr(message & Events.charCodeMask)
if modifiers & Events.cmdKey:
--- 494,500 ----
def do_key(self, event):
(what, message, when, where, modifiers) = event
! #w = Win.FrontWindow()
! #if w <> self.wid:
! # return
c = chr(message & Events.charCodeMask)
if modifiers & Events.cmdKey:
***************
*** 553,557 ****
import W
app = W.getapplication()
! wid = Win.FrontWindow()
if wid and app._windows.has_key(wid):
window = app._windows[wid]
--- 558,562 ----
import W
app = W.getapplication()
! wid = MyFrontWindow()
if wid and app._windows.has_key(wid):
window = app._windows[wid]
Index: PyEdit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyEdit.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** PyEdit.py 2002/01/21 23:00:52 1.27
--- PyEdit.py 2002/02/04 12:50:24 1.28
***************
*** 18,21 ****
--- 18,27 ----
import re
+ if hasattr(Win, "FrontNonFloatingWindow"):
+ MyFrontWindow = Win.FrontNonFloatingWindow
+ else:
+ MyFrontWindow = Win.FrontWindow
+
+
try:
import Wthreading
***************
*** 1190,1194 ****
def findeditor(topwindow, fromtop = 0):
! wid = Win.FrontWindow()
if not fromtop:
if topwindow.w and wid == topwindow.w.wid:
--- 1196,1200 ----
def findeditor(topwindow, fromtop = 0):
! wid = MyFrontWindow()
if not fromtop:
if topwindow.w and wid == topwindow.w.wid: