[Spambayes-checkins] spambayes/Outlook2000/dialogs dlgcore.py,
1.1.2.6, 1.1.2.7
Mark Hammond
mhammond at users.sourceforge.net
Tue Aug 5 06:06:03 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv27216
Modified Files:
Tag: outlook-dialog-branch
dlgcore.py
Log Message:
Fix dialog centering.
Index: dlgcore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/Attic/dlgcore.py,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** dlgcore.py 5 Aug 2003 08:17:19 -0000 1.1.2.6
--- dlgcore.py 5 Aug 2003 12:06:00 -0000 1.1.2.7
***************
*** 105,111 ****
desktop = win32gui.GetDesktopWindow()
l,t,r,b = win32gui.GetWindowRect(self.hwnd)
dt_l, dt_t, dt_r, dt_b = win32gui.GetWindowRect(desktop)
centre_x, centre_y = win32gui.ClientToScreen( desktop, ( (dt_r-dt_l)/2, (dt_b-dt_t)/2) )
! win32gui.MoveWindow(hwnd, centre_x-(r/2), centre_y-(b/2), r-l, b-t, 0)
def OnCommand(self, hwnd, msg, wparam, lparam):
--- 105,113 ----
desktop = win32gui.GetDesktopWindow()
l,t,r,b = win32gui.GetWindowRect(self.hwnd)
+ w = r-l
+ h = b-t
dt_l, dt_t, dt_r, dt_b = win32gui.GetWindowRect(desktop)
centre_x, centre_y = win32gui.ClientToScreen( desktop, ( (dt_r-dt_l)/2, (dt_b-dt_t)/2) )
! win32gui.MoveWindow(hwnd, centre_x-(w/2), centre_y-(h/2), w, h, 0)
def OnCommand(self, hwnd, msg, wparam, lparam):
More information about the Spambayes-checkins
mailing list