]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/fontdlgosx.mm
fixing sign conversion warning
[wxWidgets.git] / src / mac / carbon / fontdlgosx.mm
index b3fdb9d80ed997a2e7ebcedcab5f0729fd028a1b..79a4c20fe85d6aa9693be2ec83c0566190461b2e 100644 (file)
@@ -36,6 +36,7 @@
 #import <AppKit/AppKit.h>
 
 #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() ;