Make "Clipboard History" and "Character Panel" togglable

Make "Clipboard History" and "Character Panel" have the same behaviour of the other dockable panels.

Fix #9094, fix #9078, close #9096, close #9079
This commit is contained in:
Don HO 2020-11-02 20:46:52 +01:00
parent 2aac88e3b1
commit cfe3f3b64c
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -37,6 +37,8 @@
#include "functionListPanel.h"
#include "ProjectPanel.h"
#include "fileBrowser.h"
#include "clipboardHistoryPanel.h"
#include "ansiCharPanel.h"
#include "Sorters.h"
#include "verifySignedfile.h"
#include "md5.h"
@ -698,13 +700,35 @@ void Notepad_plus::command(int id)
case IDM_EDIT_CHAR_PANEL:
{
if (_pAnsiCharPanel && (!_pAnsiCharPanel->isClosed()))
{
_pAnsiCharPanel->display(false);
_pAnsiCharPanel->setClosed(true);
checkMenuItem(IDM_EDIT_CHAR_PANEL, false);
}
else
{
checkMenuItem(IDM_EDIT_CHAR_PANEL, true);
launchAnsiCharPanel();
_pAnsiCharPanel->setClosed(false);
}
}
break;
case IDM_EDIT_CLIPBOARDHISTORY_PANEL:
{
if (_pClipboardHistoryPanel && (!_pClipboardHistoryPanel->isClosed()))
{
_pClipboardHistoryPanel->display(false);
_pClipboardHistoryPanel->setClosed(true);
checkMenuItem(IDM_EDIT_CLIPBOARDHISTORY_PANEL, false);
}
else
{
checkMenuItem(IDM_EDIT_CLIPBOARDHISTORY_PANEL, true);
launchClipboardHistoryPanel();
_pClipboardHistoryPanel->setClosed(false);
}
}
break;