зеркало из https://github.com/mozilla/gecko-dev.git
code cleanup and internal gtk refcounting changes.
This commit is contained in:
Родитель
aae2baf3ab
Коммит
3087f7a8a0
|
@ -16,11 +16,13 @@
|
||||||
* Reserved.
|
* Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
#include "nsDeviceContextSpecG.h"
|
#include "nsDeviceContextSpecG.h"
|
||||||
//#include "prmem.h"
|
//#include "prmem.h"
|
||||||
//#include "plstr.h"
|
//#include "plstr.h"
|
||||||
|
|
||||||
#include "stdlib.h" // getenv() on Solaris/CC
|
// this isn't needed since we arn't useing getenv() anymore in here (pav)
|
||||||
|
//#include "stdlib.h" // getenv() on Solaris/CC
|
||||||
|
|
||||||
/** -------------------------------------------------------
|
/** -------------------------------------------------------
|
||||||
* Construct the nsDeviceContextSpecGTK
|
* Construct the nsDeviceContextSpecGTK
|
||||||
|
@ -55,7 +57,7 @@ NS_IMPL_RELEASE(nsDeviceContextSpecGTK)
|
||||||
*/
|
*/
|
||||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
||||||
{
|
{
|
||||||
char *path;
|
gchar *path;
|
||||||
|
|
||||||
// XXX for now, neutering this per rickg until dcone can play with it
|
// XXX for now, neutering this per rickg until dcone can play with it
|
||||||
|
|
||||||
|
@ -72,13 +74,9 @@ NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
||||||
|
|
||||||
// PWD, HOME, or fail
|
// PWD, HOME, or fail
|
||||||
|
|
||||||
if ( ( path = getenv( "PWD" ) ) == (char *) NULL )
|
path = g_get_home_dir();
|
||||||
if ( ( path = getenv( "HOME" ) ) == (char *) NULL )
|
sprintf(mPrData.path, "%s/netscape.ps", path);
|
||||||
strcpy( mPrData.path, "netscape.ps" );
|
g_free(path);
|
||||||
if ( path != (char *) NULL )
|
|
||||||
sprintf( mPrData.path, "%s/netscape.ps", path );
|
|
||||||
else
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
::UnixPrDialog( &mPrData );
|
::UnixPrDialog( &mPrData );
|
||||||
if ( mPrData.cancel == PR_TRUE )
|
if ( mPrData.cancel == PR_TRUE )
|
||||||
|
|
|
@ -25,8 +25,10 @@
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#undef NOISY_FONTS
|
//#undef NOISY_FONTS
|
||||||
#undef REALLY_NOISY_FONTS
|
//#undef REALLY_NOISY_FONTS
|
||||||
|
#define NOISY_FONTS
|
||||||
|
#define REALLY_NOISY_FONTS
|
||||||
|
|
||||||
static NS_DEFINE_IID(kIFontMetricsIID, NS_IFONT_METRICS_IID);
|
static NS_DEFINE_IID(kIFontMetricsIID, NS_IFONT_METRICS_IID);
|
||||||
|
|
||||||
|
@ -116,8 +118,11 @@ NS_IMETHODIMP nsFontMetricsGTK::Init(const nsFont& aFont, nsIDeviceContext* aCon
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static PRBool firstTime = 1;
|
static PRBool firstTime = 1;
|
||||||
if (firstTime) {
|
if (firstTime) {
|
||||||
if (getenv("GECKO_SCALE_FONTS")) {
|
gchar *gsf = g_getenv("GECKO_SCALE_FONTS");
|
||||||
|
if (gsf)
|
||||||
|
{
|
||||||
allowFontScaling = PR_TRUE;
|
allowFontScaling = PR_TRUE;
|
||||||
|
g_free(gsf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -570,6 +570,7 @@ NS_IMETHODIMP nsRenderingContextGTK::DestroyDrawingSurface(nsDrawingSurface aDS)
|
||||||
|
|
||||||
g_return_val_if_fail ((surface != NULL), NS_ERROR_FAILURE);
|
g_return_val_if_fail ((surface != NULL), NS_ERROR_FAILURE);
|
||||||
g_return_val_if_fail ((surface->drawable != NULL), NS_ERROR_FAILURE);
|
g_return_val_if_fail ((surface->drawable != NULL), NS_ERROR_FAILURE);
|
||||||
|
::gdk_gc_unref (surface->gc);
|
||||||
::gdk_pixmap_unref (surface->drawable);
|
::gdk_pixmap_unref (surface->drawable);
|
||||||
|
|
||||||
delete surface;
|
delete surface;
|
||||||
|
|
|
@ -16,11 +16,13 @@
|
||||||
* Reserved.
|
* Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
#include "nsDeviceContextSpecG.h"
|
#include "nsDeviceContextSpecG.h"
|
||||||
//#include "prmem.h"
|
//#include "prmem.h"
|
||||||
//#include "plstr.h"
|
//#include "plstr.h"
|
||||||
|
|
||||||
#include "stdlib.h" // getenv() on Solaris/CC
|
// this isn't needed since we arn't useing getenv() anymore in here (pav)
|
||||||
|
//#include "stdlib.h" // getenv() on Solaris/CC
|
||||||
|
|
||||||
/** -------------------------------------------------------
|
/** -------------------------------------------------------
|
||||||
* Construct the nsDeviceContextSpecGTK
|
* Construct the nsDeviceContextSpecGTK
|
||||||
|
@ -55,7 +57,7 @@ NS_IMPL_RELEASE(nsDeviceContextSpecGTK)
|
||||||
*/
|
*/
|
||||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
||||||
{
|
{
|
||||||
char *path;
|
gchar *path;
|
||||||
|
|
||||||
// XXX for now, neutering this per rickg until dcone can play with it
|
// XXX for now, neutering this per rickg until dcone can play with it
|
||||||
|
|
||||||
|
@ -72,13 +74,9 @@ NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
||||||
|
|
||||||
// PWD, HOME, or fail
|
// PWD, HOME, or fail
|
||||||
|
|
||||||
if ( ( path = getenv( "PWD" ) ) == (char *) NULL )
|
path = g_get_home_dir();
|
||||||
if ( ( path = getenv( "HOME" ) ) == (char *) NULL )
|
sprintf(mPrData.path, "%s/netscape.ps", path);
|
||||||
strcpy( mPrData.path, "netscape.ps" );
|
g_free(path);
|
||||||
if ( path != (char *) NULL )
|
|
||||||
sprintf( mPrData.path, "%s/netscape.ps", path );
|
|
||||||
else
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
::UnixPrDialog( &mPrData );
|
::UnixPrDialog( &mPrData );
|
||||||
if ( mPrData.cancel == PR_TRUE )
|
if ( mPrData.cancel == PR_TRUE )
|
||||||
|
|
Загрузка…
Ссылка в новой задаче