[BUG_FIXED] Fix localization feature bug while doLocalConf;xml is present.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@388 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2009-01-08 01:55:46 +00:00
parent ab5c33a896
commit 0d07533cec
3 changed files with 8 additions and 6 deletions

View File

@ -4606,10 +4606,12 @@ bool Notepad_plus::reloadLang()
::ModifyMenu(_mainMenuHandle, indexWindow - 1, MF_BYPOSITION, 0, pluginsTrans.c_str()); ::ModifyMenu(_mainMenuHandle, indexWindow - 1, MF_BYPOSITION, 0, pluginsTrans.c_str());
} }
::ModifyMenu(_mainMenuHandle, indexWindow, MF_BYPOSITION, 0, windowTrans.c_str()); if (windowTrans != TEXT(""))
windowTrans += TEXT("..."); {
::ModifyMenu(_mainMenuHandle, IDM_WINDOW_WINDOWS, MF_BYCOMMAND, IDM_WINDOW_WINDOWS, windowTrans.c_str()); ::ModifyMenu(_mainMenuHandle, indexWindow, MF_BYPOSITION, 0, windowTrans.c_str());
windowTrans += TEXT("...");
::ModifyMenu(_mainMenuHandle, IDM_WINDOW_WINDOWS, MF_BYCOMMAND, IDM_WINDOW_WINDOWS, windowTrans.c_str());
}
// Update scintilla context menu strings // Update scintilla context menu strings
vector<MenuItemUnit> & tmp = pNppParam->getContextMenuItems(); vector<MenuItemUnit> & tmp = pNppParam->getContextMenuItems();
size_t len = tmp.size(); size_t len = tmp.size();

View File

@ -337,7 +337,7 @@ LocalizationSwicher::LocalizationSwicher()
TCHAR localConfPath[MAX_PATH]; TCHAR localConfPath[MAX_PATH];
TCHAR nppPath[MAX_PATH]; TCHAR nppPath[MAX_PATH];
::GetModuleFileName(NULL, nppPath, MAX_PATH); ::GetModuleFileName(NULL, nppPath, MAX_PATH);
PathRemoveFileSpec(nppPath);
lstrcpy(localConfPath, nppPath); lstrcpy(localConfPath, nppPath);
PathAppend(localConfPath, localConfFile); PathAppend(localConfPath, localConfFile);

View File

@ -175,7 +175,7 @@ BOOL CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
::EnableWindow(::GetDlgItem(_hSelf, IDC_COMBO_LOCALIZATION), FALSE); ::EnableWindow(::GetDlgItem(_hSelf, IDC_COMBO_LOCALIZATION), FALSE);
#else #else
LocalizationSwicher & localizationSwitcher = pNppParam->getLocalizationSwitcher(); LocalizationSwicher & localizationSwitcher = pNppParam->getLocalizationSwitcher();
for (size_t i = 0 ; i < localizationSwitcher.size() ; i++) for (size_t i = 0 ; i < localizationSwitcher.size() ; i++)
{ {
pair<wstring, wstring> localizationInfo = localizationSwitcher.getElementFromIndex(i); pair<wstring, wstring> localizationInfo = localizationSwitcher.getElementFromIndex(i);