From: <sag...@us...> - 2010-11-07 16:37:29
|
Revision: 759 http://modplug.svn.sourceforge.net/modplug/?rev=759&view=rev Author: saga-games Date: 2010-11-07 16:37:22 +0000 (Sun, 07 Nov 2010) Log Message: ----------- [Mod] Pattern Editor: Using the Goto Dialog should now update channel parameters and set the elapsed time. (http://bugs.openmpt.org/view.php?id=28) [Ref] Misc unimportant stuff (URLs, missing newlines, const modifiers) [Mod] OpenMPT: Version is now 1.19.00.12 Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/version.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-11-07 16:07:38 UTC (rev 758) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-11-07 16:37:22 UTC (rev 759) @@ -2771,7 +2771,7 @@ void CMainFrame::OnReportBug() //---------------------------- { - CTrackApp::OpenURL("http://openmpt.com/bugreport/"); + CTrackApp::OpenURL("http://bugs.openmpt.org/"); return; } //end rewbs.reportBug Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-07 16:07:38 UTC (rev 758) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-07 16:37:22 UTC (rev 759) @@ -3271,8 +3271,8 @@ * - allowMultiSelect: allow the user to select multiple files? (will be ignored if load == false) * - filterIndex: pointer to a variable holding the index of the last extension filter used. */ -FileDlgResult CTrackApp::ShowOpenSaveFileDialog(bool load, std::string defaultExtension, std::string defaultFilename, std::string extFilter, std::string workingDirectory, bool allowMultiSelect, int *filterIndex) -//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +FileDlgResult CTrackApp::ShowOpenSaveFileDialog(const bool load, const std::string defaultExtension, const std::string defaultFilename, const std::string extFilter, const std::string workingDirectory, const bool allowMultiSelect, int *filterIndex) +//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { FileDlgResult result; result.workingDirectory = workingDirectory; @@ -3282,16 +3282,13 @@ result.abort = true; // we can't save multiple files. - if(!load) - { - allowMultiSelect = false; - } + const bool multiSelect = allowMultiSelect && load; // First, set up the dialog... CFileDialog dlg(load ? TRUE : FALSE, defaultExtension.empty() ? NULL : defaultExtension.c_str(), defaultFilename.empty() ? NULL : defaultFilename.c_str(), - load ? (OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | (allowMultiSelect ? OFN_ALLOWMULTISELECT : 0)) + load ? (OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | (multiSelect ? OFN_ALLOWMULTISELECT : 0)) : (OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_NOREADONLYRETURN), extFilter.empty() ? NULL : extFilter.c_str(), theApp.m_pMainWnd); @@ -3301,7 +3298,7 @@ dlg.m_ofn.nFilterIndex = (DWORD)(*filterIndex); vector<TCHAR> filenameBuffer; - if (allowMultiSelect) + if(multiSelect) { const size_t bufferSize = 2048; // Note: This is possibly the maximum buffer size in MFC 7(this note was written November 2006). filenameBuffer.resize(bufferSize, 0); @@ -3322,7 +3319,7 @@ if(filterIndex != nullptr) *filterIndex = dlg.m_ofn.nFilterIndex; - if(allowMultiSelect) + if(multiSelect) { // multiple files might have been selected POSITION pos = dlg.GetStartPosition(); Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2010-11-07 16:07:38 UTC (rev 758) +++ trunk/OpenMPT/mptrack/Mptrack.h 2010-11-07 16:37:22 UTC (rev 759) @@ -190,7 +190,7 @@ static BOOL AddDLSBank(LPCSTR); static BOOL OpenURL(LPCSTR lpszURL); - static FileDlgResult ShowOpenSaveFileDialog(bool load, std::string defaultExtension, std::string defaultFilename, std::string extFilter, std::string workingDirectory = "", bool allowMultiSelect = false, int *filterIndex = nullptr); + 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); public: CDocTemplate *GetModDocTemplate() const { return m_pModTemplate; } Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2010-11-07 16:07:38 UTC (rev 758) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-11-07 16:37:22 UTC (rev 759) @@ -1723,35 +1723,36 @@ return; - if (!m_pGotoWnd) { + if (!m_pGotoWnd) + { m_pGotoWnd = new CPatternGotoDialog(this); //if (m_pGotoWnd) m_pGotoWnd->SetParent(this/*, GetDocument()*/); } - if (m_pGotoWnd) { + if (m_pGotoWnd) + { CSoundFile* pSndFile = pModDoc->GetSoundFile(); UINT nCurrentOrder = SendCtrlMessage(CTRLMSG_GETCURRENTORDER); UINT nCurrentChannel = ((m_dwCursor & 0xFFFF) >> 3) + 1; m_pGotoWnd->UpdatePos(m_nRow, nCurrentChannel, m_nPattern, nCurrentOrder, pSndFile); - if (m_pGotoWnd->DoModal() == IDOK) { + if (m_pGotoWnd->DoModal() == IDOK) + { //Position should be valididated. - if (m_pGotoWnd->m_nPattern != m_nPattern) { + if (m_pGotoWnd->m_nPattern != m_nPattern) SetCurrentPattern(m_pGotoWnd->m_nPattern); - } - if (m_pGotoWnd->m_nOrder != nCurrentOrder) { + if (m_pGotoWnd->m_nOrder != nCurrentOrder) SendCtrlMessage(CTRLMSG_SETCURRENTORDER, m_pGotoWnd->m_nOrder); - } - if (m_pGotoWnd->m_nChannel != nCurrentChannel) { + if (m_pGotoWnd->m_nChannel != nCurrentChannel) SetCurrentColumn((m_pGotoWnd->m_nChannel-1) << 3); - } - if (m_pGotoWnd->m_nRow != m_nRow) { + if (m_pGotoWnd->m_nRow != m_nRow) SetCurrentRow(m_pGotoWnd->m_nRow); - } + + pModDoc->SetElapsedTime(m_pGotoWnd->m_nOrder, m_pGotoWnd->m_nRow); } } return; Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-11-07 16:07:38 UTC (rev 758) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-11-07 16:37:22 UTC (rev 759) @@ -185,7 +185,8 @@ m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC2"), mixLevels_117RC2); m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC1"), mixLevels_117RC1); m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Original (MPT 1.16)"), mixLevels_original); - m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Compatible"), mixLevels_compatible); //m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), mixLevels_Test); + m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Compatible"), mixLevels_compatible); + //m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), mixLevels_Test); switch(m_pSndFile->m_nMixLevels) { //case mixLevels_Test: m_PlugMixBox.SetCurSel(5); break; Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2010-11-07 16:07:38 UTC (rev 758) +++ trunk/OpenMPT/mptrack/version.h 2010-11-07 16:37:22 UTC (rev 759) @@ -15,7 +15,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 19 #define VER_MINOR 00 -#define VER_MINORMINOR 11 +#define VER_MINORMINOR 12 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |