[RELEASE_47] 4.7 release.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@92 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2007-12-31 03:37:19 +00:00
parent 6edeeff8d7
commit 53a40b7ffe
8 changed files with 904 additions and 874 deletions

View File

@ -650,9 +650,9 @@ SubSection "Plugins" Plugins
SectionEnd SectionEnd
*/ */
Section "File Browser" FileBrowser Section "File Browser" FileBrowser
Delete "$INSTDIR\plugins\LightExplorer.dll" Delete "$INSTDIR\plugins\Explorer.dll"
SetOutPath "$INSTDIR\plugins" SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\LightExplorer.dll" File "..\bin\plugins\Explorer.dll"
SectionEnd SectionEnd
Section "Hex Editor" HexEditor Section "Hex Editor" HexEditor
@ -676,13 +676,13 @@ SubSection "Plugins" Plugins
File "..\bin\ConvertExt.lng" File "..\bin\ConvertExt.lng"
SectionEnd SectionEnd
*/ */
/*
Section "Spell-Checker" SpellChecker Section "Spell-Checker" SpellChecker
Delete "$INSTDIR\plugins\SpellChecker.dll" Delete "$INSTDIR\plugins\SpellChecker.dll"
SetOutPath "$INSTDIR\plugins" SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\SpellChecker.dll" File "..\bin\plugins\SpellChecker.dll"
SectionEnd SectionEnd
*/
Section "NppExec" NppExec Section "NppExec" NppExec
Delete "$INSTDIR\plugins\NppExec.dll" Delete "$INSTDIR\plugins\NppExec.dll"
SetOutPath "$INSTDIR\plugins" SetOutPath "$INSTDIR\plugins"
@ -707,7 +707,19 @@ SubSection "Plugins" Plugins
SetOutPath "$INSTDIR\plugins" SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\NppTools.dll" File "..\bin\plugins\NppTools.dll"
SectionEnd SectionEnd
Section "FTP synchronize" FTP_synchronize
Delete "$INSTDIR\plugins\FTP_synchronizeA.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\FTP_synchronizeA.dll"
SectionEnd
Section "NppExport" NppExport
Delete "$INSTDIR\plugins\NppExport.dll"
SetOutPath "$INSTDIR\plugins"
File "..\bin\plugins\NppExport.dll"
SectionEnd
SubSectionEnd SubSectionEnd
Section /o "As default html viewer" htmlViewer Section /o "As default html viewer" htmlViewer
@ -859,8 +871,8 @@ SubSection un.Plugins
SectionEnd SectionEnd
*/ */
Section un.FileBrowser Section un.FileBrowser
Delete "$INSTDIR\plugins\LightExplorer.dll" Delete "$INSTDIR\plugins\Explorer.dll"
Delete "$INSTDIR\lightExplorer.ini" Delete "$INSTDIR\Explorer.ini"
RMDir "$INSTDIR\plugins\" RMDir "$INSTDIR\plugins\"
SectionEnd SectionEnd
@ -882,12 +894,12 @@ SubSection un.Plugins
RMDir "$INSTDIR\plugins\" RMDir "$INSTDIR\plugins\"
SectionEnd SectionEnd
*/ */
/*
Section un.SpellChecker Section un.SpellChecker
Delete "$INSTDIR\plugins\SpellChecker.dll" Delete "$INSTDIR\plugins\SpellChecker.dll"
RMDir "$INSTDIR\plugins\" RMDir "$INSTDIR\plugins\"
SectionEnd SectionEnd
*/
Section un.NppExec Section un.NppExec
Delete "$INSTDIR\plugins\NppExec.dll" Delete "$INSTDIR\plugins\NppExec.dll"
Delete "$INSTDIR\plugins\doc\NppExec.txt" Delete "$INSTDIR\plugins\doc\NppExec.txt"
@ -907,7 +919,16 @@ SubSection un.Plugins
Delete "$INSTDIR\plugins\NppTools.dll" Delete "$INSTDIR\plugins\NppTools.dll"
RMDir "$INSTDIR\plugins\" RMDir "$INSTDIR\plugins\"
SectionEnd SectionEnd
Section un.FTP_synchronize
Delete "$INSTDIR\plugins\FTP_synchronizeA.dll"
RMDir "$INSTDIR\plugins\"
SectionEnd
Section un.NppExport
Delete "$INSTDIR\plugins\NppExport.dll"
RMDir "$INSTDIR\plugins\"
SectionEnd
SubSectionEnd SubSectionEnd
Section un.htmlViewer Section un.htmlViewer

View File

@ -7144,8 +7144,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
bool oldVal = _mainDocTab.setHideTabBarStatus(hide); bool oldVal = _mainDocTab.setHideTabBarStatus(hide);
_subDocTab.setHideTabBarStatus(hide); _subDocTab.setHideTabBarStatus(hide);
::SendMessage(_hSelf, WM_SIZE, 0, 0); ::SendMessage(_hSelf, WM_SIZE, 0, 0);
::ShowWindow(_mainDocTab.getHSelf(), hide?SW_HIDE:SW_SHOW); ::ShowWindow(_mainDocTab.getHSelf(), hide?SW_FORCEMINIMIZE:SW_SHOW);
::ShowWindow(_subDocTab.getHSelf(), hide?SW_HIDE:SW_SHOW); ::ShowWindow(_subDocTab.getHSelf(), hide?SW_FORCEMINIMIZE:SW_SHOW);
return oldVal; return oldVal;
} }

View File

@ -131,10 +131,10 @@ public:
void getTaskListInfo(TaskListInfo *tli); void getTaskListInfo(TaskListInfo *tli);
// For filtering the modeless Dialog message // For filtering the modeless Dialog message
bool isDlgsMsg(MSG *msg) const { bool isDlgsMsg(MSG *msg, bool unicodeSupported) const {
for (size_t i = 0; i < _hModelessDlgs.size(); i++) for (size_t i = 0; i < _hModelessDlgs.size(); i++)
{ {
if (::IsDialogMessageW(_hModelessDlgs[i], msg)) if (unicodeSupported?(::IsDialogMessageW(_hModelessDlgs[i], msg)):(::IsDialogMessageA(_hModelessDlgs[i], msg)))
return true; return true;
} }

View File

@ -717,36 +717,33 @@ bool NppParameters::getSessionFromXmlTree(TiXmlDocument *pSessionDoc, Session *p
childNode ; childNode ;
childNode = childNode->NextSibling("File") ) childNode = childNode->NextSibling("File") )
{ {
TiXmlNode *fnNode = childNode->FirstChild(); const char *fileName = (childNode->ToElement())->Attribute("filename");
if (fnNode) if (fileName)
{ {
const char *fileName = fnNode->Value();
if (fileName) Position position;
(childNode->ToElement())->Attribute("firstVisibleLine", &position._firstVisibleLine);
(childNode->ToElement())->Attribute("xOffset", &position._xOffset);
(childNode->ToElement())->Attribute("startPos", &position._startPos);
(childNode->ToElement())->Attribute("endPos", &position._endPos);
(childNode->ToElement())->Attribute("selMode", &position._selMode);
const char *langName;
langName = (childNode->ToElement())->Attribute( "lang" );
sessionFileInfo sfi( fileName, langName, position );
for (TiXmlNode *markNode = childNode->NextSibling("Mark");
markNode ;
markNode = markNode->NextSibling("Mark") )
{ {
Position position; int lineNumber;
(childNode->ToElement())->Attribute("firstVisibleLine", &position._firstVisibleLine); const char *lineNumberStr = (markNode->ToElement())->Attribute("line", &lineNumber);
(childNode->ToElement())->Attribute("xOffset", &position._xOffset); if (lineNumberStr)
(childNode->ToElement())->Attribute("startPos", &position._startPos);
(childNode->ToElement())->Attribute("endPos", &position._endPos);
(childNode->ToElement())->Attribute("selMode", &position._selMode);
const char *langName;
langName = (childNode->ToElement())->Attribute( "lang" );
sessionFileInfo sfi( fileName, langName, position );
for (TiXmlNode *markNode = fnNode->NextSibling("Mark");
markNode ;
markNode = markNode->NextSibling("Mark") )
{ {
int lineNumber; sfi.marks.push_back(lineNumber);
const char *lineNumberStr = (markNode->ToElement())->Attribute("line", &lineNumber);
if (lineNumberStr)
{
sfi.marks.push_back(lineNumber);
}
} }
(*ptrSession)._subViewFiles.push_back(sfi);
} }
(*ptrSession)._subViewFiles.push_back(sfi);
} }
} }
} }
@ -1162,8 +1159,7 @@ void NppParameters::writeSession(const Session & session, const char *fileName)
(fileNameNode->ToElement())->SetAttribute("selMode", session._subViewFiles[i]._selMode); (fileNameNode->ToElement())->SetAttribute("selMode", session._subViewFiles[i]._selMode);
(fileNameNode->ToElement())->SetAttribute("lang", session._subViewFiles[i]._langName.c_str()); (fileNameNode->ToElement())->SetAttribute("lang", session._subViewFiles[i]._langName.c_str());
TiXmlText fileNameFullPath(session._subViewFiles[i]._fileName.c_str()); (fileNameNode->ToElement())->SetAttribute("filename", session._mainViewFiles[i]._fileName.c_str());
fileNameNode->InsertEndChild(fileNameFullPath);
for (size_t j = 0 ; j < session._subViewFiles[i].marks.size() ; j++) for (size_t j = 0 ; j < session._subViewFiles[i].marks.size() ; j++)
{ {
size_t markLine = session._subViewFiles[i].marks[j]; size_t markLine = session._subViewFiles[i].marks[j];

View File

@ -67,34 +67,6 @@ void TabBar::init(HINSTANCE hInst, HWND parent, bool isVertical, bool isTraditio
systemMessage("System Err"); systemMessage("System Err");
throw int(69); throw int(69);
} }
/*
if (!_isTraditional)
{
if (!_hwndArray[_nbCtrl])
{
_hwndArray[_nbCtrl] = _hSelf;
_ctrlID = _nbCtrl;
}
else
{
int i = 0;
bool found = false;
for ( ; i < nbCtrlMax && !found ; i++)
if (!_hwndArray[i])
found = true;
if (!found)
{
_ctrlID = -1;
::MessageBox(NULL, "The nb of Tab Control is over its limit", "Tab Control err", MB_OK);
destroy();
throw int(96);
}
_hwndArray[i] = _hSelf;
_ctrlID = i;
}
_nbCtrl++;
}
*/
} }
int TabBar::insertAtEnd(const char *subTabName) int TabBar::insertAtEnd(const char *subTabName)

File diff suppressed because one or more lines are too long

View File

@ -251,21 +251,30 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh
} }
notepad_plus_plus.init(hInstance, NULL, pPathNames, &cmdLineParams); notepad_plus_plus.init(hInstance, NULL, pPathNames, &cmdLineParams);
while (::GetMessageW(&msg, NULL, 0, 0)) bool unicodeSupported = notepad_plus_plus.getWinVersion() >= WV_NT;
bool going = true;
while (going)
{ {
// if the message doesn't belong to the notepad_plus_plus's dialog going = unicodeSupported?(::GetMessageW(&msg, NULL, 0, 0)):(::GetMessageA(&msg, NULL, 0, 0));
if (!notepad_plus_plus.isDlgsMsg(&msg)) if (going)
{ {
if (::TranslateAccelerator(notepad_plus_plus.getHSelf(), notepad_plus_plus.getAccTable(), &msg) == 0) // if the message doesn't belong to the notepad_plus_plus's dialog
if (!notepad_plus_plus.isDlgsMsg(&msg, unicodeSupported))
{ {
try { if (::TranslateAccelerator(notepad_plus_plus.getHSelf(), notepad_plus_plus.getAccTable(), &msg) == 0)
::TranslateMessage(&msg); {
::DispatchMessageW(&msg); try {
} catch(std::exception ex) { ::TranslateMessage(&msg);
::MessageBox(NULL, ex.what(), "Exception", MB_OK); if (unicodeSupported)
} catch(...) { ::DispatchMessageW(&msg);
systemMessage("System Error"); else
} ::DispatchMessage(&msg);
} catch(std::exception ex) {
::MessageBox(NULL, ex.what(), "Exception", MB_OK);
} catch(...) {
systemMessage("System Error");
}
}
} }
} }
} }

File diff suppressed because it is too large Load Diff