X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1d4dd7add411ebff1ce4a8d1d992e0e43ee26b1..1978421a6d8b81c1f8a961da4b8ddf544fec7b1b:/src/gtk/colour.cpp diff --git a/src/gtk/colour.cpp b/src/gtk/colour.cpp index 4d3b511afa..3b148e7bd3 100644 --- a/src/gtk/colour.cpp +++ b/src/gtk/colour.cpp @@ -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 @@ -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 ); }