From 1a0ca6e4ea9b54a8c954900b3d827048d90bea7c Mon Sep 17 00:00:00 2001 From: "bryner%uiuc.edu" Date: Wed, 7 Mar 2001 01:31:15 +0000 Subject: [PATCH] Fixing build on gtk+ >= 1.2.7. r=pavlov, sr=blizzard. --- gfx/src/gtk/nsRenderingContextGTK.cpp | 6 ++---- gfx/src/gtk/nsRenderingContextGTK.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gfx/src/gtk/nsRenderingContextGTK.cpp b/gfx/src/gtk/nsRenderingContextGTK.cpp index 2e73d8b4d77f..1ba8b55823ec 100644 --- a/gfx/src/gtk/nsRenderingContextGTK.cpp +++ b/gfx/src/gtk/nsRenderingContextGTK.cpp @@ -686,8 +686,7 @@ NS_IMETHODIMP nsRenderingContextGTK::SetLineStyle(nsLineStyle aLineStyle) case nsLineStyle_kDashed: { mLineStyle = GDK_LINE_ON_OFF_DASH; - static char dashed[2] = {4,4}; - mDashList = dashed; + mDashList[0] = mDashList[1] = 4; mDashes = 2; /* ::gdk_gc_set_dashes(mSurface->GetGC(), @@ -698,9 +697,8 @@ NS_IMETHODIMP nsRenderingContextGTK::SetLineStyle(nsLineStyle aLineStyle) case nsLineStyle_kDotted: { + mDashList[0] = mDashList[1] = 1; mLineStyle = GDK_LINE_ON_OFF_DASH; - static char dotted[2] = {1,1}; - mDashList = dotted; mDashes = 2; /* ::gdk_gc_set_dashes(mSurface->GetGC(), diff --git a/gfx/src/gtk/nsRenderingContextGTK.h b/gfx/src/gtk/nsRenderingContextGTK.h index 993ee455821a..d44f22b55dae 100644 --- a/gfx/src/gtk/nsRenderingContextGTK.h +++ b/gfx/src/gtk/nsRenderingContextGTK.h @@ -242,7 +242,7 @@ private: GdkGC *mGC; GdkFunction mFunction; GdkLineStyle mLineStyle; - gchar *mDashList; + gint8 mDashList[2]; gint mDashes; nscolor mCurrentColor; nsFontGTK *mCurrentFont;