X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/292e5e1f17af67a5885f1fdaa8c45a8a5a2a3ca5..689d801314845c6db093358a81c7879b672aa5e6:/src/osx/carbon/fontdlgosx.mm diff --git a/src/osx/carbon/fontdlgosx.mm b/src/osx/carbon/fontdlgosx.mm index 7b771bd1e4..93acda991e 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: @@ -42,7 +42,7 @@ #import #import -#include "wx/osx/uma.h" +#include "wx/osx/private.h" @interface wxMacFontPanelAccView : NSView { @@ -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]) {