X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..ec2df34e27ba41f202ecbf096cdfed082a9ddb8f:/src/osx/carbon/colordlg.cpp diff --git a/src/osx/carbon/colordlg.cpp b/src/osx/carbon/colordlg.cpp index 377276d0c4..c5a7b1c47f 100644 --- a/src/osx/carbon/colordlg.cpp +++ b/src/osx/carbon/colordlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: colordlg.cpp +// Name: src/osx/carbon/colordlg.cpp // Purpose: wxColourDialog class. NOTE: you can use the generic class // if you wish, instead of implementing this. // Author: Stefan Csomor @@ -12,15 +12,16 @@ #include "wx/wxprec.h" -#include "wx/mac/colordlg.h" +#include "wx/colordlg.h" #include "wx/fontdlg.h" +#include "wx/modalhook.h" #if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -#include "wx/mac/private.h" +#include "wx/osx/private.h" /* * wxColourDialog @@ -47,19 +48,23 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) int wxColourDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + RGBColor currentColor ; - - m_colourData.m_dataColour.GetRGBColor( currentColor ); + + m_colourData.m_dataColour.GetRGBColor( ¤tColor ); NColorPickerInfo info; OSStatus err ; memset(&info, 0, sizeof(info)) ; // TODO : use parent to determine better position and then kAtSpecifiedOrigin - info.placeWhere = kCenterOnMainScreen ; + info.placeWhere = kCenterOnMainScreen ; info.flags = kColorPickerDialogIsMoveable | kColorPickerDialogIsModal ; info.theColor.color.rgb.red = currentColor.red ; info.theColor.color.rgb.green = currentColor.green ; info.theColor.color.rgb.blue = currentColor.blue ; + wxDialog::OSXBeginModalDialog(); err = NPickColor(&info); + wxDialog::OSXEndModalDialog(); if ((err == noErr) && info.newColorChosen) { currentColor.red = info.theColor.color.rgb.red ;