[BUG_FIXED] Fix langs.xml 0 length problem while user ends session w/o closing Notepad++.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@725 f5eea248-9336-0410-98b8-ebc06183d4e3
remotes/trunk
Don Ho 2010-12-13 01:11:35 +00:00
parent f2db20fc30
commit aa3797eadd
3 changed files with 2 additions and 13 deletions

View File

@ -1108,8 +1108,6 @@ void NppParameters::destroyInstance()
{
if (_pXmlDoc != NULL)
{
if (_pXmlDoc->isDirty())
_pXmlDoc->SaveFile();
delete _pXmlDoc;
}
@ -4978,7 +4976,7 @@ bool NppParameters::insertTabInfo(const TCHAR *langName, int tabInfo)
if (nm && lstrcmp(langName, nm) == 0)
{
childNode->ToElement()->SetAttribute(TEXT("tabSettings"), tabInfo);
_pXmlDoc->makeDirty();
_pXmlDoc->SaveFile();
return true;
}
}

View File

@ -1095,13 +1095,6 @@ public:
virtual void Print( FILE* cfile, int depth = 0 ) const;
// [internal use]
void SetError( int err, const TCHAR* errorLocation, TiXmlParsingData* prevData );
void makeDirty() {
_isDirty = true;
};
bool isDirty() const {
return _isDirty;
};
protected :
virtual void StreamOut ( TIXML_OSTREAM * out) const;
@ -1117,7 +1110,6 @@ private:
TIXML_STRING errorDesc;
int tabsize;
TiXmlCursor errorLocation;
bool _isDirty;
};

View File

@ -1215,8 +1215,7 @@ BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara
ValueDlg tabSizeDlg;
tabSizeDlg.init(_hInst, _hParent, nppGUI._tabSize, TEXT("Tab Size : "));
POINT p;
::GetCursorPos(&p);//::GetParent(::GetParent(_hParent))
//::ScreenToClient(NULL, &p);
::GetCursorPos(&p);
int size = tabSizeDlg.doDialog(p);
if (size == -1) return FALSE;