[BUG_FIXED] Fix Doc Switcher logic bug.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@789 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
bd28e3bfa7
commit
b1e3ca6aba
|
@ -20,6 +20,7 @@
|
|||
#include "TaskListDlg.h"
|
||||
#include "ImageListSet.h"
|
||||
#include "ShortcutMapper.h"
|
||||
#include "VerticalFileSwitcher.h"
|
||||
|
||||
struct SortTaskListPred
|
||||
{
|
||||
|
@ -1811,7 +1812,17 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||
|
||||
case NPPM_SHOWDOCSWITCHER:
|
||||
{
|
||||
launchFileSwitcherPanel();
|
||||
BOOL toShow = lParam;
|
||||
if (toShow)
|
||||
{
|
||||
if (!_pFileSwitcherPanel || !_pFileSwitcherPanel->isVisible())
|
||||
launchFileSwitcherPanel();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_pFileSwitcherPanel)
|
||||
_pFileSwitcherPanel->display(false);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ BOOL CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
|||
::SendDlgItemMessage(_hSelf, IDC_CHECK_HIDEMENUBAR, BM_SETCHECK, !showMenu, 0);
|
||||
|
||||
bool showDocSwitcher = ::SendMessage(::GetParent(_hParent), NPPM_ISDOCSWITCHERSHOWN, 0, 0) == TRUE;
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_DOCSWITCH, BM_SETCHECK, !showDocSwitcher, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_DOCSWITCH, BM_SETCHECK, showDocSwitcher, 0);
|
||||
|
||||
#ifndef UNICODE
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_LOCALIZATION_GB_STATIC), FALSE);
|
||||
|
@ -273,7 +273,7 @@ BOOL CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM)
|
|||
case IDC_CHECK_DOCSWITCH :
|
||||
{
|
||||
bool isChecked = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_DOCSWITCH, BM_GETCHECK, 0, 0));
|
||||
::SendMessage(::GetParent(_hParent), NPPM_SHOWDOCSWITCHER, 0, isChecked?FALSE:TRUE);
|
||||
::SendMessage(::GetParent(_hParent), NPPM_SHOWDOCSWITCHER, 0, isChecked?TRUE:FALSE);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue