mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 23:14:54 -06:00
Update to 7-Zip Version 21.02
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include <Windowsx.h>
|
||||
#include <WindowsX.h>
|
||||
// #include <stdio.h>
|
||||
|
||||
#include "../../../Common/IntToString.h"
|
||||
@@ -62,7 +62,7 @@ CPanel::~CPanel()
|
||||
CloseOpenFolders();
|
||||
}
|
||||
|
||||
HWND CPanel::GetParent()
|
||||
HWND CPanel::GetParent() const
|
||||
{
|
||||
HWND h = CWindow2::GetParent();
|
||||
return (h == 0) ? _mainWindow : h;
|
||||
@@ -76,7 +76,7 @@ HRESULT CPanel::Create(HWND mainWindow, HWND parentWindow, UINT id,
|
||||
const UString &arcFormat,
|
||||
CPanelCallback *panelCallback, CAppState *appState,
|
||||
bool needOpenArc,
|
||||
bool &archiveIsOpened, bool &encrypted)
|
||||
COpenResult &openRes)
|
||||
{
|
||||
_mainWindow = mainWindow;
|
||||
_processTimer = true;
|
||||
@@ -100,9 +100,9 @@ HRESULT CPanel::Create(HWND mainWindow, HWND parentWindow, UINT id,
|
||||
cfp = fs2us(cfpF);
|
||||
}
|
||||
|
||||
RINOK(BindToPath(cfp, arcFormat, archiveIsOpened, encrypted));
|
||||
RINOK(BindToPath(cfp, arcFormat, openRes));
|
||||
|
||||
if (needOpenArc && !archiveIsOpened)
|
||||
if (needOpenArc && !openRes.ArchiveIsOpened)
|
||||
return S_OK;
|
||||
|
||||
if (!CreateEx(0, kClassName, 0, WS_CHILD | WS_VISIBLE,
|
||||
@@ -114,8 +114,11 @@ HRESULT CPanel::Create(HWND mainWindow, HWND parentWindow, UINT id,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// extern UInt32 g_NumMessages;
|
||||
|
||||
LRESULT CPanel::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// g_NumMessages++;
|
||||
switch (message)
|
||||
{
|
||||
case kShiftSelectMessage:
|
||||
@@ -309,7 +312,7 @@ LRESULT CMyComboBoxEdit::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
bool shift = IsKeyDown(VK_SHIFT);
|
||||
if (!alt && !ctrl && !shift)
|
||||
{
|
||||
g_App.SwitchOnOffOnePanel();;
|
||||
g_App.SwitchOnOffOnePanel();
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@@ -340,7 +343,7 @@ bool CPanel::OnCreate(CREATESTRUCT * /* createStruct */)
|
||||
_ascending = true;
|
||||
_lastFocusedIsList = true;
|
||||
|
||||
DWORD style = WS_CHILD | WS_VISIBLE; // | WS_BORDER ; // | LVS_SHAREIMAGELISTS; // | LVS_SHOWSELALWAYS;;
|
||||
DWORD style = WS_CHILD | WS_VISIBLE; // | WS_BORDER ; // | LVS_SHAREIMAGELISTS; // | LVS_SHOWSELALWAYS;
|
||||
|
||||
style |= LVS_SHAREIMAGELISTS;
|
||||
// style |= LVS_AUTOARRANGE;
|
||||
@@ -396,7 +399,7 @@ bool CPanel::OnCreate(CREATESTRUCT * /* createStruct */)
|
||||
TBBUTTON tbb [ ] =
|
||||
{
|
||||
// {0, 0, TBSTATE_ENABLED, BTNS_SEP, 0L, 0},
|
||||
{VIEW_PARENTFOLDER, kParentFolderID, TBSTATE_ENABLED, BTNS_BUTTON, 0L, 0},
|
||||
{VIEW_PARENTFOLDER, kParentFolderID, TBSTATE_ENABLED, BTNS_BUTTON, { 0, 0 }, 0, 0 },
|
||||
// {0, 0, TBSTATE_ENABLED, BTNS_SEP, 0L, 0},
|
||||
// {VIEW_NEWFOLDER, kCreateFolderID, TBSTATE_ENABLED, BTNS_BUTTON, 0L, 0},
|
||||
};
|
||||
@@ -667,9 +670,14 @@ bool CPanel::OnNotify(UINT /* controlID */, LPNMHDR header, LRESULT &result)
|
||||
return OnNotifyReBar(header, result);
|
||||
else if (header->hwndFrom == _listView)
|
||||
return OnNotifyList(header, result);
|
||||
else if (::GetParent(header->hwndFrom) == _listView &&
|
||||
header->code == NM_RCLICK)
|
||||
return OnRightClick((MY_NMLISTVIEW_NMITEMACTIVATE *)header, result);
|
||||
else if (::GetParent(header->hwndFrom) == _listView)
|
||||
{
|
||||
// NMHDR:code is UINT
|
||||
// NM_RCLICK is unsigned in windows sdk
|
||||
// NM_RCLICK is int in MinGW
|
||||
if (header->code == (UINT)NM_RCLICK)
|
||||
return OnRightClick((MY_NMLISTVIEW_NMITEMACTIVATE *)header, result);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -903,8 +911,8 @@ static UString GetSubFolderNameForExtract2(const UString &arcPath)
|
||||
UString name = arcPath;
|
||||
if (slashPos >= 0)
|
||||
{
|
||||
s = arcPath.Left(slashPos + 1);
|
||||
name = arcPath.Ptr(slashPos + 1);
|
||||
s = arcPath.Left((unsigned)(slashPos + 1));
|
||||
name = arcPath.Ptr((unsigned)(slashPos + 1));
|
||||
}
|
||||
s += GetSubFolderNameForExtract(name);
|
||||
return s;
|
||||
@@ -967,7 +975,8 @@ static void AddValuePair(UINT resourceID, UInt64 value, UString &s)
|
||||
s += sz;
|
||||
s.Add_LF();
|
||||
}
|
||||
*/
|
||||
|
||||
// now we don't need CThreadTest, since now we call CopyTo for "test command
|
||||
|
||||
class CThreadTest: public CProgressThreadVirt
|
||||
{
|
||||
@@ -979,9 +988,6 @@ public:
|
||||
CMyComPtr<IArchiveFolder> ArchiveFolder;
|
||||
};
|
||||
|
||||
// actually now we don't need CThreadTest, since now we call CopyTo for "test command
|
||||
|
||||
/*
|
||||
HRESULT CThreadTest::ProcessVirt()
|
||||
{
|
||||
RINOK(ArchiveFolder->Extract(&Indices[0], Indices.Size(),
|
||||
@@ -1005,9 +1011,7 @@ HRESULT CThreadTest::ProcessVirt()
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
static void AddSizePair(UInt32 langID, UInt64 value, UString &s)
|
||||
{
|
||||
char sz[32];
|
||||
|
||||
Reference in New Issue
Block a user