feat: 1. drag to panel address combobox opens the archive/dir; 2. mouse forward/backward key nav

This commit is contained in:
shunf4
2024-05-11 00:29:54 +08:00
parent ceda12136d
commit 7c6d4e7757
5 changed files with 65 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
#include "StdAfx.h"
#include <windowsx.h>
#include <winuser.h>
#include "../../../Common/IntToString.h"
#include "../../../Common/StringConvert.h"
@@ -190,6 +191,23 @@ LRESULT CMyListView::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
// return 0;
}
*/
else if (message == WM_APPCOMMAND)
{
short p = GET_APPCOMMAND_LPARAM(lParam);
if (p == APPCOMMAND_BROWSER_BACKWARD) {
_panel->OpenParentFolder();
return 0;
}
if (p == APPCOMMAND_BROWSER_FORWARD) {
UStringVector folderHistory;
_panel->_appState->FolderHistory.GetList(folderHistory);
if (folderHistory.Size() >= 2) {
const UString x = folderHistory[1];
_panel->BindToPathAndRefresh(x);
}
return 0;
}
}
else if (message == WM_KEYDOWN)
{
bool alt = IsKeyDown(VK_MENU);