]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/colour.cpp
centralized the handling of border styles; added borders support for wxListBox and...
[wxWidgets.git] / src / gtk1 / colour.cpp
index ebb55bb7b01f4fbea09cc3cd74f146773699d6f9..c84141bd0a3aa766ac48b5362759d1300de8a74c 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        colour.cpp
+// Name:        src/gtk1/colour.cpp
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
@@ -7,17 +7,12 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "colour.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/gdicmn.h"
 #include "wx/colour.h"
-#include "wx/gtk/private.h"
+#include "wx/gdicmn.h"
+#include "wx/gtk1/private.h"
 
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
@@ -97,20 +92,15 @@ void wxColourRefData::FreeColour()
 {
     if (m_colormap)
     {
-#ifdef __WXGTK20__
-        if ((m_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
-            (m_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
-#else
         GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) m_colormap;
         if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
             (private_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
-#endif
         {
             int idx = m_color.pixel;
             colMapAllocCounter[ idx ] = colMapAllocCounter[ idx ] - 1;
 
             if (colMapAllocCounter[ idx ] == 0)
-            gdk_colormap_free_colors( m_colormap, &m_color, 1 );
+                gdk_colormap_free_colors( m_colormap, &m_color, 1 );
         }
     }
 }
@@ -122,14 +112,9 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
 
     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
     {
         m_hasPixel = gdk_colormap_alloc_color( cmap, &m_color, FALSE, TRUE );
         int idx = m_color.pixel;
@@ -284,5 +269,3 @@ GdkColor *wxColour::GetColor() const
 
     return &M_COLDATA->m_color;
 }
-
-