Call GTK print dialog. Currently, Init routine returns FAILURE, effectively

stubbing out this functionality. Done Cone will turn it on at a later time.

Gtk+ print menu crashes will temporarily disappear because of this change.
This commit is contained in:
syd%netscape.com 1999-03-13 03:21:16 +00:00
Родитель e422b28ff0
Коммит d9451d58d2
2 изменённых файлов: 66 добавлений и 6 удалений

Просмотреть файл

@ -21,7 +21,7 @@
//#include "plstr.h"
/** -------------------------------------------------------
* Construct the nsDeviceContextSpecMac
* Construct the nsDeviceContextSpecGTK
* @update dc 12/02/98
*/
nsDeviceContextSpecGTK :: nsDeviceContextSpecGTK()
@ -31,7 +31,7 @@ nsDeviceContextSpecGTK :: nsDeviceContextSpecGTK()
}
/** -------------------------------------------------------
* Destroy the nsDeviceContextSpecMac
* Destroy the nsDeviceContextSpecGTK
* @update dc 2/15/98
*/
nsDeviceContextSpecGTK :: ~nsDeviceContextSpecGTK()
@ -49,10 +49,40 @@ NS_IMPL_RELEASE(nsDeviceContextSpecGTK)
/** -------------------------------------------------------
* Initialize the nsDeviceContextSpecGTK
* @update dc 2/15/98
* @update syd 3/2/99
*/
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
{
return NS_OK;
char *path;
// XXX for now, neutering this per rickg until dcone can play with it
return NS_ERROR_FAILURE;
// XXX these settings should eventually come out of preferences
mPrData.toPrinter = PR_TRUE;
mPrData.fpf = PR_TRUE;
mPrData.grayscale = PR_FALSE;
mPrData.size = SizeLetter;
mPrData.stream = (FILE *) NULL;
sprintf( mPrData.command, "lpr" );
// PWD, HOME, or fail
if ( ( path = getenv( "PWD" ) ) == (char *) NULL )
if ( ( path = getenv( "HOME" ) ) == (char *) NULL )
strcpy( mPrData.path, "netscape.ps" );
if ( path != (char *) NULL )
sprintf( mPrData.path, "%s/netscape.ps", path );
else
return NS_ERROR_FAILURE;
::UnixPrDialog( &mPrData );
if ( mPrData.cancel == PR_TRUE )
return NS_ERROR_FAILURE;
else
return NS_OK;
}
/** -------------------------------------------------------

Просмотреть файл

@ -21,7 +21,7 @@
//#include "plstr.h"
/** -------------------------------------------------------
* Construct the nsDeviceContextSpecMac
* Construct the nsDeviceContextSpecGTK
* @update dc 12/02/98
*/
nsDeviceContextSpecGTK :: nsDeviceContextSpecGTK()
@ -31,7 +31,7 @@ nsDeviceContextSpecGTK :: nsDeviceContextSpecGTK()
}
/** -------------------------------------------------------
* Destroy the nsDeviceContextSpecMac
* Destroy the nsDeviceContextSpecGTK
* @update dc 2/15/98
*/
nsDeviceContextSpecGTK :: ~nsDeviceContextSpecGTK()
@ -49,10 +49,40 @@ NS_IMPL_RELEASE(nsDeviceContextSpecGTK)
/** -------------------------------------------------------
* Initialize the nsDeviceContextSpecGTK
* @update dc 2/15/98
* @update syd 3/2/99
*/
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
{
return NS_OK;
char *path;
// XXX for now, neutering this per rickg until dcone can play with it
return NS_ERROR_FAILURE;
// XXX these settings should eventually come out of preferences
mPrData.toPrinter = PR_TRUE;
mPrData.fpf = PR_TRUE;
mPrData.grayscale = PR_FALSE;
mPrData.size = SizeLetter;
mPrData.stream = (FILE *) NULL;
sprintf( mPrData.command, "lpr" );
// PWD, HOME, or fail
if ( ( path = getenv( "PWD" ) ) == (char *) NULL )
if ( ( path = getenv( "HOME" ) ) == (char *) NULL )
strcpy( mPrData.path, "netscape.ps" );
if ( path != (char *) NULL )
sprintf( mPrData.path, "%s/netscape.ps", path );
else
return NS_ERROR_FAILURE;
::UnixPrDialog( &mPrData );
if ( mPrData.cancel == PR_TRUE )
return NS_ERROR_FAILURE;
else
return NS_OK;
}
/** -------------------------------------------------------