]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/fontdlgosx.mm
Performance optimization
[wxWidgets.git] / src / mac / carbon / fontdlgosx.mm
index fe90214386947d784a1db4db81e971da2a74772c..27f4892485a72da50b032fa3b1dcff9e7d1c46fb 100644 (file)
@@ -24,9 +24,9 @@
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/cmndata.h"
 #endif
 
-#include "wx/cmndata.h"
 #include "wx/fontutil.h"
 
 // ============================================================================
 {
     [super initWithFrame:rectBox];
 
-    wxMacCFStringHolder cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() );
-    wxMacCFStringHolder cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() );
+    wxCFStringRef cfOkString( wxT("OK"), wxLocale::GetSystemEncoding() );
+    wxCFStringRef cfCancelString( wxT("Cancel"), wxLocale::GetSystemEncoding() );
 
     NSRect rectCancel = NSMakeRect( 10.0 , 10.0 , 82  , 24 );
     NSRect rectOK = NSMakeRect( 100.0 , 10.0 , 82  , 24 );
 
     NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel];
-    [cancelButton setTitle:(NSString*)cfCancelString.Detach()];
+    [cancelButton setTitle:(NSString*)wxCFRetain((CFStringRef)cfCancelString)];
     [cancelButton setBezelStyle:NSRoundedBezelStyle];
     [cancelButton setButtonType:NSMomentaryPushInButton];
     [cancelButton setAction:@selector(cancelPressed:)];
@@ -80,7 +80,7 @@
     m_cancelButton = cancelButton ;
 
     NSButton* okButton = [[NSButton alloc] initWithFrame:rectOK];
-    [okButton setTitle:(NSString*)cfOkString.Detach()];
+    [okButton setTitle:(NSString*)wxCFRetain((CFStringRef)cfOkString)];
     [okButton setBezelStyle:NSRoundedBezelStyle];
     [okButton setButtonType:NSMomentaryPushInButton];
     [okButton setAction:@selector(okPressed:)];
 
 - (IBAction)cancelPressed:(id)sender
 {
+    wxUnusedVar(sender);
     m_shouldClose = YES ;
     [NSApp stopModal];
 }
 
 - (IBAction)okPressed:(id)sender
 {
+    wxUnusedVar(sender);
     m_okPressed = YES ;
     m_shouldClose = YES ;
     [NSApp stopModal];
 
 extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ;
 
-int RunMixedFontDialog(wxFontDialog* dialog)
+int RunMixedFontDialog(wxFontDialog* WXUNUSED(dialog))
 {
     int retval = wxID_CANCEL ;