]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/colrdlgg.cpp
wxParseWildcard added instead of methods hidden under wxUSE_FILEDLG and wxUSE_DIRDLG.
[wxWidgets.git] / src / generic / colrdlgg.cpp
index b7a103df6d591c674eeace63ee7da53c5065ccb7..83cae5f72b9bba0a4a53ca32b28cf2b678a61c9f 100644 (file)
@@ -20,7 +20,7 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_COLOURDLG
+#if wxUSE_COLOURDLG && !defined(__WXGTK20__)
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
@@ -312,7 +312,11 @@ void wxGenericColourDialog::InitializeColours(void)
 
     for (i = 0; i < WXSIZEOF(customColours); i++)
     {
-        customColours[i] = colourData.GetCustomColour(i);
+        wxColour c = colourData.GetCustomColour(i);
+        if (c.Ok())
+            customColours[i] = colourData.GetCustomColour(i);
+        else
+            customColours[i] = wxColour(255, 255, 255);
     }
 
     wxColour curr = colourData.GetColour();
@@ -564,5 +568,5 @@ void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event))
   PaintCustomColour(dc);
 }
 
-#endif // wxUSE_COLOURDLG
+#endif // wxUSE_COLOURDLG && !defined(__WXGTK20__)