modifications for compilation under Mac OS X

applied patches extracted from submission by Marc Newsam (tested under Mac OS 9)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2001-02-15 21:51:14 +00:00
parent f0c5ebdc0d
commit 03e11df547
149 changed files with 1693 additions and 761 deletions

View File

@@ -13,6 +13,7 @@
#pragma implementation "msgdlg.h"
#endif
#include "wx/app.h"
#include "wx/msgdlg.h"
#include "wx/mac/uma.h"
@@ -71,21 +72,36 @@ int wxMessageDialog::ShowModal()
short result ;
Str255 pascalTitle ;
Str255 pascalText ;
char cText[256] ;
if (wxApp::s_macDefaultEncodingIsPC)
{
strcpy( (char*) pascalTitle , wxMacMakeMacStringFromPC( m_caption ) ) ;
strcpy( (char*) pascalText , wxMacMakeMacStringFromPC( m_message) ) ;
#if TARGET_CARBON
c2pstrcpy( (StringPtr) pascalTitle , wxMacMakeMacStringFromPC( m_caption ) ) ;
#else
strcpy( (char *) pascalTitle , wxMacMakeMacStringFromPC( m_caption ) ) ;
c2pstr( (char *) pascalTitle ) ;
#endif
strcpy(cText , wxMacMakeMacStringFromPC( m_message) ) ;
}
else
{
strcpy( (char*) pascalTitle , m_caption ) ;
strcpy( (char*) pascalText , m_message ) ;
#if TARGET_CARBON
c2pstrcpy( (StringPtr) pascalTitle , m_caption ) ;
#else
strcpy( (char *) pascalTitle , m_caption ) ;
c2pstr( (char *) pascalTitle ) ;
#endif
strcpy( cText , m_message ) ;
}
c2pstr( (char*) pascalTitle ) ;
wxMacConvertNewlines( (char*)pascalText ,(char*) pascalText) ;
c2pstr( (char*) pascalText ) ;
wxMacConvertNewlines( cText , cText ) ;
#if TARGET_CARBON
c2pstrcpy( (StringPtr) pascalText , cText ) ;
#else
strcpy( (char *) pascalText , cText ) ;
c2pstr( (char *) pascalText ) ;
#endif
wxASSERT_MSG( ( m_dialogStyle & 0x3F ) != wxYES , "this style is not supported on mac" ) ;