[BUG_FIXED] Restore normal window while exiting if PostIt mode is active.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@372 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
bc95071907
commit
90420137f6
|
@ -3563,13 +3563,15 @@ void Notepad_plus::command(int id)
|
||||||
|
|
||||||
if (!_beforePostIt.isAlwaysOnTop)
|
if (!_beforePostIt.isAlwaysOnTop)
|
||||||
::SendMessage(_hSelf, WM_COMMAND, IDM_VIEW_ALWAYSONTOP, 0);
|
::SendMessage(_hSelf, WM_COMMAND, IDM_VIEW_ALWAYSONTOP, 0);
|
||||||
|
|
||||||
|
_beforePostIt.isPostIt = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else // PostIt
|
else // PostIt
|
||||||
{
|
{
|
||||||
NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI();
|
NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI();
|
||||||
// get current status before switch to postIt
|
// get current status before switch to postIt
|
||||||
_beforePostIt.isPostIt = false;
|
_beforePostIt.isPostIt = true;
|
||||||
_beforePostIt.isSizable = true;
|
_beforePostIt.isSizable = true;
|
||||||
_beforePostIt.isAlwaysOnTop = ::GetMenuState(_mainMenuHandle, IDM_VIEW_ALWAYSONTOP, MF_BYCOMMAND) == MF_CHECKED;
|
_beforePostIt.isAlwaysOnTop = ::GetMenuState(_mainMenuHandle, IDM_VIEW_ALWAYSONTOP, MF_BYCOMMAND) == MF_CHECKED;
|
||||||
_beforePostIt.isMenuShown = ::SendMessage(_hSelf, NPPM_ISMENUHIDDEN, 0, 0) != TRUE;
|
_beforePostIt.isMenuShown = ::SendMessage(_hSelf, NPPM_ISMENUHIDDEN, 0, 0) != TRUE;
|
||||||
|
@ -7934,7 +7936,10 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_isfullScreen) //closing, return to windowed mode
|
if (_isfullScreen) //closing, return to windowed mode
|
||||||
fullScreenToggle();
|
fullScreenToggle();
|
||||||
|
|
||||||
|
if (_beforePostIt.isPostIt)
|
||||||
|
::SendMessage(_hSelf, WM_COMMAND, IDM_VIEW_POSTIT, 0);
|
||||||
|
|
||||||
if (_configStyleDlg.isCreated() && ::IsWindowVisible(_configStyleDlg.getHSelf()))
|
if (_configStyleDlg.isCreated() && ::IsWindowVisible(_configStyleDlg.getHSelf()))
|
||||||
_configStyleDlg.restoreGlobalOverrideValues();
|
_configStyleDlg.restoreGlobalOverrideValues();
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
#define IDM_VIEW_LOCKTABBAR (IDM_VIEW + 6)
|
#define IDM_VIEW_LOCKTABBAR (IDM_VIEW + 6)
|
||||||
#define IDM_VIEW_DRAWTABBAR_TOPBAR (IDM_VIEW + 7)
|
#define IDM_VIEW_DRAWTABBAR_TOPBAR (IDM_VIEW + 7)
|
||||||
#define IDM_VIEW_DRAWTABBAR_INACIVETAB (IDM_VIEW + 8)
|
#define IDM_VIEW_DRAWTABBAR_INACIVETAB (IDM_VIEW + 8)
|
||||||
//#define IDM_VIEW_STATUSBAR (IDM_VIEW + 9)
|
#define IDM_VIEW_POSTIT (IDM_VIEW + 9)
|
||||||
#define IDM_VIEW_TOGGLE_FOLDALL (IDM_VIEW + 10)
|
#define IDM_VIEW_TOGGLE_FOLDALL (IDM_VIEW + 10)
|
||||||
#define IDM_VIEW_USER_DLG (IDM_VIEW + 11)
|
#define IDM_VIEW_USER_DLG (IDM_VIEW + 11)
|
||||||
#define IDM_VIEW_LINENUMBER (IDM_VIEW + 12)
|
#define IDM_VIEW_LINENUMBER (IDM_VIEW + 12)
|
||||||
|
@ -155,8 +155,7 @@
|
||||||
#define IDM_VIEW_HIDELINES (IDM_VIEW + 42)
|
#define IDM_VIEW_HIDELINES (IDM_VIEW + 42)
|
||||||
#define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43)
|
#define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43)
|
||||||
#define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44)
|
#define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44)
|
||||||
//#define IDM_VIEW_HIDEMENU (IDM_VIEW + 45)
|
|
||||||
#define IDM_VIEW_POSTIT (IDM_VIEW + 46)
|
|
||||||
|
|
||||||
#define IDM_VIEW_FOLD (IDM_VIEW + 50)
|
#define IDM_VIEW_FOLD (IDM_VIEW + 50)
|
||||||
#define IDM_VIEW_FOLD_1 (IDM_VIEW_FOLD + 1)
|
#define IDM_VIEW_FOLD_1 (IDM_VIEW_FOLD + 1)
|
||||||
|
|
Loading…
Reference in New Issue