mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
[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
This commit is contained in:
parent
f2db20fc30
commit
aa3797eadd
@ -1108,8 +1108,6 @@ void NppParameters::destroyInstance()
|
|||||||
{
|
{
|
||||||
if (_pXmlDoc != NULL)
|
if (_pXmlDoc != NULL)
|
||||||
{
|
{
|
||||||
if (_pXmlDoc->isDirty())
|
|
||||||
_pXmlDoc->SaveFile();
|
|
||||||
delete _pXmlDoc;
|
delete _pXmlDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4978,7 +4976,7 @@ bool NppParameters::insertTabInfo(const TCHAR *langName, int tabInfo)
|
|||||||
if (nm && lstrcmp(langName, nm) == 0)
|
if (nm && lstrcmp(langName, nm) == 0)
|
||||||
{
|
{
|
||||||
childNode->ToElement()->SetAttribute(TEXT("tabSettings"), tabInfo);
|
childNode->ToElement()->SetAttribute(TEXT("tabSettings"), tabInfo);
|
||||||
_pXmlDoc->makeDirty();
|
_pXmlDoc->SaveFile();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1095,13 +1095,6 @@ public:
|
|||||||
virtual void Print( FILE* cfile, int depth = 0 ) const;
|
virtual void Print( FILE* cfile, int depth = 0 ) const;
|
||||||
// [internal use]
|
// [internal use]
|
||||||
void SetError( int err, const TCHAR* errorLocation, TiXmlParsingData* prevData );
|
void SetError( int err, const TCHAR* errorLocation, TiXmlParsingData* prevData );
|
||||||
void makeDirty() {
|
|
||||||
_isDirty = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool isDirty() const {
|
|
||||||
return _isDirty;
|
|
||||||
};
|
|
||||||
|
|
||||||
protected :
|
protected :
|
||||||
virtual void StreamOut ( TIXML_OSTREAM * out) const;
|
virtual void StreamOut ( TIXML_OSTREAM * out) const;
|
||||||
@ -1117,7 +1110,6 @@ private:
|
|||||||
TIXML_STRING errorDesc;
|
TIXML_STRING errorDesc;
|
||||||
int tabsize;
|
int tabsize;
|
||||||
TiXmlCursor errorLocation;
|
TiXmlCursor errorLocation;
|
||||||
bool _isDirty;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1215,8 +1215,7 @@ BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara
|
|||||||
ValueDlg tabSizeDlg;
|
ValueDlg tabSizeDlg;
|
||||||
tabSizeDlg.init(_hInst, _hParent, nppGUI._tabSize, TEXT("Tab Size : "));
|
tabSizeDlg.init(_hInst, _hParent, nppGUI._tabSize, TEXT("Tab Size : "));
|
||||||
POINT p;
|
POINT p;
|
||||||
::GetCursorPos(&p);//::GetParent(::GetParent(_hParent))
|
::GetCursorPos(&p);
|
||||||
//::ScreenToClient(NULL, &p);
|
|
||||||
int size = tabSizeDlg.doDialog(p);
|
int size = tabSizeDlg.doDialog(p);
|
||||||
if (size == -1) return FALSE;
|
if (size == -1) return FALSE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user