]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/colour.cpp
Added implementations for two cases of wxSystemSettingsNative::GetMetric to
[wxWidgets.git] / src / gtk1 / colour.cpp
index 4d3b511afab77065d2b0b0c0df1d7e01c669e3d2..ce9b00c4c19b839a6d854f581f1b605411b39415 100644 (file)
@@ -13,6 +13,7 @@
 #endif
 
 #include "wx/gdicmn.h"
+#include "wx/colour.h"
 #include "wx/gtk/private.h"
 
 #include <gdk/gdk.h>
@@ -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 );
     }