wxMac Unicode support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-03-27 20:33:32 +00:00
parent 44c44c82a3
commit 427ff66291
99 changed files with 1718 additions and 2166 deletions

View File

@@ -67,7 +67,7 @@ int wxMessageDialog::ShowModal()
short result ;
wxASSERT_MSG( ( m_dialogStyle & 0x3F ) != wxYES , "this style is not supported on mac" ) ;
wxASSERT_MSG( ( m_dialogStyle & 0x3F ) != wxYES , wxT("this style is not supported on mac") ) ;
AlertType alertType = kAlertPlainAlert ;
if (m_dialogStyle & wxICON_EXCLAMATION)
@@ -83,17 +83,12 @@ int wxMessageDialog::ShowModal()
if ( UMAGetSystemVersion() >= 0x1000 )
{
AlertStdCFStringAlertParamRec param ;
CFStringRef cfNoString = NULL ;
CFStringRef cfYesString = NULL ;
CFStringRef cfTitle = NULL;
CFStringRef cfText = NULL;
cfTitle = wxMacCreateCFString( m_caption ) ;
cfText = wxMacCreateCFString( m_message ) ;
cfNoString = wxMacCreateCFString( _("No") ) ;
cfYesString = wxMacCreateCFString( _("Yes") ) ;
wxMacCFStringHolder cfNoString(_("No")) ;
wxMacCFStringHolder cfYesString( _("Yes")) ;
wxMacCFStringHolder cfTitle(m_caption);
wxMacCFStringHolder cfText(m_message);
param.movable = true;
param.flags = 0 ;
@@ -157,32 +152,13 @@ int wxMessageDialog::ShowModal()
CreateStandardAlert( alertType , cfTitle , cfText , &param , &alertRef ) ;
RunStandardAlert( alertRef , NULL , &result ) ;
}
if(cfTitle != NULL)
CFRelease(cfTitle);
if(cfText != NULL)
CFRelease(cfText);
if(cfNoString != NULL)
CFRelease(cfNoString);
if(cfYesString != NULL)
CFRelease(cfYesString);
if ( skipDialog )
if ( skipDialog )
return wxID_CANCEL ;
}
else
#endif
{
AlertStdAlertParamRec param;
char cText[2048] ;
if (wxApp::s_macDefaultEncodingIsPC)
{
strcpy(cText , wxMacMakeMacStringFromPC( m_message) ) ;
}
else
{
strcpy( cText , m_message ) ;
}
wxMacConvertNewlines( cText , cText ) ;
Str255 yesPString ;
Str255 noPString ;
@@ -192,7 +168,7 @@ int wxMessageDialog::ShowModal()
wxMacStringToPascal( m_caption , pascalTitle ) ;
wxMacStringToPascal( _("Yes") , yesPString ) ;
wxMacStringToPascal( _("No") , noPString ) ;
CopyCStringToPascal( cText , pascalText ) ;
wxMacStringToPascal( m_message , pascalText ) ;
param.movable = true;
param.filterProc = NULL ;