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:
@@ -106,18 +106,6 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
|
|||||||
if (data)
|
if (data)
|
||||||
m_colourData = *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
|
//autorelease pool - req'd for carbon
|
||||||
NSAutoreleasePool *thePool;
|
NSAutoreleasePool *thePool;
|
||||||
thePool = [[NSAutoreleasePool alloc] init];
|
thePool = [[NSAutoreleasePool alloc] init];
|
||||||
@@ -135,7 +123,7 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
|
|||||||
//We're done - free up the pool
|
//We're done - free up the pool
|
||||||
[thePool release];
|
[thePool release];
|
||||||
|
|
||||||
return bOK;
|
return true;
|
||||||
}
|
}
|
||||||
int wxColourDialog::ShowModal()
|
int wxColourDialog::ShowModal()
|
||||||
{
|
{
|
||||||
@@ -170,6 +158,7 @@ int wxColourDialog::ShowModal()
|
|||||||
[NSApp endModalSession:session];
|
[NSApp endModalSession:session];
|
||||||
|
|
||||||
//free up the memory for the delegates - we don't need them anymore
|
//free up the memory for the delegates - we don't need them anymore
|
||||||
|
[theColorPanel setDelegate:nil];
|
||||||
[theCPDelegate release];
|
[theCPDelegate release];
|
||||||
|
|
||||||
//Get the shared color panel along with the chosen color and set the chosen color
|
//Get the shared color panel along with the chosen color and set the chosen color
|
||||||
|
Reference in New Issue
Block a user