X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f0c8f31f407ecfce909060464c0ea655221cdab..8ceeb6c2e004e9fd9ad79d81c074147f831988be:/src/osx/carbon/fontdlgosx.mm diff --git a/src/osx/carbon/fontdlgosx.mm b/src/osx/carbon/fontdlgosx.mm index b0f144ca59..0fa7163333 100644 --- a/src/osx/carbon/fontdlgosx.mm +++ b/src/osx/carbon/fontdlgosx.mm @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/fontdlgosx.cpp +// Name: src/osx/carbon/fontdlgosx.cpp // Purpose: wxFontDialog class. // Author: Ryan Norton // Modified by: @@ -37,12 +37,12 @@ #include "wx/cocoa/autorelease.h" #include "wx/cocoa/string.h" -#if wxMAC_USE_EXPERIMENTAL_FONTDIALOG +#if wxOSX_USE_EXPERIMENTAL_FONTDIALOG #import #import -#include "wx/osx/uma.h" +#include "wx/osx/private.h" @interface wxMacFontPanelAccView : NSView { @@ -68,8 +68,8 @@ 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 ); + NSRect rectCancel = NSMakeRect( (CGFloat) 10.0 , (CGFloat)10.0 , (CGFloat)82 , (CGFloat)24 ); + NSRect rectOK = NSMakeRect( (CGFloat)100.0 , (CGFloat)10.0 , (CGFloat)82 , (CGFloat)24 ); NSButton* cancelButton = [[NSButton alloc] initWithFrame:rectCancel]; [cancelButton setTitle:(NSString*)wxCFRetain((CFStringRef)cfCancelString)]; @@ -152,9 +152,11 @@ int RunMixedFontDialog(wxFontDialog* WXUNUSED(dialog)) NSFontPanel* fontPanel = [NSFontPanel sharedFontPanel] ; // adjust modality for carbon environment +#if wxOSX_USE_CARBON WindowRef carbonWindowRef = (WindowRef)[fontPanel windowRef] ; SetWindowModality(carbonWindowRef, kWindowModalityAppModal , 0) ; SetWindowGroup(carbonWindowRef , GetWindowGroupOfClass(kMovableModalWindowClass)); +#endif [fontPanel setFloatingPanel:NO] ; [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ; @@ -179,8 +181,10 @@ int RunMixedFontDialog(wxFontDialog* WXUNUSED(dialog)) // if we don't reenable it, FPShowHideFontPanel does not work [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ; +#if wxOSX_USE_CARBON if( FPIsFontPanelVisible()) FPShowHideFontPanel() ; +#endif if ( [accessoryView closedWithOk]) {