X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1d4dd7add411ebff1ce4a8d1d992e0e43ee26b1..68a2e005a51a87df6cc445345f27443e57ab3608:/src/gtk1/colour.cpp?ds=sidebyside diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index 4d3b511afa..ce9b00c4c1 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -13,6 +13,7 @@ #endif #include "wx/gdicmn.h" +#include "wx/colour.h" #include "wx/gtk/private.h" #include @@ -155,12 +156,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 ); }