[pywin32-checkins] pywin32/Pythonwin/pywin/docking DockingBar.py, 1.6, 1.7
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-10-02 13:04:15
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/docking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18401/Pythonwin/pywin/docking Modified Files: DockingBar.py Log Message: More py3k compatible syntax modernizations merged from py3k branch. Index: DockingBar.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/docking/DockingBar.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DockingBar.py 26 Feb 2008 13:11:32 -0000 1.6 --- DockingBar.py 2 Oct 2008 13:03:55 -0000 1.7 *************** *** 17,26 **** width = rect[2]-rect[0] height = rect[3]-rect[1] ! return rect[0] + width/2, rect[1] + height/2 ! def OffsetRect(rect, (x, y) ): return rect[0]+x, rect[1]+y, rect[2]+x, rect[3]+y ! def DeflateRect(rect, (x,y) ): return rect[0]+x, rect[1]+y, rect[2]-x, rect[3]-y --- 17,28 ---- width = rect[2]-rect[0] height = rect[3]-rect[1] ! return rect[0] + width//2, rect[1] + height//2 ! def OffsetRect(rect, point): ! (x, y) = point return rect[0]+x, rect[1]+y, rect[2]+x, rect[3]+y ! def DeflateRect(rect, point): ! (x, y) = point return rect[0]+x, rect[1]+y, rect[2]-x, rect[3]-y *************** *** 70,74 **** # Create the child dialog ! self.dialog = apply(childCreator, (self,) + childCreatorArgs) # use the dialog dimensions as default base dimensions --- 72,76 ---- # Create the child dialog ! self.dialog = childCreator(*(self,) + childCreatorArgs) # use the dialog dimensions as default base dimensions *************** *** 292,296 **** # def OnBarStyleChange(self, old, new): ! def OnNcCalcSize(self, bCalcValid, (rc0, rc1, rc2, pos)): self.rectBorder = self.GetWindowRect() self.rectBorder = OffsetRect( self.rectBorder, (-self.rectBorder[0], -self.rectBorder[1]) ) --- 294,299 ---- # def OnBarStyleChange(self, old, new): ! def OnNcCalcSize(self, bCalcValid, size_info): ! (rc0, rc1, rc2, pos) = size_info self.rectBorder = self.GetWindowRect() self.rectBorder = OffsetRect( self.rectBorder, (-self.rectBorder[0], -self.rectBorder[1]) ) |