[Python-checkins] CVS: python/dist/src/Mac/Lib FrameWork.py,1.48,1.49

Just van Rossum jvr@users.sourceforge.net
Mon, 04 Feb 2002 04:52:46 -0800


Update of /cvsroot/python/python/dist/src/Mac/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv2080

Modified Files:
	FrameWork.py 
Log Message:
Added minimal support for floating windows.

Index: FrameWork.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Lib/FrameWork.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** FrameWork.py	2002/01/21 23:01:24	1.48
--- FrameWork.py	2002/02/04 12:52:44	1.49
***************
*** 28,31 ****
--- 28,36 ----
  import EasyDialogs
  
+ try:
+ 	MyFrontWindow = FrontNonFloatingWindow
+ except NameError:
+ 	MyFrontWindow = FrontWindow
+ 
  kHighLevelEvent = 23	# Don't know what header file this should come from
  SCROLLBARWIDTH = 16		# Again, not a clue...
***************
*** 349,353 ****
  		else:
  			# See whether the front window wants it
! 			w = FrontWindow()
  			if w and self._windows.has_key(w):
  				window = self._windows[w]
--- 354,358 ----
  		else:
  			# See whether the front window wants it
! 			w = MyFrontWindow()
  			if w and self._windows.has_key(w):
  				window = self._windows[w]
***************
*** 394,398 ****
  	def do_suspendresume(self, event):
  		(what, message, when, where, modifiers) = event
! 		wid = FrontWindow()
  		if wid and self._windows.has_key(wid):
  			window = self._windows[wid]
--- 399,403 ----
  	def do_suspendresume(self, event):
  		(what, message, when, where, modifiers) = event
! 		wid = MyFrontWindow()
  		if wid and self._windows.has_key(wid):
  			window = self._windows[wid]
***************
*** 498,502 ****
  				label, shortcut, callback, kind = menu.items[i]
  				if type(callback) == types.StringType:
! 					wid = Win.FrontWindow()
  					if wid and self.parent._windows.has_key(wid):
  						window = self.parent._windows[wid]
--- 503,507 ----
  				label, shortcut, callback, kind = menu.items[i]
  				if type(callback) == types.StringType:
! 					wid = MyFrontWindow()
  					if wid and self.parent._windows.has_key(wid):
  						window = self.parent._windows[wid]
***************
*** 590,594 ****
  			else: 
  				# callback is string
! 				wid = Win.FrontWindow()
  				if wid and self.bar.parent._windows.has_key(wid):
  					window = self.bar.parent._windows[wid]
--- 595,599 ----
  			else: 
  				# callback is string
! 				wid = MyFrontWindow()
  				if wid and self.bar.parent._windows.has_key(wid):
  					window = self.bar.parent._windows[wid]
***************
*** 635,639 ****
  		item = reply & 0xffff
  		if not window:
! 			wid = Win.FrontWindow()
  			try:
  				window = self.bar.parent._windows[wid]
--- 640,644 ----
  		item = reply & 0xffff
  		if not window:
! 			wid = MyFrontWindow()
  			try:
  				window = self.bar.parent._windows[wid]
***************
*** 798,802 ****
  		# the activate event.
  		#
! 		if FrontWindow() <> window:
  			window.SelectWindow()
  			return
--- 803,807 ----
  		# the activate event.
  		#
! 		if MyFrontWindow() <> window:
  			window.SelectWindow()
  			return
***************
*** 847,851 ****
  
  	def do_inContent(self, partcode, window, event):
! 		if FrontWindow() <> window:
  			window.SelectWindow()
  			return
--- 852,856 ----
  
  	def do_inContent(self, partcode, window, event):
! 		if MyFrontWindow() <> window:
  			window.SelectWindow()
  			return