]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/colordlg.cpp
fixed wxMac's wxListCtrl::SetColumnWidth(-1, ...) to really set width for every column
[wxWidgets.git] / src / mac / carbon / colordlg.cpp
index 113aa958a929bfdc27d15abab55b96f8f1a84a64..377276d0c4e42631522d236234ddc9187d722817 100644 (file)
@@ -21,9 +21,6 @@
 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)
 
 #include "wx/mac/private.h"
-#ifndef __DARWIN__
-#include <ColorPicker.h>
-#endif
 
 /*
  * wxColourDialog
@@ -50,9 +47,9 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
 
 int wxColourDialog::ShowModal()
 {
-    RGBColor currentColor = *((RGBColor*)m_colourData.m_dataColour.GetPixel()) ;
-
-#if TARGET_API_MAC_OSX
+    RGBColor currentColor ;
+    
+    m_colourData.m_dataColour.GetRGBColor( currentColor );
     NColorPickerInfo info;
     OSStatus err ;
     memset(&info, 0, sizeof(info)) ;
@@ -68,22 +65,10 @@ int wxColourDialog::ShowModal()
         currentColor.red = info.theColor.color.rgb.red ;
         currentColor.green = info.theColor.color.rgb.green ;
         currentColor.blue = info.theColor.color.rgb.blue ;
-        m_colourData.m_dataColour.FromRGBColor((WXCOLORREF*) &currentColor);
-
-        return wxID_OK;
-    }
-#else
-    RGBColor newColor ;
-    Point where ;
-
-    where.h = where.v = -1;
+        m_colourData.m_dataColour = currentColor;
 
-    if (GetColor( where, "\pSelect a new palette color.", &currentColor, &newColor ))
-    {
-        m_colourData.m_dataColour.Set( (WXCOLORREF*) &newColor ) ;
         return wxID_OK;
     }
-#endif
     return wxID_CANCEL;
 }