fix MessageBox not displaying unicode
This commit is contained in:
@@ -156,7 +156,7 @@ void ChangeGameSettings::OnOK()
|
|||||||
if( !ini.WriteFile(SpecialFiles::PREFERENCES_INI_PATH) )
|
if( !ini.WriteFile(SpecialFiles::PREFERENCES_INI_PATH) )
|
||||||
{
|
{
|
||||||
RString sError = ssprintf( ERROR_WRITING_FILE.GetValue(), SpecialFiles::PREFERENCES_INI_PATH.c_str(), ini.GetError().c_str() );
|
RString sError = ssprintf( ERROR_WRITING_FILE.GetValue(), SpecialFiles::PREFERENCES_INI_PATH.c_str(), ini.GetError().c_str() );
|
||||||
AfxMessageBox( sError );
|
Dialog::OK( sError );
|
||||||
}
|
}
|
||||||
|
|
||||||
CDialog::OnOK();
|
CDialog::OnOK();
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ void EditInsallations::OnButtonAdd()
|
|||||||
|
|
||||||
if( sNewDir == "" )
|
if( sNewDir == "" )
|
||||||
{
|
{
|
||||||
AfxMessageBox( YOU_MUST_TYPE_IN.GetValue() );
|
Dialog::OK( YOU_MUST_TYPE_IN.GetValue() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ void EditInsallations::OnButtonAdd()
|
|||||||
|
|
||||||
if( !SMPackageUtil::IsValidInstallDir(sNewDir) )
|
if( !SMPackageUtil::IsValidInstallDir(sNewDir) )
|
||||||
{
|
{
|
||||||
AfxMessageBox( ssprintf(NOT_A_VALID_INSTALLATION_DIR.GetValue(),sNewDir.c_str()) );
|
Dialog::OK( ssprintf(NOT_A_VALID_INSTALLATION_DIR.GetValue(),sNewDir.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -231,8 +231,9 @@ void LanguagesDlg::OnBnClickedButtonDelete()
|
|||||||
|
|
||||||
RString sLanguageFile = GetLanguageFile( sTheme, sLanguage );
|
RString sLanguageFile = GetLanguageFile( sTheme, sLanguage );
|
||||||
|
|
||||||
int iRet = MessageBox( ssprintf(THIS_WILL_PERMANENTLY_DELETE.GetValue(),sLanguageFile.c_str()), NULL, MB_OKCANCEL );
|
RString sMessage = ssprintf(THIS_WILL_PERMANENTLY_DELETE.GetValue(),sLanguageFile.c_str());
|
||||||
if( iRet != IDOK )
|
Dialog::Result ret = Dialog::AbortRetry( sMessage );
|
||||||
|
if( ret != Dialog::retry )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FILEMAN->Remove( sLanguageFile );
|
FILEMAN->Remove( sLanguageFile );
|
||||||
@@ -303,14 +304,14 @@ void LanguagesDlg::OnBnClickedButtonExport()
|
|||||||
RString sFullFile = "Desktop/"+sFile;
|
RString sFullFile = "Desktop/"+sFile;
|
||||||
if( iNumExpored == 0 )
|
if( iNumExpored == 0 )
|
||||||
{
|
{
|
||||||
MessageBox( THERE_ARE_NO_STRINGS_TO_EXPORT.GetValue() );
|
Dialog::OK( THERE_ARE_NO_STRINGS_TO_EXPORT.GetValue() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( csv.WriteFile(sFullFile) )
|
if( csv.WriteFile(sFullFile) )
|
||||||
MessageBox( ssprintf(EXPORTED_TO_YOUR_DESKTOP.GetValue(),sFile.c_str()) );
|
Dialog::OK( ssprintf(EXPORTED_TO_YOUR_DESKTOP.GetValue(),sFile.c_str()) );
|
||||||
else
|
else
|
||||||
MessageBox( ssprintf(FAILED_TO_SAVE.GetValue(),sFullFile.c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_SAVE.GetValue(),sFullFile.c_str()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static LocalizedString ERROR_READING_FILE ( "LanguagesDlg", "Error reading file '%s'." );
|
static LocalizedString ERROR_READING_FILE ( "LanguagesDlg", "Error reading file '%s'." );
|
||||||
@@ -343,28 +344,28 @@ void LanguagesDlg::OnBnClickedButtonImport()
|
|||||||
RageFileOsAbsolute cvsFile;
|
RageFileOsAbsolute cvsFile;
|
||||||
if( !cvsFile.Open(sCsvFile) )
|
if( !cvsFile.Open(sCsvFile) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(ERROR_READING_FILE.GetValue(),sCsvFile.c_str()) );
|
Dialog::OK( ssprintf(ERROR_READING_FILE.GetValue(),sCsvFile.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CsvFile csv;
|
CsvFile csv;
|
||||||
if( !csv.ReadFile(cvsFile) )
|
if( !csv.ReadFile(cvsFile) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(ERROR_PARSING_FILE.GetValue(),sCsvFile.c_str()) );
|
Dialog::OK( ssprintf(ERROR_PARSING_FILE.GetValue(),sCsvFile.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RString sLanguageFile = GetLanguageFile( sTheme, sLanguage );
|
RString sLanguageFile = GetLanguageFile( sTheme, sLanguage );
|
||||||
|
|
||||||
{
|
{
|
||||||
int iRet = MessageBox( ssprintf(IMPORTING_THESE_STRINGS_WILL_OVERRIDE.GetValue(),sLanguageFile.c_str()), NULL, MB_OKCANCEL );
|
Dialog::Result ret = Dialog::RetryCancel( ssprintf(IMPORTING_THESE_STRINGS_WILL_OVERRIDE.GetValue(),sLanguageFile.c_str()), NULL, MB_OKCANCEL );
|
||||||
if( iRet != IDOK )
|
if( ret != Dialog::retry )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
if( !ini.ReadFile(sLanguageFile) )
|
if( !ini.ReadFile(sLanguageFile) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(ERROR_READING.GetValue(),sLanguageFile.c_str()) );
|
Dialog::OK( ssprintf(ERROR_READING.GetValue(),sLanguageFile.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,7 +381,7 @@ void LanguagesDlg::OnBnClickedButtonImport()
|
|||||||
int iNumValues = line->size();
|
int iNumValues = line->size();
|
||||||
if( iNumValues != 3 && iNumValues != 4 )
|
if( iNumValues != 3 && iNumValues != 4 )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(ERROR_READING_EACH_LINE_MUST_HAVE.GetValue(),sCsvFile.c_str(),iNumValues) );
|
Dialog::OK( ssprintf(ERROR_READING_EACH_LINE_MUST_HAVE.GetValue(),sCsvFile.c_str(),iNumValues) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tl.sSection = (*line)[0];
|
tl.sSection = (*line)[0];
|
||||||
@@ -400,9 +401,9 @@ void LanguagesDlg::OnBnClickedButtonImport()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( ini.WriteFile(sLanguageFile) )
|
if( ini.WriteFile(sLanguageFile) )
|
||||||
MessageBox( ssprintf(IMPORTED_STRINGS_INTO.GetValue(),iNumImported,sLanguageFile.c_str(),iNumIgnored) );
|
Dialog::OK( ssprintf(IMPORTED_STRINGS_INTO.GetValue(),iNumImported,sLanguageFile.c_str(),iNumIgnored) );
|
||||||
else
|
else
|
||||||
MessageBox( ssprintf(FAILED_TO_SAVE.GetValue(),sLanguageFile.c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_SAVE.GetValue(),sLanguageFile.c_str()) );
|
||||||
|
|
||||||
OnSelchangeListThemes();
|
OnSelchangeListThemes();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ void MainMenuDlg::OnCreateSong()
|
|||||||
|
|
||||||
if( DoesFileExist(sSongDirectory) )
|
if( DoesFileExist(sSongDirectory) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(THE_SONG_DIRECTORY_ALREADY_EXISTS.GetValue(),sSongDirectory.c_str()) );
|
Dialog::OK( ssprintf(THE_SONG_DIRECTORY_ALREADY_EXISTS.GetValue(),sSongDirectory.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ void MainMenuDlg::OnCreateSong()
|
|||||||
bool bSuccess = FileCopy( fileIn, fileOut, sError );
|
bool bSuccess = FileCopy( fileIn, fileOut, sError );
|
||||||
if( !bSuccess )
|
if( !bSuccess )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(FAILED_TO_COPY_MUSIC_FILE.GetValue(),sMusicFile.c_str(),sNewMusicFile.c_str(),sError.c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_COPY_MUSIC_FILE.GetValue(),sMusicFile.c_str(),sNewMusicFile.c_str(),sError.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,12 +157,12 @@ void MainMenuDlg::OnCreateSong()
|
|||||||
RageFile file;
|
RageFile file;
|
||||||
if( file.Open(sNewSongFile, RageFile::WRITE) )
|
if( file.Open(sNewSongFile, RageFile::WRITE) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(FAILED_TO_CREATE_THE_SONG_FILE.GetValue(),sNewSongFile.c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_CREATE_THE_SONG_FILE.GetValue(),sNewSongFile.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
file.Close();
|
file.Close();
|
||||||
|
|
||||||
MessageBox( ssprintf(SUCCESS_CREATED_THE_SONG.GetValue(),sSongDirectory.c_str()) );
|
Dialog::OK( ssprintf(SUCCESS_CREATED_THE_SONG.GetValue(),sSongDirectory.c_str()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL MainMenuDlg::OnInitDialog()
|
BOOL MainMenuDlg::OnInitDialog()
|
||||||
@@ -192,14 +192,14 @@ void MainMenuDlg::OnBnClickedClearKeymaps()
|
|||||||
|
|
||||||
if( !DoesFileExist( SpecialFiles::KEYMAPS_PATH ) )
|
if( !DoesFileExist( SpecialFiles::KEYMAPS_PATH ) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(IS_ALREADY_CLEARED.GetValue(),SpecialFiles::KEYMAPS_PATH.c_str()) );
|
Dialog::OK( ssprintf(IS_ALREADY_CLEARED.GetValue(),SpecialFiles::KEYMAPS_PATH.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !FILEMAN->Remove(SpecialFiles::KEYMAPS_PATH) )
|
if( !FILEMAN->Remove(SpecialFiles::KEYMAPS_PATH) )
|
||||||
MessageBox( ssprintf(FAILED_TO_DELETE_FILE.GetValue(), SpecialFiles::KEYMAPS_PATH.c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_DELETE_FILE.GetValue(), SpecialFiles::KEYMAPS_PATH.c_str()) );
|
||||||
|
|
||||||
MessageBox( ssprintf(CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
Dialog::OK( ssprintf(CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainMenuDlg::OnBnClickedChangePreferences()
|
void MainMenuDlg::OnBnClickedChangePreferences()
|
||||||
@@ -216,12 +216,12 @@ void MainMenuDlg::OnBnClickedOpenPreferences()
|
|||||||
// TODO: Add your control notification handler code here
|
// TODO: Add your control notification handler code here
|
||||||
if( !DoesFileExist( SpecialFiles::PREFERENCES_INI_PATH ) )
|
if( !DoesFileExist( SpecialFiles::PREFERENCES_INI_PATH ) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(DOESNT_EXIST_IT_WILL_BE_CREATED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
Dialog::OK( ssprintf(DOESNT_EXIST_IT_WILL_BE_CREATED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( NULL == ::ShellExecute( this->m_hWnd, "open", SpecialFiles::PREFERENCES_INI_PATH, "", "", SW_SHOWNORMAL ) )
|
if( NULL == ::ShellExecute( this->m_hWnd, "open", SpecialFiles::PREFERENCES_INI_PATH, "", "", SW_SHOWNORMAL ) )
|
||||||
MessageBox( ssprintf(FAILED_TO_OPEN.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str(),GetLastErrorString().c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_OPEN.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str(),GetLastErrorString().c_str()) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,17 +230,17 @@ void MainMenuDlg::OnBnClickedClearPreferences()
|
|||||||
// TODO: Add your control notification handler code here
|
// TODO: Add your control notification handler code here
|
||||||
if( !DoesFileExist(SpecialFiles::PREFERENCES_INI_PATH) )
|
if( !DoesFileExist(SpecialFiles::PREFERENCES_INI_PATH) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(IS_ALREADY_CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
Dialog::OK( ssprintf(IS_ALREADY_CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !FILEMAN->Remove(SpecialFiles::PREFERENCES_INI_PATH) )
|
if( !FILEMAN->Remove(SpecialFiles::PREFERENCES_INI_PATH) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(FAILED_TO_DELETE_FILE.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_DELETE_FILE.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox( ssprintf(CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
Dialog::OK( ssprintf(CLEARED.GetValue(),SpecialFiles::PREFERENCES_INI_PATH.c_str()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainMenuDlg::OnBnClickedButtonLaunchGame()
|
void MainMenuDlg::OnBnClickedButtonLaunchGame()
|
||||||
|
|||||||
@@ -98,14 +98,14 @@ BOOL CSMPackageInstallDlg::OnInitDialog()
|
|||||||
RageFileOsAbsolute file;
|
RageFileOsAbsolute file;
|
||||||
if( !file.Open(m_sPackagePath) )
|
if( !file.Open(m_sPackagePath) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(COULD_NOT_OPEN_FILE.GetValue(),m_sPackagePath.c_str()) );
|
Dialog::OK( ssprintf(COULD_NOT_OPEN_FILE.GetValue(),m_sPackagePath.c_str()) );
|
||||||
exit(1); // better way to abort?
|
exit(1); // better way to abort?
|
||||||
}
|
}
|
||||||
|
|
||||||
RageFileDriverZip zip;
|
RageFileDriverZip zip;
|
||||||
if( !zip.Load(&file) )
|
if( !zip.Load(&file) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(IS_NOT_A_VALID_ZIP.GetValue(),m_sPackagePath.c_str()) );
|
Dialog::OK( ssprintf(IS_NOT_A_VALID_ZIP.GetValue(),m_sPackagePath.c_str()) );
|
||||||
exit(1); // better way to abort?
|
exit(1); // better way to abort?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ void CSMPackageInstallDlg::OnOK()
|
|||||||
int iSelectedInstallDirIndex = m_comboDir.GetCurSel();
|
int iSelectedInstallDirIndex = m_comboDir.GetCurSel();
|
||||||
if( iSelectedInstallDirIndex == -1 )
|
if( iSelectedInstallDirIndex == -1 )
|
||||||
{
|
{
|
||||||
MessageBox( NO_INSTALLATIONS.GetValue(), NULL, MB_OK|MB_ICONEXCLAMATION );
|
Dialog::OK( NO_INSTALLATIONS.GetValue(), NULL, MB_OK|MB_ICONEXCLAMATION );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,14 +287,14 @@ void CSMPackageInstallDlg::OnOK()
|
|||||||
RageFileOsAbsolute file;
|
RageFileOsAbsolute file;
|
||||||
if( !file.Open(m_sPackagePath) )
|
if( !file.Open(m_sPackagePath) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(COULD_NOT_OPEN_FILE.GetValue(),m_sPackagePath.c_str()) );
|
Dialog::OK( ssprintf(COULD_NOT_OPEN_FILE.GetValue(),m_sPackagePath.c_str()) );
|
||||||
exit(1); // better way to abort?
|
exit(1); // better way to abort?
|
||||||
}
|
}
|
||||||
|
|
||||||
RageFileDriverZip zip;
|
RageFileDriverZip zip;
|
||||||
if( !zip.Load(&file) )
|
if( !zip.Load(&file) )
|
||||||
{
|
{
|
||||||
MessageBox( ssprintf(IS_NOT_A_VALID_ZIP.GetValue(),m_sPackagePath.c_str()) );
|
Dialog::OK( ssprintf(IS_NOT_A_VALID_ZIP.GetValue(),m_sPackagePath.c_str()) );
|
||||||
exit(1); // better way to abort?
|
exit(1); // better way to abort?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,15 +382,15 @@ retry_unzip:
|
|||||||
goto done_with_file;
|
goto done_with_file;
|
||||||
|
|
||||||
show_error:
|
show_error:
|
||||||
switch( MessageBox( sError, NULL, MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION ) )
|
switch( Dialog::AbortRetryIgnore(sError) )
|
||||||
{
|
{
|
||||||
case IDABORT:
|
case Dialog::abort:
|
||||||
exit(1); // better way to exit?
|
exit(1); // better way to exit?
|
||||||
break;
|
break;
|
||||||
case IDRETRY:
|
case Dialog::retry:
|
||||||
goto retry_unzip;
|
goto retry_unzip;
|
||||||
break;
|
break;
|
||||||
case IDIGNORE:
|
case Dialog::ignore:
|
||||||
// do nothing
|
// do nothing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -400,7 +400,7 @@ done_with_file:
|
|||||||
pProgress1->StepIt(); //increase the progress bar of 1 step
|
pProgress1->StepIt(); //increase the progress bar of 1 step
|
||||||
}
|
}
|
||||||
|
|
||||||
AfxMessageBox( PACKAGE_INSTALLED_SUCCESSFULLY.GetValue() );
|
Dialog::OK( PACKAGE_INSTALLED_SUCCESSFULLY.GetValue() );
|
||||||
|
|
||||||
// close the dialog
|
// close the dialog
|
||||||
CDialog::OnOK();
|
CDialog::OnOK();
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ bool SMPackageUtil::LaunchGame()
|
|||||||
if( !DoesFileExist(sFile) )
|
if( !DoesFileExist(sFile) )
|
||||||
{
|
{
|
||||||
RString sError = ssprintf( COULD_NOT_FIND.GetValue(), sExe.c_str() );
|
RString sError = ssprintf( COULD_NOT_FIND.GetValue(), sExe.c_str() );
|
||||||
::MessageBox( NULL, sError, NULL, MB_OK|MB_ICONEXCLAMATION );
|
Dialog::OK( sError );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -225,6 +225,7 @@ void SMPackageUtil::StripIgnoredSmzipFiles( vector<RString> &vsFilesInOut )
|
|||||||
bEraseThis |= EndsWith( sFile, "smzip.ctl" );
|
bEraseThis |= EndsWith( sFile, "smzip.ctl" );
|
||||||
bEraseThis |= EndsWith( sFile, ".old" );
|
bEraseThis |= EndsWith( sFile, ".old" );
|
||||||
bEraseThis |= EndsWith( sFile, "Thumbs.db" );
|
bEraseThis |= EndsWith( sFile, "Thumbs.db" );
|
||||||
|
bEraseThis |= EndsWith( sFile, ".DS_Store" );
|
||||||
bEraseThis |= (sFile.find("CVS") != string::npos);
|
bEraseThis |= (sFile.find("CVS") != string::npos);
|
||||||
|
|
||||||
if( bEraseThis )
|
if( bEraseThis )
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ static bool ExportPackage( const RString &sPackageName, const RString &sSourceIn
|
|||||||
}
|
}
|
||||||
catch (CException* e)
|
catch (CException* e)
|
||||||
{
|
{
|
||||||
AfxMessageBox( ssprintf(ERROR_ADDING_FILE.GetValue(), sFilePath.c_str()) );
|
Dialog::OK( ssprintf(ERROR_ADDING_FILE.GetValue(), sFilePath.c_str()) );
|
||||||
zip.Close();
|
zip.Close();
|
||||||
e->Delete();
|
e->Delete();
|
||||||
return false;
|
return false;
|
||||||
@@ -237,7 +237,7 @@ void CSmpackageExportDlg::OnButtonExportAsOne()
|
|||||||
|
|
||||||
if( asPaths.size() == 0 )
|
if( asPaths.size() == 0 )
|
||||||
{
|
{
|
||||||
AfxMessageBox( NO_ITEMS_ARE_CHECKED.GetValue() );
|
Dialog::OK( NO_ITEMS_ARE_CHECKED.GetValue() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if( asPaths.size() == 1 )
|
else if( asPaths.size() == 1 )
|
||||||
@@ -261,7 +261,7 @@ void CSmpackageExportDlg::OnButtonExportAsOne()
|
|||||||
return; // cancelled
|
return; // cancelled
|
||||||
|
|
||||||
if( ExportPackage( sPackageName, GetCurrentInstallDir(), asPaths, sComment ) )
|
if( ExportPackage( sPackageName, GetCurrentInstallDir(), asPaths, sComment ) )
|
||||||
AfxMessageBox( ssprintf(SUCCESSFULLY_EXPORTED.GetValue(),sPackageName.c_str()) );
|
Dialog::OK( ssprintf(SUCCESSFULLY_EXPORTED.GetValue(),sPackageName.c_str()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static LocalizedString THE_FOLLOWING_PACKAGES_WERE_EXPORTED ("CSmpackageExportDlg","The following packages were exported to your Desktop:");
|
static LocalizedString THE_FOLLOWING_PACKAGES_WERE_EXPORTED ("CSmpackageExportDlg","The following packages were exported to your Desktop:");
|
||||||
@@ -273,7 +273,7 @@ void CSmpackageExportDlg::OnButtonExportAsIndividual()
|
|||||||
|
|
||||||
if( asPaths.size() == 0 )
|
if( asPaths.size() == 0 )
|
||||||
{
|
{
|
||||||
AfxMessageBox( NO_ITEMS_ARE_CHECKED.GetValue() );
|
Dialog::OK( NO_ITEMS_ARE_CHECKED.GetValue() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@ void CSmpackageExportDlg::OnButtonExportAsIndividual()
|
|||||||
sMessage += "\n\n";
|
sMessage += "\n\n";
|
||||||
sMessage += THE_FOLLOWING_PACKAGES_FAILED.GetValue()+"\n\n"+join( "\n", asFailedPackages );
|
sMessage += THE_FOLLOWING_PACKAGES_FAILED.GetValue()+"\n\n"+join( "\n", asFailedPackages );
|
||||||
}
|
}
|
||||||
AfxMessageBox( sMessage );
|
Dialog::OK( sMessage );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSmpackageExportDlg::OnButtonPlay()
|
void CSmpackageExportDlg::OnButtonPlay()
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ BOOL CSmpackageApp::InitInstance()
|
|||||||
RString sPersonalDir = SpecialDirs::GetMyDocumentsDir();
|
RString sPersonalDir = SpecialDirs::GetMyDocumentsDir();
|
||||||
RString sFile = sPersonalDir + PRODUCT_ID +"/Save/MachineProfile/Stats.xml";
|
RString sFile = sPersonalDir + PRODUCT_ID +"/Save/MachineProfile/Stats.xml";
|
||||||
if( NULL == ::ShellExecute( NULL, "open", sFile, "", "", SW_SHOWNORMAL ) )
|
if( NULL == ::ShellExecute( NULL, "open", sFile, "", "", SW_SHOWNORMAL ) )
|
||||||
AfxMessageBox( ssprintf(FAILED_TO_OPEN.GetValue(),sFile.c_str(),GetLastErrorString().c_str()) );
|
Dialog::OK( ssprintf(FAILED_TO_OPEN.GetValue(),sFile.c_str(),GetLastErrorString().c_str()) );
|
||||||
exit(1); // better way to quit?
|
exit(1); // better way to quit?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user