backporting r61285

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@61286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-07-02 14:55:29 +00:00
parent fe3a9829b5
commit ad6f478768

View File

@@ -106,18 +106,6 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
if (data)
m_colourData = *data;
//
// This is the key call - this initializes
// events and window stuff for cocoa for carbon
// applications.
//
// This is also the only call here that is
// 10.2+ specific (the rest is OSX only),
// which, ironically, the carbon font
// panel requires.
//
bool bOK = NSApplicationLoad();
//autorelease pool - req'd for carbon
NSAutoreleasePool *thePool;
thePool = [[NSAutoreleasePool alloc] init];
@@ -135,7 +123,7 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
//We're done - free up the pool
[thePool release];
return bOK;
return true;
}
int wxColourDialog::ShowModal()
{
@@ -170,6 +158,7 @@ int wxColourDialog::ShowModal()
[NSApp endModalSession:session];
//free up the memory for the delegates - we don't need them anymore
[theColorPanel setDelegate:nil];
[theCPDelegate release];
//Get the shared color panel along with the chosen color and set the chosen color