From: <man...@us...> - 2013-08-29 12:16:20
|
Revision: 2620 http://sourceforge.net/p/modplug/code/2620 Author: manxorist Date: 2013-08-29 12:16:01 +0000 (Thu, 29 Aug 2013) Log Message: ----------- [Ref] Remove mpt_intl.ini and mpt_intl.dll support code which was solely usable to translate the options list in the general options tab. Modified Paths: -------------- trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2013-08-29 11:43:14 UTC (rev 2619) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2013-08-29 12:16:01 UTC (rev 2620) @@ -585,17 +585,11 @@ BOOL COptionsGeneral::OnInitDialog() //---------------------------------- { - CHAR sname[32], s[256]; CPropertyPage::OnInitDialog(); for(size_t i = 0; i < CountOf(generalOptionsList); i++) { - wsprintf(sname, "Setup.Gen.Opt%d.Name", i + 1); - if ((theApp.GetLocalizedString(sname, s, sizeof(s))) && (s[0])) - m_CheckList.AddString(s); - else - m_CheckList.AddString(generalOptionsList[i].name); - + m_CheckList.AddString(generalOptionsList[i].name); const int check = (TrackerSettings::Instance().m_dwPatternSetup & generalOptionsList[i].flag) != 0 ? BST_CHECKED : BST_UNCHECKED; m_CheckList.SetCheck(i, check); } @@ -676,14 +670,11 @@ void COptionsGeneral::OnOptionSelChanged() //---------------------------------------- { - CHAR sname[32], s[256]; LPCSTR pszDesc = NULL; const int sel = m_CheckList.GetCurSel(); if ((sel >= 0) && (sel < CountOf(generalOptionsList))) { pszDesc = generalOptionsList[sel].description; - wsprintf(sname, "Setup.Gen.Opt%d.Desc", sel+1); - if ((theApp.GetLocalizedString(sname, s, sizeof(s))) && (s[0])) pszDesc = s; } SetDlgItemText(IDC_TEXT1, (pszDesc) ? pszDesc : ""); } Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-08-29 11:43:14 UTC (rev 2619) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-08-29 12:16:01 UTC (rev 2620) @@ -626,7 +626,6 @@ m_bInitialized = FALSE; m_bExWaveSupport = FALSE; m_bDebugMode = FALSE; - m_hAlternateResourceHandle = NULL; m_szConfigFileName[0] = 0; } @@ -740,7 +739,6 @@ // Move the config files if they're still in the old place. MoveConfigFile("mptrack.ini"); MoveConfigFile("plugin.cache"); - MoveConfigFile("mpt_intl.ini"); #endif // WIN32 Legacy Stuff } else { @@ -788,9 +786,6 @@ strcpy(m_szConfigFileName, m_szConfigDirectory); // config file strcat(m_szConfigFileName, "mptrack.ini"); - strcpy(m_szStringsFileName, m_szConfigDirectory); // I18N file - strcat(m_szStringsFileName, "mpt_intl.ini"); - strcpy(m_szPluginCacheFileName, m_szConfigDirectory); // plugin cache strcat(m_szPluginCacheFileName, "plugin.cache"); @@ -815,8 +810,6 @@ // Start loading BeginWaitCursor(); - //m_hAlternateResourceHandle = LoadLibrary("mpt_intl.dll"); - MEMORYSTATUS gMemStatus; MemsetZero(gMemStatus); GlobalMemoryStatus(&gMemStatus); @@ -912,9 +905,6 @@ // Initialize Plugins if (!cmdInfo.m_bNoPlugins) InitializeDXPlugins(); - // Initialize localized strings - ImportLocalizedStrings(); - // Initialize CMainFrame pMainFrame->Initialize(); InitCommonControls(); @@ -2075,38 +2065,6 @@ } -////////////////////////////////////////////////////////////////////////////////// -// Localized strings - -VOID CTrackApp::ImportLocalizedStrings() -//-------------------------------------- -{ - //DWORD dwLangId = ((DWORD)GetUserDefaultLangID()) & 0xfff; - // TODO: look up [Strings.lcid], [Strings.(lcid&0xff)] & [Strings] in mpt_intl.ini -} - - -BOOL CTrackApp::GetLocalizedString(LPCSTR pszName, LPSTR pszStr, UINT cbSize) -//--------------------------------------------------------------------------- -{ - CHAR s[32]; - DWORD dwLangId = ((DWORD)GetUserDefaultLangID()) & 0xffff; - - pszStr[0] = 0; - if (!m_szStringsFileName[0]) return FALSE; - wsprintf(s, "Strings.%04X", dwLangId); - GetPrivateProfileString(s, pszName, "", pszStr, cbSize, m_szStringsFileName); - if (pszStr[0]) return TRUE; - wsprintf(s, "Strings.%04X", dwLangId&0xff); - GetPrivateProfileString(s, pszName, "", pszStr, cbSize, m_szStringsFileName); - if (pszStr[0]) return TRUE; - wsprintf(s, "Strings", dwLangId&0xff); - GetPrivateProfileString(s, pszName, "", pszStr, cbSize, m_szStringsFileName); - if (pszStr[0]) return TRUE; - return FALSE; -} - - /* Open or save one or multiple files using the system's file dialog * Parameter list: * - load: true: load dialog. false: save dialog. Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2013-08-29 11:43:14 UTC (rev 2619) +++ trunk/OpenMPT/mptrack/Mptrack.h 2013-08-29 12:16:01 UTC (rev 2620) @@ -113,14 +113,12 @@ CVstPluginManager *m_pPluginManager; BOOL m_bInitialized, m_bExWaveSupport, m_bDebugMode; DWORD m_dwTimeStarted, m_dwLastPluginIdleCall; - HANDLE m_hAlternateResourceHandle; // Default macro configuration MIDIMacroConfig m_MidiCfg; static TCHAR m_szExePath[_MAX_PATH]; TCHAR m_szConfigDirectory[_MAX_PATH]; TCHAR m_szConfigFileName[_MAX_PATH]; TCHAR m_szPluginCacheFileName[_MAX_PATH]; - TCHAR m_szStringsFileName[_MAX_PATH]; bool m_bPortableMode; public: @@ -182,11 +180,6 @@ void StartSplashScreen(); void StopSplashScreen(); -// Localized strings -public: - void ImportLocalizedStrings(); - BOOL GetLocalizedString(LPCSTR pszName, LPSTR pszStr, UINT cbSize); - // Overrides public: // ClassWizard generated virtual function overrides This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |