X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/065e208ec09e3d08d51d9604497f92f53c210f93..976f924083419b6a7feb1ff7d597c746a70abf1a:/src/cocoa/app.mm diff --git a/src/cocoa/app.mm b/src/cocoa/app.mm index 2e01d10558..f8f064934f 100644 --- a/src/cocoa/app.mm +++ b/src/cocoa/app.mm @@ -34,6 +34,8 @@ #import #import #import +#import +#import // ======================================================================== // wxPoseAsInitializer @@ -146,6 +148,11 @@ WX_IMPLEMENT_POSER(wxPoserNSApplication); wxTheApp->CocoaDelegate_applicationDidResignActive(); } +- (void)controlTintChanged:(NSNotification *)notification +{ + wxLogDebug("TODO: send EVT_SYS_COLOUR_CHANGED as appropriate"); +} + @end // implementation wxNSApplicationDelegate : NSObject // ======================================================================== @@ -199,6 +206,8 @@ void wxApp::CleanUp() wxMenuBarManager::DestroyInstance(); [m_cocoaApp setDelegate:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:m_cocoaAppDelegate + name:NSControlTintDidChangeNotification object:nil]; [m_cocoaAppDelegate release]; m_cocoaAppDelegate = NULL; @@ -252,11 +261,13 @@ bool wxApp::OnInitGui() m_cocoaApp = [NSApplication sharedApplication]; m_cocoaAppDelegate = [[wxNSApplicationDelegate alloc] init]; [m_cocoaApp setDelegate:m_cocoaAppDelegate]; + [[NSNotificationCenter defaultCenter] addObserver:m_cocoaAppDelegate + selector:@selector(controlTintChanged:) + name:NSControlTintDidChangeNotification object:nil]; wxMenuBarManager::CreateInstance(); wxDC::CocoaInitializeTextSystem(); -// [ m_cocoaApp setDelegate:m_cocoaApp ]; return TRUE; }