X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b304314d9b9b479c85d384737667768f0071d36..c9ccc09c64f4c29d4667796bef7b507d9e8d25ed:/src/osx/carbon/colordlgosx.mm diff --git a/src/osx/carbon/colordlgosx.mm b/src/osx/carbon/colordlgosx.mm index df8e2263a6..1fdc0bee31 100644 --- a/src/osx/carbon/colordlgosx.mm +++ b/src/osx/carbon/colordlgosx.mm @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/osx/carbon/colordlg.mm +// Name: src/osx/carbon/colordlgosx.mm // Purpose: wxColourDialog class. NOTE: you can use the generic class // if you wish, instead of implementing this. // Author: Ryan Norton @@ -20,7 +20,7 @@ #include "wx/wxprec.h" -#include "wx/osx/colordlg.h" +#include "wx/colordlg.h" #include "wx/fontdlg.h" // ============================================================================ @@ -32,21 +32,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -// Cocoa headers -#include "wx/cocoa/autorelease.h" -#include "wx/cocoa/string.h" +#include "wx/osx/private.h" -#import -#import -#import -#import -#import +#import +#import // --------------------------------------------------------------------------- // wxCPWCDelegate - Window Closed delegate // --------------------------------------------------------------------------- -@interface wxCPWCDelegate : NSObject +@interface wxCPWCDelegate : NSObject wxOSX_10_6_AND_LATER() { bool m_bIsClosed; } @@ -146,6 +141,7 @@ int wxColourDialog::ShowModal() // // Start the color panel modal loop // + wxDialog::OSXBeginModalDialog(); NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel]; for (;;) { @@ -156,6 +152,7 @@ int wxColourDialog::ShowModal() break; } [NSApp endModalSession:session]; + wxDialog::OSXEndModalDialog(); //free up the memory for the delegates - we don't need them anymore [theColorPanel setDelegate:nil];