]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/colour.cpp
Added declaration for GetViewRect to fix compilo.
[wxWidgets.git] / src / gtk1 / colour.cpp
index c57698a100ec6cb66f9b848f5c97b229aa761c5b..3b148e7bd3f3f58b9283f1c08865b739464651b3 100644 (file)
@@ -8,10 +8,13 @@
 /////////////////////////////////////////////////////////////////////////////
 
 
-#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"
@@ -156,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 );
     }