X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8b90482676205a0fc997be9fcdc47ef62a37211..c9ed413ab4f5673ffff00198dc6ce1397398bda4:/src/osx/carbon/fontdlg.cpp diff --git a/src/osx/carbon/fontdlg.cpp b/src/osx/carbon/fontdlg.cpp index 395b13fdfb..cf0aed1759 100644 --- a/src/osx/carbon/fontdlg.cpp +++ b/src/osx/carbon/fontdlg.cpp @@ -103,7 +103,7 @@ wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler), FMFontFamily fontFamily = cEvent.GetParameter(kEventParamFMFontFamily); ATSFontFamilyRef atsfontfamilyref = FMGetATSFontFamilyRefFromFontFamily( fontFamily ) ; OSStatus err = ATSFontFamilyGetName( atsfontfamilyref , kATSOptionFlagsDefault , &cfName ) ; - if ( err == noErr ) + if ( err != noErr ) { wxFAIL_MSG("ATSFontFamilyGetName failed"); } @@ -257,8 +257,9 @@ int wxFontDialog::ShowModal() if ( !FPIsFontPanelVisible() ) FPShowHideFontPanel(); #endif + wxDialog::OSXBeginModalDialog(); int retval = RunMixedFontDialog(this); - + wxDialog::OSXEndModalDialog(); #if wxOSX_USE_CARBON ::RemoveEventHandler(handler); #endif @@ -512,7 +513,7 @@ void wxFontDialog::CreateControls() wxStaticText* itemStaticText8 = new wxStaticText( itemDialog1, wxID_STATIC, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer4->Add(itemStaticText8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - m_sizeCtrl = new wxSpinCtrl( itemDialog1, wxID_FONTDIALOG_FONTSIZE, _T("12"), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 1, 300, 12 ); + m_sizeCtrl = new wxSpinCtrl( itemDialog1, wxID_FONTDIALOG_FONTSIZE, wxT("12"), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 1, 300, 12 ); m_sizeCtrl->SetHelpText(_("The font size in points.")); if (ShowToolTips()) m_sizeCtrl->SetToolTip(_("The font size in points."));