From 307fc8d5821e4dcffd7f2975ce62791c5f37982d Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Wed, 19 Jul 2000 08:50:37 +0000 Subject: [PATCH] Casting to GdkColormapPrivate is neither possible nor necessary in gtk+ 1.3.1. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/colour.cpp | 6 ++++++ src/gtk1/colour.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/gtk/colour.cpp b/src/gtk/colour.cpp index 1d004de25f..60e62c4b3a 100644 --- a/src/gtk/colour.cpp +++ b/src/gtk/colour.cpp @@ -15,6 +15,7 @@ #include "wx/gdicmn.h" #include +#include #include //----------------------------------------------------------------------------- @@ -180,9 +181,14 @@ void wxColour::CalcPixel( GdkColormap *cmap ) M_COLDATA->FreeColour(); +#ifdef __WXGTK20__ + if ((cmap->visual->type == GDK_VISUAL_GRAYSCALE) || + (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) +#else GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) +#endif { GdkColor *colors = cmap->colors; int max = 3 * (65536); diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index 1d004de25f..60e62c4b3a 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -15,6 +15,7 @@ #include "wx/gdicmn.h" #include +#include #include //----------------------------------------------------------------------------- @@ -180,9 +181,14 @@ void wxColour::CalcPixel( GdkColormap *cmap ) M_COLDATA->FreeColour(); +#ifdef __WXGTK20__ + if ((cmap->visual->type == GDK_VISUAL_GRAYSCALE) || + (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) +#else GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap; if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) || (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR)) +#endif { GdkColor *colors = cmap->colors; int max = 3 * (65536);