mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 22:07:07 -06:00
15.08
This commit is contained in:
committed by
Kornel Lesiński
parent
f6444c3256
commit
6543c28020
@@ -277,7 +277,7 @@ bool CBrowseDialog::OnInit()
|
||||
if (!GetParentPath(FilePath, DirPrefix, name))
|
||||
DirPrefix = _topDirPrefix;
|
||||
|
||||
for(;;)
|
||||
for (;;)
|
||||
{
|
||||
UString baseFolder = DirPrefix;
|
||||
if (Reload(baseFolder, name) == S_OK)
|
||||
|
||||
@@ -75,7 +75,7 @@ bool CCopyDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
|
||||
|
||||
bool CCopyDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
switch (buttonID)
|
||||
{
|
||||
case IDB_COPY_SET_PATH:
|
||||
OnButtonSetPath();
|
||||
|
||||
@@ -30,7 +30,7 @@ private:
|
||||
static void DeepCopyFormatEtc(FORMATETC *dest, const FORMATETC *src)
|
||||
{
|
||||
*dest = *src;
|
||||
if(src->ptd)
|
||||
if (src->ptd)
|
||||
{
|
||||
dest->ptd = (DVTARGETDEVICE*)CoTaskMemAlloc(sizeof(DVTARGETDEVICE));
|
||||
*(dest->ptd) = *(src->ptd);
|
||||
@@ -43,20 +43,20 @@ CEnumFormatEtc::CEnumFormatEtc(const FORMATETC *pFormatEtc, ULONG numFormats)
|
||||
m_Index = 0;
|
||||
m_NumFormats = 0;
|
||||
m_Formats = new FORMATETC[numFormats];
|
||||
if(m_Formats)
|
||||
if (m_Formats)
|
||||
{
|
||||
m_NumFormats = numFormats;
|
||||
for(ULONG i = 0; i < numFormats; i++)
|
||||
for (ULONG i = 0; i < numFormats; i++)
|
||||
DeepCopyFormatEtc(&m_Formats[i], &pFormatEtc[i]);
|
||||
}
|
||||
}
|
||||
|
||||
CEnumFormatEtc::~CEnumFormatEtc()
|
||||
{
|
||||
if(m_Formats)
|
||||
if (m_Formats)
|
||||
{
|
||||
for(ULONG i = 0; i < m_NumFormats; i++)
|
||||
if(m_Formats[i].ptd)
|
||||
for (ULONG i = 0; i < m_NumFormats; i++)
|
||||
if (m_Formats[i].ptd)
|
||||
CoTaskMemFree(m_Formats[i].ptd);
|
||||
delete[]m_Formats;
|
||||
}
|
||||
@@ -65,15 +65,15 @@ CEnumFormatEtc::~CEnumFormatEtc()
|
||||
STDMETHODIMP CEnumFormatEtc::Next(ULONG celt, FORMATETC *pFormatEtc, ULONG *pceltFetched)
|
||||
{
|
||||
ULONG copied = 0;
|
||||
if(celt == 0 || pFormatEtc == 0)
|
||||
if (celt == 0 || pFormatEtc == 0)
|
||||
return E_INVALIDARG;
|
||||
while(m_Index < m_NumFormats && copied < celt)
|
||||
while (m_Index < m_NumFormats && copied < celt)
|
||||
{
|
||||
DeepCopyFormatEtc(&pFormatEtc[copied], &m_Formats[m_Index]);
|
||||
copied++;
|
||||
m_Index++;
|
||||
}
|
||||
if(pceltFetched != 0)
|
||||
if (pceltFetched != 0)
|
||||
*pceltFetched = copied;
|
||||
return (copied == celt) ? S_OK : S_FALSE;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ STDMETHODIMP CEnumFormatEtc::Reset(void)
|
||||
STDMETHODIMP CEnumFormatEtc::Clone(IEnumFORMATETC ** ppEnumFormatEtc)
|
||||
{
|
||||
HRESULT hResult = CreateEnumFormatEtc(m_NumFormats, m_Formats, ppEnumFormatEtc);
|
||||
if(hResult == S_OK)
|
||||
if (hResult == S_OK)
|
||||
((CEnumFormatEtc *)*ppEnumFormatEtc)->m_Index = m_Index;
|
||||
return hResult;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ STDMETHODIMP CEnumFormatEtc::Clone(IEnumFORMATETC ** ppEnumFormatEtc)
|
||||
// replacement for SHCreateStdEnumFmtEtc
|
||||
HRESULT CreateEnumFormatEtc(UINT numFormats, const FORMATETC *formats, IEnumFORMATETC **enumFormat)
|
||||
{
|
||||
if(numFormats == 0 || formats == 0 || enumFormat == 0)
|
||||
if (numFormats == 0 || formats == 0 || enumFormat == 0)
|
||||
return E_INVALIDARG;
|
||||
*enumFormat = new CEnumFormatEtc(formats, numFormats);
|
||||
return (*enumFormat) ? S_OK : E_OUTOFMEMORY;
|
||||
|
||||
@@ -100,7 +100,7 @@ static HRESULT CopyFileSpec(CFSTR fromPath, CFSTR toPath, bool writeToDisk, UInt
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const PROPID kProps[] =
|
||||
static const Byte kProps[] =
|
||||
{
|
||||
kpidName,
|
||||
// kpidOutName,
|
||||
|
||||
@@ -52,7 +52,7 @@ bool CFoldersPage::OnInit()
|
||||
int CFoldersPage::GetWorkMode() const
|
||||
{
|
||||
for (int i = 0; i < kNumWorkModeButtons; i++)
|
||||
if(IsButtonCheckedBool(kWorkModeButtons[i]))
|
||||
if (IsButtonCheckedBool(kWorkModeButtons[i]))
|
||||
return i;
|
||||
throw 0;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ bool CFoldersPage::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
ModifiedEvent();
|
||||
return true;
|
||||
}
|
||||
switch(buttonID)
|
||||
switch (buttonID)
|
||||
{
|
||||
case IDB_FOLDERS_WORK_PATH:
|
||||
OnFoldersWorkButtonPath();
|
||||
|
||||
@@ -78,7 +78,7 @@ bool CListViewDialog::OnNotify(UINT /* controlID */, LPNMHDR header)
|
||||
{
|
||||
if (header->hwndFrom != _listView)
|
||||
return false;
|
||||
switch(header->code)
|
||||
switch (header->code)
|
||||
{
|
||||
case LVN_ITEMACTIVATE:
|
||||
if (g_LVN_ITEMACTIVATE_Support)
|
||||
@@ -99,7 +99,7 @@ bool CListViewDialog::OnNotify(UINT /* controlID */, LPNMHDR header)
|
||||
case LVN_KEYDOWN:
|
||||
{
|
||||
LPNMLVKEYDOWN keyDownInfo = LPNMLVKEYDOWN(header);
|
||||
switch(keyDownInfo->wVKey)
|
||||
switch (keyDownInfo->wVKey)
|
||||
{
|
||||
case VK_DELETE:
|
||||
{
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
// it's hack for supporting Windows NT
|
||||
// constants are from WinUser.h
|
||||
|
||||
#if(WINVER < 0x0500)
|
||||
#if (WINVER < 0x0500)
|
||||
#define MIIM_STRING 0x00000040
|
||||
#define MIIM_BITMAP 0x00000080
|
||||
#define MIIM_FTYPE 0x00000100
|
||||
@@ -162,6 +162,8 @@ static void MyChangeMenu(HMENU menuLoc, int level, int menuIndex)
|
||||
if (langID == IDM_OPEN_INSIDE_ONE || langID == IDM_OPEN_INSIDE_PARSER)
|
||||
{
|
||||
LangString_OnlyFromLangFile(IDM_OPEN_INSIDE, newString);
|
||||
if (newString.IsEmpty())
|
||||
continue;
|
||||
newString.Replace(L"&", L"");
|
||||
int tabPos = newString.Find(L"\t");
|
||||
if (tabPos >= 0)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
using namespace NWindows;
|
||||
using namespace NNet;
|
||||
|
||||
static const PROPID kProps[] =
|
||||
static const Byte kProps[] =
|
||||
{
|
||||
kpidName,
|
||||
kpidLocalName,
|
||||
@@ -170,7 +170,7 @@ STDMETHODIMP CNetFolder::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIAN
|
||||
{
|
||||
NCOM::CPropVariant prop;
|
||||
const CResourceEx &item = _items[itemIndex];
|
||||
switch(propID)
|
||||
switch (propID)
|
||||
{
|
||||
case kpidIsDir: prop = true; break;
|
||||
case kpidName:
|
||||
@@ -243,7 +243,7 @@ IMP_IFolderFolder_Props(CNetFolder)
|
||||
STDMETHODIMP CNetFolder::GetFolderProperty(PROPID propID, PROPVARIANT *value)
|
||||
{
|
||||
NWindows::NCOM::CPropVariant prop;
|
||||
switch(propID)
|
||||
switch (propID)
|
||||
{
|
||||
case kpidType: prop = "NetFolder"; break;
|
||||
case kpidPath: prop = _path; break;
|
||||
|
||||
@@ -60,14 +60,14 @@ STDMETHODIMP COpenArchiveCallback::GetProperty(PROPID propID, PROPVARIANT *value
|
||||
NCOM::CPropVariant prop;
|
||||
if (_subArchiveMode)
|
||||
{
|
||||
switch(propID)
|
||||
switch (propID)
|
||||
{
|
||||
case kpidName: prop = _subArchiveName; break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(propID)
|
||||
switch (propID)
|
||||
{
|
||||
case kpidName: prop = _fileInfo.Name; break;
|
||||
case kpidIsDir: prop = _fileInfo.IsDir(); break;
|
||||
|
||||
@@ -460,7 +460,7 @@ extern UString RootFolder_GetName_Documents(int &iconIndex);
|
||||
bool CPanel::OnComboBoxCommand(UINT code, LPARAM /* param */, LRESULT &result)
|
||||
{
|
||||
result = FALSE;
|
||||
switch(code)
|
||||
switch (code)
|
||||
{
|
||||
case CBN_DROPDOWN:
|
||||
{
|
||||
|
||||
@@ -544,7 +544,7 @@ static HRESULT StartApplication(const UString &dir, const UString &path, HWND wi
|
||||
}
|
||||
if (result <= 32)
|
||||
{
|
||||
switch(result)
|
||||
switch (result)
|
||||
{
|
||||
case SE_ERR_NOASSOC:
|
||||
::MessageBoxW(window,
|
||||
@@ -1241,7 +1241,7 @@ static bool CheckDeleteItem(UINT64 currentFileTime, UINT64 folderFileTime)
|
||||
void DeleteOldTempFiles()
|
||||
{
|
||||
UString tempPath;
|
||||
if(!MyGetTempPath(tempPath))
|
||||
if (!MyGetTempPath(tempPath))
|
||||
throw 1;
|
||||
|
||||
UINT64 currentFileTime;
|
||||
@@ -1250,12 +1250,12 @@ void DeleteOldTempFiles()
|
||||
searchWildCard += WCHAR(NName::kAnyStringWildcard);
|
||||
NFind::CEnumeratorW enumerator(searchWildCard);
|
||||
NFind::CFileInfo fileInfo;
|
||||
while(enumerator.Next(fileInfo))
|
||||
while (enumerator.Next(fileInfo))
|
||||
{
|
||||
if (!fileInfo.IsDir())
|
||||
continue;
|
||||
const UINT64 &cTime = *(const UINT64 *)(&fileInfo.CTime);
|
||||
if(CheckDeleteItem(cTime, currentFileTime))
|
||||
if (CheckDeleteItem(cTime, currentFileTime))
|
||||
RemoveDirectoryWithSubItems(tempPath + fileInfo.Name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,14 +78,14 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
g_App.SwitchOnOffOnePanel();
|
||||
}
|
||||
|
||||
if(keyDownInfo->wVKey >= VK_F3 && keyDownInfo->wVKey <= VK_F12 && ctrl)
|
||||
if (keyDownInfo->wVKey >= VK_F3 && keyDownInfo->wVKey <= VK_F12 && ctrl)
|
||||
{
|
||||
int index = FindVKeyPropIDPair(keyDownInfo->wVKey);
|
||||
if (index >= 0)
|
||||
SortItemsWithPropID(g_VKeyPropIDPairs[index].PropID);
|
||||
}
|
||||
|
||||
switch(keyDownInfo->wVKey)
|
||||
switch (keyDownInfo->wVKey)
|
||||
{
|
||||
case VK_SHIFT:
|
||||
{
|
||||
@@ -191,7 +191,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
}
|
||||
case VK_DOWN:
|
||||
{
|
||||
if(shift)
|
||||
if (shift)
|
||||
OnArrowWithShift();
|
||||
return false;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
{
|
||||
if (alt)
|
||||
_panelCallback->OnSetSameFolder();
|
||||
else if(shift)
|
||||
else if (shift)
|
||||
OnArrowWithShift();
|
||||
return false;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
{
|
||||
if (alt)
|
||||
_panelCallback->OnSetSubFolder();
|
||||
else if(shift)
|
||||
else if (shift)
|
||||
OnArrowWithShift();
|
||||
return false;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
{
|
||||
if (alt)
|
||||
_panelCallback->OnSetSubFolder();
|
||||
else if(shift)
|
||||
else if (shift)
|
||||
OnArrowWithShift();
|
||||
return false;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
SelectByType(true);
|
||||
else if (shift)
|
||||
SelectAll(true);
|
||||
else if(!ctrl)
|
||||
else if (!ctrl)
|
||||
SelectSpec(true);
|
||||
return true;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
}
|
||||
*/
|
||||
case 'A':
|
||||
if(ctrl)
|
||||
if (ctrl)
|
||||
{
|
||||
SelectAll(true);
|
||||
return true;
|
||||
@@ -307,14 +307,14 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
}
|
||||
return false;
|
||||
case 'R':
|
||||
if(ctrl)
|
||||
if (ctrl)
|
||||
{
|
||||
OnReload();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case 'Z':
|
||||
if(ctrl)
|
||||
if (ctrl)
|
||||
{
|
||||
ChangeComment();
|
||||
return true;
|
||||
@@ -324,7 +324,7 @@ bool CPanel::OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result)
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
if(ctrl)
|
||||
if (ctrl)
|
||||
{
|
||||
int styleIndex = keyDownInfo->wVKey - '1';
|
||||
SetListViewMode(styleIndex);
|
||||
|
||||
@@ -465,7 +465,7 @@ void CPanel::OnNotifyActivateItems()
|
||||
|
||||
bool CPanel::OnNotifyList(LPNMHDR header, LRESULT &result)
|
||||
{
|
||||
switch(header->code)
|
||||
switch (header->code)
|
||||
{
|
||||
case LVN_ITEMCHANGED:
|
||||
{
|
||||
@@ -507,7 +507,7 @@ bool CPanel::OnNotifyList(LPNMHDR header, LRESULT &result)
|
||||
{
|
||||
LPNMLVKEYDOWN keyDownInfo = LPNMLVKEYDOWN(header);
|
||||
bool boolResult = OnKeyDown(keyDownInfo, result);
|
||||
switch(keyDownInfo->wVKey)
|
||||
switch (keyDownInfo->wVKey)
|
||||
{
|
||||
case VK_CONTROL:
|
||||
case VK_SHIFT:
|
||||
@@ -602,7 +602,7 @@ bool CPanel::OnNotifyList(LPNMHDR header, LRESULT &result)
|
||||
|
||||
bool CPanel::OnCustomDraw(LPNMLVCUSTOMDRAW lplvcd, LRESULT &result)
|
||||
{
|
||||
switch(lplvcd->nmcd.dwDrawStage)
|
||||
switch (lplvcd->nmcd.dwDrawStage)
|
||||
{
|
||||
case CDDS_PREPAINT :
|
||||
result = CDRF_NOTIFYITEMDRAW;
|
||||
|
||||
@@ -480,7 +480,7 @@ void CPanel::CreateSystemMenu(HMENU menuSpec,
|
||||
// HMENU hMenu = CreatePopupMenu();
|
||||
CMenu popupMenu;
|
||||
// CMenuDestroyer menuDestroyer(popupMenu);
|
||||
if(!popupMenu.CreatePopup())
|
||||
if (!popupMenu.CreatePopup())
|
||||
throw 210503;
|
||||
|
||||
HMENU hMenu = popupMenu;
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
HRESULT CThreadFolderOperations::ProcessVirt()
|
||||
{
|
||||
NCOM::CComInitializer comInitializer;
|
||||
switch(OpType)
|
||||
switch (OpType)
|
||||
{
|
||||
case FOLDER_TYPE_CREATE_FOLDER:
|
||||
Result = FolderOperations->CreateFolder(Name, UpdateCallback);
|
||||
|
||||
@@ -132,7 +132,7 @@ bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
|
||||
|
||||
bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(message)
|
||||
switch (message)
|
||||
{
|
||||
case kCloseMessage:
|
||||
{
|
||||
@@ -158,7 +158,7 @@ bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
bool CProgressDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
switch (buttonID)
|
||||
{
|
||||
case IDCANCEL:
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ static const unsigned kNumRootFolderItems =
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
static const PROPID kProps[] =
|
||||
static const Byte kProps[] =
|
||||
{
|
||||
kpidName
|
||||
};
|
||||
@@ -108,7 +108,7 @@ STDMETHODIMP CRootFolder::GetNumberOfItems(UInt32 *numItems)
|
||||
STDMETHODIMP CRootFolder::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIANT *value)
|
||||
{
|
||||
NCOM::CPropVariant prop;
|
||||
switch(propID)
|
||||
switch (propID)
|
||||
{
|
||||
case kpidIsDir: prop = true; break;
|
||||
case kpidName: prop = _names[itemIndex]; break;
|
||||
|
||||
@@ -93,7 +93,7 @@ void CSettingsPage::OnNotifyHelp()
|
||||
|
||||
bool CSettingsPage::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
switch (buttonID)
|
||||
{
|
||||
case IDX_SETTINGS_SINGLE_CLICK:
|
||||
/*
|
||||
|
||||
@@ -77,7 +77,7 @@ bool CSplitDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize)
|
||||
|
||||
bool CSplitDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
{
|
||||
switch(buttonID)
|
||||
switch (buttonID)
|
||||
{
|
||||
case IDB_SPLIT_PATH:
|
||||
OnButtonSetPath();
|
||||
|
||||
Reference in New Issue
Block a user