X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/509b4eccfeb7e13a30d3192c4cb1a42b2aed3f70..027d45e8fc3cbb7a1efa91c727bcee6c52c4519c:/src/mac/carbon/fontdlgosx.mm diff --git a/src/mac/carbon/fontdlgosx.mm b/src/mac/carbon/fontdlgosx.mm index b3fdb9d80e..79a4c20fe8 100644 --- a/src/mac/carbon/fontdlgosx.mm +++ b/src/mac/carbon/fontdlgosx.mm @@ -36,6 +36,7 @@ #import #include "wx/mac/uma.h" +#include "wx/intl.h" @interface wxMacFontPanelAccView : NSView { @@ -63,7 +64,6 @@ NSRect rectCancel = NSMakeRect( 10.0 , 10.0 , 82 , 24 ); NSRect rectOK = NSMakeRect( 100.0 , 10.0 , 82 , 24 ); - NSView* panel = [[NSView alloc] initWithFrame:rectBox]; NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel]; [cancelButton setTitle:(NSString*)cfCancelString.Detach()]; @@ -147,6 +147,7 @@ int RunMixedFontDialog(wxFontDialog* dialog) SetWindowGroup(carbonWindowRef , GetWindowGroupOfClass(kMovableModalWindowClass)); [fontPanel setFloatingPanel:NO] ; + [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ; wxMacFontPanelAccView* accessoryView = (wxMacFontPanelAccView*) [fontPanel accessoryView] ; if ( accessoryView == nil) @@ -166,6 +167,8 @@ int RunMixedFontDialog(wxFontDialog* dialog) [NSApp endModalSession:session]; + // if we don't reenable it, FPShowHideFontPanel does not work + [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ; if( FPIsFontPanelVisible()) FPShowHideFontPanel() ;