[Python-checkins] python/dist/src/Mac/Tools/IDE Wbase.py,1.12,1.13

jvr@users.sourceforge.net jvr@users.sourceforge.net
2003年5月25日 13:44:43 -0700


Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory sc8-pr-cvs1:/tmp/cvs-serv6625
Modified Files:
	Wbase.py 
Log Message:
fixed some DeprecationWarnings
Index: Wbase.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wbase.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Wbase.py	5 Feb 2003 15:40:04 -0000	1.12
--- Wbase.py	25 May 2003 20:44:37 -0000	1.13
***************
*** 9,12 ****
--- 9,16 ----
 
 
+ def _intRect((l, t, r, b)):
+ 	return (int(l), int(t), int(r), int(b))
+ 
+ 
 class Widget:
 	
***************
*** 116,120 ****
 			width = pr - pl
 			height = pb - pt
! 			self._bounds = Qd.OffsetRect(self._possize(width, height), pl, pt)
 		else:
 			# _possize must be a 4-tuple. This is where the algorithm by Peter Kriens and
--- 120,124 ----
 			width = pr - pl
 			height = pb - pt
! 			self._bounds = Qd.OffsetRect(_intRect(self._possize(width, height)), pl, pt)
 		else:
 			# _possize must be a 4-tuple. This is where the algorithm by Peter Kriens and
***************
*** 572,576 ****
 		Qd.PenMode(QuickDraw.srcXor)
 		Qd.PenPat(Qd.GetQDGlobalsGray())
! 		Qd.PaintRect(rect)
 		lastpos = None
 		while Evt.Button():
--- 576,580 ----
 		Qd.PenMode(QuickDraw.srcXor)
 		Qd.PenPat(Qd.GetQDGlobalsGray())
! 		Qd.PaintRect(_intRect(rect))
 		lastpos = None
 		while Evt.Button():
***************
*** 581,585 ****
 				continue
 			Qd.PenPat(Qd.GetQDGlobalsGray())
! 			Qd.PaintRect(rect)
 			if self._direction:
 				rect = l, pos - 1, r, pos
--- 585,589 ----
 				continue
 			Qd.PenPat(Qd.GetQDGlobalsGray())
! 			Qd.PaintRect(_intRect(rect))
 			if self._direction:
 				rect = l, pos - 1, r, pos
***************
*** 587,595 ****
 				rect = pos - 1, t, pos, b
 			Qd.PenPat(Qd.GetQDGlobalsGray())
! 			Qd.PaintRect(rect)
 			lastpos = pos
 			self._parentwindow.wid.GetWindowPort().QDFlushPortBuffer(None)
 			Evt.WaitNextEvent(0, 3)
! 		Qd.PaintRect(rect)
 		Qd.PenNormal()
 		SetCursor("watch")
--- 591,599 ----
 				rect = pos - 1, t, pos, b
 			Qd.PenPat(Qd.GetQDGlobalsGray())
! 			Qd.PaintRect(_intRect(rect))
 			lastpos = pos
 			self._parentwindow.wid.GetWindowPort().QDFlushPortBuffer(None)
 			Evt.WaitNextEvent(0, 3)
! 		Qd.PaintRect(_intRect(rect))
 		Qd.PenNormal()
 		SetCursor("watch")

AltStyle によって変換されたページ (->オリジナル) /