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:
@@ -84,6 +84,7 @@ static void ConvertSizeToString(UInt64 val, wchar_t *s) throw()
|
||||
*s = 0;
|
||||
}
|
||||
|
||||
UString ConvertSizeToString(UInt64 value);
|
||||
UString ConvertSizeToString(UInt64 value)
|
||||
{
|
||||
wchar_t s[32];
|
||||
@@ -110,6 +111,7 @@ static void HexToString(char *dest, const Byte *data, UInt32 size)
|
||||
}
|
||||
*/
|
||||
|
||||
bool IsSizeProp(UINT propID) throw();
|
||||
bool IsSizeProp(UINT propID) throw()
|
||||
{
|
||||
switch (propID)
|
||||
@@ -141,12 +143,39 @@ bool IsSizeProp(UINT propID) throw()
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#include <stdio.h>
|
||||
|
||||
UInt64 GetCpuTicks()
|
||||
{
|
||||
#ifdef _WIN64
|
||||
return __rdtsc();
|
||||
#else
|
||||
UInt32 lowVal, highVal;
|
||||
__asm RDTSC;
|
||||
__asm mov lowVal, EAX;
|
||||
__asm mov highVal, EDX;
|
||||
return ((UInt64)highVal << 32) | lowVal;
|
||||
#endif
|
||||
}
|
||||
|
||||
UInt32 g_NumGroups;
|
||||
UInt64 g_start_tick;
|
||||
UInt64 g_prev_tick;
|
||||
DWORD g_Num_SetItemText;
|
||||
UInt32 g_NumMessages;
|
||||
*/
|
||||
|
||||
LRESULT CPanel::SetItemText(LVITEMW &item)
|
||||
{
|
||||
if (_dontShowMode)
|
||||
return 0;
|
||||
UInt32 realIndex = GetRealIndex(item);
|
||||
|
||||
// g_Num_SetItemText++;
|
||||
|
||||
/*
|
||||
if ((item.mask & LVIF_IMAGE) != 0)
|
||||
{
|
||||
@@ -190,7 +219,7 @@ LRESULT CPanel::SetItemText(LVITEMW &item)
|
||||
const CPropColumn &property = _visibleColumns[item.iSubItem];
|
||||
PROPID propID = property.ID;
|
||||
|
||||
if (realIndex == kParentIndex)
|
||||
if (realIndex == kParentIndex_UInt32)
|
||||
{
|
||||
if (propID == kpidName)
|
||||
{
|
||||
@@ -204,7 +233,52 @@ LRESULT CPanel::SetItemText(LVITEMW &item)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// List-view in report-view in Windows 10 is slow (50+ ms) for page change.
|
||||
// that code shows the time of page reload for items
|
||||
// if you know how to improve the speed of list view refresh, notify 7-Zip developer
|
||||
|
||||
// if (propID == 2000)
|
||||
// if (propID == kpidName)
|
||||
{
|
||||
// debug column;
|
||||
// DWORD dw = GetCpuTicks();
|
||||
UInt64 dw = GetCpuTicks();
|
||||
UInt64 deltaLast = dw - g_prev_tick;
|
||||
#define conv_ticks(t) ((unsigned)((t) / 100000))
|
||||
if (deltaLast > 1000u * 1000 * 1000)
|
||||
{
|
||||
UInt64 deltaFull = g_prev_tick - g_start_tick;
|
||||
char s[128];
|
||||
sprintf(s, "%d", conv_ticks(deltaFull));
|
||||
OutputDebugStringA(s);
|
||||
g_start_tick = dw;
|
||||
g_NumGroups++;
|
||||
}
|
||||
g_prev_tick = dw;
|
||||
UString u;
|
||||
char s[128];
|
||||
UInt64 deltaFull = dw - g_start_tick;
|
||||
// for (int i = 0; i < 100000; i++)
|
||||
sprintf(s, "%d %d %d-%d ", g_NumMessages, g_Num_SetItemText, g_NumGroups, conv_ticks(deltaFull));
|
||||
// sprintf(s, "%d-%d ", g_NumGroups, conv_ticks(deltaFull));
|
||||
u = s;
|
||||
lstrcpyW(text, u.Ptr());
|
||||
text += u.Len();
|
||||
|
||||
// dw = GetCpuTicks();
|
||||
// deltaFull = dw - g_prev_tick;
|
||||
// sprintf(s, "-%d ", conv_ticks(deltaFull));
|
||||
// u = s;
|
||||
// lstrcpyW(text, u.Ptr());
|
||||
// text += u.Len();
|
||||
|
||||
if (propID != kpidName)
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
if (property.IsRawProp)
|
||||
{
|
||||
const void *data;
|
||||
@@ -525,9 +599,15 @@ bool CPanel::OnNotifyList(LPNMHDR header, LRESULT &result)
|
||||
//is the sub-item information being requested?
|
||||
|
||||
if ((dispInfo->item.mask & LVIF_TEXT) != 0 ||
|
||||
(dispInfo->item.mask & LVIF_IMAGE) != 0)
|
||||
(dispInfo->item.mask & LVIF_IMAGE) != 0)
|
||||
SetItemText(dispInfo->item);
|
||||
return false;
|
||||
{
|
||||
// 20.03:
|
||||
result = 0;
|
||||
return true;
|
||||
// old 7-Zip:
|
||||
// return false;
|
||||
}
|
||||
}
|
||||
case LVN_KEYDOWN:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user