From: <sag...@us...> - 2011-08-22 13:42:20
|
Revision: 991 http://modplug.svn.sourceforge.net/modplug/?rev=991&view=rev Author: saga-games Date: 2011-08-22 13:42:10 +0000 (Mon, 22 Aug 2011) Log Message: ----------- [Mod] Changed document rescue behaviour a bit (rescued modules are now dumped in %TEMP%\OpenMPT Crash Files) [Mod] Updated copyright notice in resources Modified Paths: -------------- trunk/OpenMPT/installer/install.iss trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/res/MPTRACK.RC2 Modified: trunk/OpenMPT/installer/install.iss =================================================================== --- trunk/OpenMPT/installer/install.iss 2011-08-21 23:28:38 UTC (rev 990) +++ trunk/OpenMPT/installer/install.iss 2011-08-22 13:42:10 UTC (rev 991) @@ -124,12 +124,10 @@ ; internet shortcut has to be deleted manually Type: files; Name: {app}\ModPlug Central.url ; normal installation -Type: dirifempty; Name: {userappdata}\OpenMPT\CrashFiles; Tasks: not portable Type: dirifempty; Name: {userappdata}\OpenMPT\TemplateModules; Tasks: not portable Type: dirifempty; Name: {userappdata}\OpenMPT\tunings; Tasks: not portable Type: dirifempty; Name: {userappdata}\OpenMPT; Tasks: not portable ; portable installation -Type: dirifempty; Name: {app}\CrashFiles; Tasks: portable Type: dirifempty; Name: {app}\TemplateModules; Tasks: portable Type: dirifempty; Name: {app}\tunings; Tasks: portable #ifdef DOWNLOAD_MO3 Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2011-08-21 23:28:38 UTC (rev 990) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2011-08-22 13:42:10 UTC (rev 991) @@ -2931,8 +2931,8 @@ /////////////////////////////////////////////////////////////////////////////////// // Internet-related functions -BOOL CTrackApp::OpenURL(LPCSTR lpszURL) -//------------------------------------- +BOOL CTrackApp::OpenURL(const LPCSTR lpszURL) +//------------------------------------------- { if ((lpszURL) && (lpszURL[0]) && (theApp.m_pMainWnd)) { @@ -2942,7 +2942,7 @@ lpszURL, NULL, NULL, - 0)) >= 32) return TRUE; + SW_SHOW)) >= 32) return TRUE; } return FALSE; } @@ -3006,12 +3006,14 @@ if(numFiles == 0) { // Need to create a rescue directory first - baseRescuePath.Format("%sCrashFiles\\", theApp.GetConfigPath()); + TCHAR tempPath[_MAX_PATH]; + GetTempPath(CountOf(tempPath), tempPath); + baseRescuePath.Format("%sOpenMPT Crash Files\\", tempPath); CreateDirectory(baseRescuePath, nullptr); baseRescuePath.Append(timestampDir); if(!CreateDirectory(baseRescuePath, nullptr)) { - ::MessageBox(window, "A crash has been detected.\nThere are still some modified files open, but OpenMPT could not create a directory for rescueing them.", "OpenMPT Crash", MB_ICONERROR); + ::MessageBox(window, "A crash has been detected and OpenMPT will be closed.\nThere are still some modified files open, but OpenMPT could not create a directory for rescueing them.", "OpenMPT Crash", MB_ICONERROR); break; } } @@ -3024,8 +3026,9 @@ if(numFiles > 0) { CString message; - message.Format("A crash has been detected.\n%d modified file%s been rescued to the following directory:\n%s", numFiles, (numFiles == 1 ? " has" : "s have"), baseRescuePath); + message.Format("A crash has been detected and OpenMPT will be closed.\n%d modified file%s been rescued to\n\n%s\n\nNote: It cannot be guaranteed that rescued files are still intact.", numFiles, (numFiles == 1 ? " has" : "s have"), baseRescuePath); ::MessageBox(window, message, "OpenMPT Crash", MB_ICONERROR); + OpenDirectory(baseRescuePath); } } Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2011-08-21 23:28:38 UTC (rev 990) +++ trunk/OpenMPT/mptrack/Mptrack.h 2011-08-22 13:42:10 UTC (rev 991) @@ -175,7 +175,9 @@ static BOOL SaveDefaultDLSBanks(); static BOOL RemoveDLSBank(UINT nBank); static BOOL AddDLSBank(LPCSTR); - static BOOL OpenURL(LPCSTR lpszURL); + static BOOL OpenURL(const LPCSTR lpszURL); + static BOOL OpenFile(const LPCSTR file) { return OpenURL(file); }; + static BOOL OpenDirectory(const LPCSTR directory) { return OpenURL(directory); }; static FileDlgResult ShowOpenSaveFileDialog(const bool load, const std::string defaultExtension, const std::string defaultFilename, const std::string extFilter, const std::string workingDirectory = "", const bool allowMultiSelect = false, int *filterIndex = nullptr); Modified: trunk/OpenMPT/mptrack/res/MPTRACK.RC2 =================================================================== --- trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2011-08-21 23:28:38 UTC (rev 990) +++ trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2011-08-22 13:42:10 UTC (rev 991) @@ -43,7 +43,7 @@ VALUE "FileDescription", "OpenMPT / ModPlug Tracker" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "ModPlug Tracker" - VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2010 contributors." + VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2011 contributors." VALUE "LegalTrademarks", "M.O.D.P.L.U.G" VALUE "OriginalFilename", "mptrack.exe" VALUE "PrivateBuild", "" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |