|
From: Andreas R. <and...@us...> - 2003-03-08 21:07:58
|
Update of /cvsroot/squeak/squeak/platforms/win32/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv27246
Modified Files:
sqWin32Window.c
Log Message:
lazy printer setup; fixed startup size
Index: sqWin32Window.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Window.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** sqWin32Window.c 26 May 2002 18:52:10 -0000 1.8
--- sqWin32Window.c 8 Mar 2003 21:07:51 -0000 1.9
***************
*** 125,128 ****
--- 125,129 ----
/* printer settings */
PRINTDLG printValues;
+ static int printerSetup = FALSE;
#endif
***************
*** 493,496 ****
--- 494,498 ----
{
#ifndef NO_PRINTER
+ if(!printerSetup) SetupPrinter();
printValues.Flags = PD_PRINTSETUP;
PrintDlg(&printValues);
***************
*** 513,516 ****
--- 515,519 ----
printValues.Flags = PD_RETURNDEFAULT;
PrintDlg(&printValues);
+ printerSetup = 1;
#endif
}
***************
*** 789,793 ****
void SetWindowSize(void)
! { RECT r;
int width, height, maxWidth, maxHeight, actualWidth, actualHeight;
int deltaWidth, deltaHeight;
--- 792,798 ----
void SetWindowSize(void)
! {
! RECT r;
! RECT workArea;
int width, height, maxWidth, maxHeight, actualWidth, actualHeight;
int deltaWidth, deltaHeight;
***************
*** 811,817 ****
height = (height > 64) ? height : 64;
! /* maximum size is screen size */
! maxWidth = GetSystemMetrics(SM_CXFULLSCREEN);
! maxHeight = GetSystemMetrics(SM_CYFULLSCREEN);
width = ( width <= maxWidth) ? width : maxWidth;
height = (height <= maxHeight) ? height : maxHeight;
--- 816,824 ----
height = (height > 64) ? height : 64;
! /* maximum size is working area */
! SystemParametersInfo( SPI_GETWORKAREA, 0, &workArea, 0);
! maxWidth = workArea.right - workArea.left;
! maxHeight = workArea.bottom - workArea.top;
!
width = ( width <= maxWidth) ? width : maxWidth;
height = (height <= maxHeight) ? height : maxHeight;
***************
*** 834,842 ****
width += deltaWidth;
height += deltaHeight;
! width = (width <= (maxWidth + deltaWidth)) ?
! width : (maxWidth + deltaWidth);
! height = (height <= (maxHeight + deltaHeight)) ?
! height : (maxHeight + deltaHeight);
!
SetWindowPos(stWindow,
NULL,
--- 841,846 ----
width += deltaWidth;
height += deltaHeight;
! width = (width <= maxWidth ) ? width : maxWidth;
! height = (height <= maxHeight ) ? height : maxHeight;
SetWindowPos(stWindow,
NULL,
***************
*** 1807,1810 ****
--- 1811,1815 ----
int scHeight;
+ if(!printerSetup) SetupPrinter();
devNames = GlobalLock(printValues.hDevNames);
if(!devNames)
|