[BUG_FIXED] Fix a crash bug - crash on launch time if default User defined language was set on the previous session.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@823 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2011-10-07 22:02:18 +00:00
parent a0dfaf424c
commit 4af7c82a67
3 changed files with 2 additions and 33 deletions

View File

@ -973,7 +973,7 @@ bool Notepad_plus::loadSession(Session & session)
const TCHAR *pLn = session._mainViewFiles[i]._langName.c_str();
int id = getLangFromMenuName(pLn);
LangType typeToSet = L_TEXT;
if (id != 0 && lstrcmp(pLn, TEXT("User Defined")) != 0)
if (id != 0 && id != IDM_LANG_USER)
typeToSet = menuID2LangType(id);
if (typeToSet == L_EXTERNAL )
typeToSet = (LangType)(id - IDM_LANG_EXTERNAL + L_EXTERNAL);

View File

@ -239,7 +239,7 @@ IDD_GLOBAL_USERDEFINE_DLG DIALOGEX 36, 44, 340, 550
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP |
WS_CAPTION | WS_VSCROLL | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
CAPTION "User-Defined"
CAPTION "User Defined Language"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
BEGIN
LTEXT "User language : ",IDC_LANGNAME_STATIC,0,3,63,8,0,WS_EX_RIGHT

View File

@ -1,31 +0,0 @@
<NotepadPlus>
<!-- projectFile/location -->
<!-- if file name is relative, then project file current path will be used -->
<Project name="Notepad++" >
<Folder name="Power Editor">
<Folder name="src">
<Folder name="WinControls">
<Folder name="ProjectPanel">
<File name="D:\source\notepad++\trunk\PowerEditor\src\WinControls\ProjectPanel\ProjectPanel.h"/>
<File name="D:\source\notepad++\trunk\PowerEditor\src\WinControls\ProjectPanel\ProjectPanel.cpp"/>
<File name="D:\source\notepad++\trunk\PowerEditor\src\WinControls\ProjectPanel\ProjectPanel.rc"/>
<File name="D:\source\notepad++\trunk\PowerEditor\src\WinControls\ProjectPanel\TreeView.h"/>
<File name="D:\source\notepad++\trunk\PowerEditor\src\WinControls\ProjectPanel\TreeView.cpp"/>
</Folder>
<Folder name="AboutDlg">
</Folder>
<File name="D:\source\notepad++\trunk\PowerEditor\src\WinControls\Window.h"/>
<File name="D:\source\notepad++\trunk\PowerEditor\src\WinControls\WindowInterface.h"/>
</Folder>
<File name="D:\source\notepad++\trunk\PowerEditor\src\Notepad_plus.h"/>
<File name="D:\source\notepad++\trunk\PowerEditor\src\Notepad_plus.cpp"/>
<File name="D:\source\notepad++\trunk\PowerEditor\src\Notepad_plus.rc"/>
</Folder>
<File name="D:\source\notepad++\trunk\PowerEditor\license.txt"/>
</Folder>
<Folder name="Scintilla">
</Folder>
</Project>
<Project name="Win32 GUP" >
</Project>
</NotepadPlus>