X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..472137baebae6c011ad7d70285de454b9ce7796d:/src/osx/carbon/msgdlg.cpp?ds=inline diff --git a/src/osx/carbon/msgdlg.cpp b/src/osx/carbon/msgdlg.cpp index 830efb6f27..29a23d18f1 100644 --- a/src/osx/carbon/msgdlg.cpp +++ b/src/osx/carbon/msgdlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/msgdlg.cpp +// Name: src/osx/carbon/msgdlg.cpp // Purpose: wxMessageDialog // Author: Stefan Csomor // Modified by: @@ -19,7 +19,7 @@ #endif #include "wx/thread.h" -#include "wx/mac/uma.h" +#include "wx/osx/uma.h" IMPLEMENT_CLASS(wxMessageDialog, wxDialog) @@ -30,40 +30,8 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, const wxString& caption, long style, const wxPoint& WXUNUSED(pos)) - : wxMessageDialogBase(parent, message, caption, style) + : wxMessageDialogWithCustomLabels(parent, message, caption, style) { - m_yes = _("Yes"); - m_no = _("No"); - m_ok = _("OK"); - m_cancel = _("Cancel"); -} - -bool wxMessageDialog::SetYesNoLabels(const wxString& yes,const wxString& no) -{ - m_yes = yes; - m_no = no; - return true; -} - -bool wxMessageDialog::SetYesNoCancelLabels(const wxString& yes, const wxString& no, const wxString& cancel) -{ - m_yes = yes; - m_no = no; - m_cancel = cancel; - return true; -} - -bool wxMessageDialog::SetOKLabel(const wxString& ok) -{ - m_ok = ok; - return true; -} - -bool wxMessageDialog::SetOKCancelLabels(const wxString& ok, const wxString& cancel) -{ - m_ok = ok; - m_cancel = cancel; - return true; } int wxMessageDialog::ShowModal() @@ -113,10 +81,10 @@ int wxMessageDialog::ShowModal() wxCFStringRef cfTitle( msgtitle, GetFont().GetEncoding() ); wxCFStringRef cfText( msgtext, GetFont().GetEncoding() ); - wxCFStringRef cfNoString( m_no.c_str(), GetFont().GetEncoding() ); - wxCFStringRef cfYesString( m_yes.c_str(), GetFont().GetEncoding() ); - wxCFStringRef cfOKString( m_ok.c_str() , GetFont().GetEncoding()) ; - wxCFStringRef cfCancelString( m_cancel.c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfNoString( GetNoLabel().c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfYesString( GetYesLabel().c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfOKString( GetOKLabel().c_str() , GetFont().GetEncoding()) ; + wxCFStringRef cfCancelString( GetCancelLabel().c_str(), GetFont().GetEncoding() ); int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ }; @@ -167,10 +135,10 @@ int wxMessageDialog::ShowModal() short result; AlertStdCFStringAlertParamRec param; - wxCFStringRef cfNoString( m_no.c_str(), GetFont().GetEncoding() ); - wxCFStringRef cfYesString( m_yes.c_str(), GetFont().GetEncoding() ); - wxCFStringRef cfOKString( m_ok.c_str(), GetFont().GetEncoding() ); - wxCFStringRef cfCancelString( m_cancel.c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfNoString( GetNoLabel().c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfYesString( GetYesLabel().c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfOKString( GetOKLabel().c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfCancelString( GetCancelLabel().c_str(), GetFont().GetEncoding() ); wxCFStringRef cfTitle( msgtitle, GetFont().GetEncoding() ); wxCFStringRef cfText( msgtext, GetFont().GetEncoding() );