mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 23:05:13 +02:00
[NEW_FEATURE] refine the styles configurator : cancel all modifications if the style configurator dialog is not closed while quit Notepad++.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@25 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
315e38d7cd
commit
16d7ca3406
@ -6652,6 +6652,9 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
|
|
||||||
const NppGUI & nppgui = pNppParam->getNppGUI();
|
const NppGUI & nppgui = pNppParam->getNppGUI();
|
||||||
|
|
||||||
|
if (::IsWindowVisible(_configStyleDlg.getHSelf()))
|
||||||
|
_configStyleDlg.restoreGlobalOverrideValues();
|
||||||
|
|
||||||
Session currentSession;
|
Session currentSession;
|
||||||
if (nppgui._rememberLastSession)
|
if (nppgui._rememberLastSession)
|
||||||
getCurrentOpenedFiles(currentSession);
|
getCurrentOpenedFiles(currentSession);
|
||||||
|
@ -402,7 +402,7 @@ private:
|
|||||||
ColumnEditorDlg _colEditorDlg;
|
ColumnEditorDlg _colEditorDlg;
|
||||||
WordStyleDlg _configStyleDlg;
|
WordStyleDlg _configStyleDlg;
|
||||||
PreferenceDlg _preference;
|
PreferenceDlg _preference;
|
||||||
|
|
||||||
// a handle list of all the Notepad++ dialogs
|
// a handle list of all the Notepad++ dialogs
|
||||||
vector<HWND> _hModelessDlgs;
|
vector<HWND> _hModelessDlgs;
|
||||||
|
|
||||||
|
@ -199,11 +199,10 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
|
|||||||
//::MessageBox(NULL, "dirty", "", MB_OK);
|
//::MessageBox(NULL, "dirty", "", MB_OK);
|
||||||
LexerStylerArray & lsArray = (NppParameters::getInstance())->getLStylerArray();
|
LexerStylerArray & lsArray = (NppParameters::getInstance())->getLStylerArray();
|
||||||
StyleArray & globalStyles = (NppParameters::getInstance())->getGlobalStylers();
|
StyleArray & globalStyles = (NppParameters::getInstance())->getGlobalStylers();
|
||||||
GlobalOverride & gOverride = (NppParameters::getInstance())->getGlobalOverrideStyle();
|
|
||||||
|
|
||||||
globalStyles = _globalStyles = _gstyles2restored;
|
globalStyles = _globalStyles = _gstyles2restored;
|
||||||
lsArray = _lsArray = _styles2restored;
|
lsArray = _lsArray = _styles2restored;
|
||||||
gOverride = _gOverride2restored;
|
restoreGlobalOverrideValues();
|
||||||
|
|
||||||
_isDirty = false;
|
_isDirty = false;
|
||||||
setVisualFromStyleList();
|
setVisualFromStyleList();
|
||||||
|
@ -98,6 +98,11 @@ public :
|
|||||||
::InvalidateRect(_hStyleInfoStaticText, NULL, TRUE);
|
::InvalidateRect(_hStyleInfoStaticText, NULL, TRUE);
|
||||||
::UpdateWindow(_hStyleInfoStaticText);
|
::UpdateWindow(_hStyleInfoStaticText);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void restoreGlobalOverrideValues() {
|
||||||
|
GlobalOverride & gOverride = (NppParameters::getInstance())->getGlobalOverrideStyle();
|
||||||
|
gOverride = _gOverride2restored;
|
||||||
|
};
|
||||||
|
|
||||||
void apply();
|
void apply();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user