]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/colour.cpp
rtti api mods added
[wxWidgets.git] / src / gtk / colour.cpp
index 4d3b511afab77065d2b0b0c0df1d7e01c669e3d2..3b148e7bd3f3f58b9283f1c08865b739464651b3 100644 (file)
@@ -8,11 +8,15 @@
 /////////////////////////////////////////////////////////////////////////////
 
 
-#ifdef __GNUG__
+#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 <gdk/gdk.h>
@@ -155,12 +159,13 @@ wxColour::wxColour( unsigned char red, unsigned char green, unsigned char blue )
     M_COLDATA->m_color.pixel = 0;
 }
 
+
+
 void wxColour::InitFromName( const wxString &colourName )
 {
-    wxNode *node = (wxNode *) NULL;
-    if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
+    wxColour* col = NULL;
+    if ( (wxTheColourDatabase) && (col = wxTheColourDatabase->FindColourNoAdd(colourName)) )
     {
-        wxColour *col = (wxColour*)node->GetData();
         UnRef();
         if (col) Ref( *col );
     }