зеркало из 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.
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include "nsDeviceContextSpecG.h"
|
||||
//#include "prmem.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
|
||||
|
@ -55,7 +57,7 @@ NS_IMPL_RELEASE(nsDeviceContextSpecGTK)
|
|||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
||||
{
|
||||
char *path;
|
||||
gchar *path;
|
||||
|
||||
// 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
|
||||
|
||||
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;
|
||||
path = g_get_home_dir();
|
||||
sprintf(mPrData.path, "%s/netscape.ps", path);
|
||||
g_free(path);
|
||||
|
||||
::UnixPrDialog( &mPrData );
|
||||
if ( mPrData.cancel == PR_TRUE )
|
||||
|
|
|
@ -25,8 +25,10 @@
|
|||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#undef NOISY_FONTS
|
||||
#undef REALLY_NOISY_FONTS
|
||||
//#undef NOISY_FONTS
|
||||
//#undef REALLY_NOISY_FONTS
|
||||
#define NOISY_FONTS
|
||||
#define REALLY_NOISY_FONTS
|
||||
|
||||
static NS_DEFINE_IID(kIFontMetricsIID, NS_IFONT_METRICS_IID);
|
||||
|
||||
|
@ -116,8 +118,11 @@ NS_IMETHODIMP nsFontMetricsGTK::Init(const nsFont& aFont, nsIDeviceContext* aCon
|
|||
#ifdef DEBUG
|
||||
static PRBool firstTime = 1;
|
||||
if (firstTime) {
|
||||
if (getenv("GECKO_SCALE_FONTS")) {
|
||||
gchar *gsf = g_getenv("GECKO_SCALE_FONTS");
|
||||
if (gsf)
|
||||
{
|
||||
allowFontScaling = PR_TRUE;
|
||||
g_free(gsf);
|
||||
}
|
||||
}
|
||||
#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->drawable != NULL), NS_ERROR_FAILURE);
|
||||
::gdk_gc_unref (surface->gc);
|
||||
::gdk_pixmap_unref (surface->drawable);
|
||||
|
||||
delete surface;
|
||||
|
|
|
@ -16,11 +16,13 @@
|
|||
* Reserved.
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
#include "nsDeviceContextSpecG.h"
|
||||
//#include "prmem.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
|
||||
|
@ -55,7 +57,7 @@ NS_IMPL_RELEASE(nsDeviceContextSpecGTK)
|
|||
*/
|
||||
NS_IMETHODIMP nsDeviceContextSpecGTK :: Init(PRBool aQuiet)
|
||||
{
|
||||
char *path;
|
||||
gchar *path;
|
||||
|
||||
// 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
|
||||
|
||||
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;
|
||||
path = g_get_home_dir();
|
||||
sprintf(mPrData.path, "%s/netscape.ps", path);
|
||||
g_free(path);
|
||||
|
||||
::UnixPrDialog( &mPrData );
|
||||
if ( mPrData.cancel == PR_TRUE )
|
||||
|
|
Загрузка…
Ссылка в новой задаче