mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 07:14:56 -06:00
15.06
This commit is contained in:
committed by
Kornel Lesiński
parent
54490d51d5
commit
cba375916f
@@ -2,6 +2,10 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
#ifndef UNDER_CE
|
||||
#include "../../../Windows/CommonDialog.h"
|
||||
#include "../../../Windows/Shell.h"
|
||||
@@ -106,7 +110,7 @@ class CBrowseDialog: public NControl::CModalDialog
|
||||
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
|
||||
virtual void OnOK();
|
||||
|
||||
void Post_RefreshPathEdit() { PostMessage(k_Message_RefreshPathEdit); }
|
||||
void Post_RefreshPathEdit() { PostMsg(k_Message_RefreshPathEdit); }
|
||||
|
||||
bool GetParentPath(const UString &path, UString &parentPrefix, UString &name);
|
||||
// Reload changes DirPrefix. Don't send DirPrefix in pathPrefix parameter
|
||||
@@ -295,7 +299,7 @@ bool CBrowseDialog::OnInit()
|
||||
#ifndef UNDER_CE
|
||||
/* If we clear UISF_HIDEFOCUS, the focus rectangle in ListView will be visible,
|
||||
even if we use mouse for pressing the button to open this dialog. */
|
||||
PostMessage(MY__WM_UPDATEUISTATE, MAKEWPARAM(MY__UIS_CLEAR, MY__UISF_HIDEFOCUS));
|
||||
PostMsg(MY__WM_UPDATEUISTATE, MAKEWPARAM(MY__UIS_CLEAR, MY__UISF_HIDEFOCUS));
|
||||
#endif
|
||||
|
||||
return CModalDialog::OnInit();
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include "../../../Common/MyInitGuid.h"
|
||||
|
||||
#include "../Agent/Agent.h"
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "../../../../C/Alloc.h"
|
||||
|
||||
#include "../../../Common/IntToString.h"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <Winbase.h>
|
||||
|
||||
#include "../../../Common/Defs.h"
|
||||
@@ -585,7 +587,6 @@ STDMETHODIMP CFSFolder::CopyTo(Int32 moveMode, const UInt32 *indices, UInt32 num
|
||||
|
||||
CCopyState state;
|
||||
state.ProgressInfo.TotalSize = stat.Size;
|
||||
state.ProgressInfo.TotalSize = stat.Size;
|
||||
state.ProgressInfo.StartPos = 0;
|
||||
state.ProgressInfo.Progress = callback;
|
||||
state.ProgressInfo.Init();
|
||||
@@ -593,7 +594,6 @@ STDMETHODIMP CFSFolder::CopyTo(Int32 moveMode, const UInt32 *indices, UInt32 num
|
||||
state.MoveMode = IntToBool(moveMode);
|
||||
state.UseReadWriteMode = isAltDest;
|
||||
state.Prepare();
|
||||
state.TotalSize = stat.Size;
|
||||
|
||||
for (UInt32 i = 0; i < numItems; i++)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ static const UInt32 kLangIDs[] =
|
||||
|
||||
static bool GetSymLink(CFSTR path, CReparseAttr &attr)
|
||||
{
|
||||
NFile::NIO::CInFile file;
|
||||
NIO::CInFile file;
|
||||
if (!file.Open(path,
|
||||
FILE_SHARE_READ,
|
||||
OPEN_EXISTING,
|
||||
@@ -88,12 +88,13 @@ bool CLinkDialog::OnInit()
|
||||
LangSetWindowText(*this, IDD_LINK);
|
||||
LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));
|
||||
#endif
|
||||
|
||||
_pathFromCombo.Attach(GetItem(IDC_LINK_PATH_FROM));
|
||||
_pathToCombo.Attach(GetItem(IDC_LINK_PATH_TO));
|
||||
|
||||
if (!FilePath.IsEmpty())
|
||||
{
|
||||
NFile::NFind::CFileInfo fi;
|
||||
NFind::CFileInfo fi;
|
||||
int linkType = 0;
|
||||
if (!fi.Find(us2fs(FilePath)))
|
||||
linkType = IDR_LINK_TYPE_SYM_FILE;
|
||||
@@ -219,7 +220,7 @@ void CLinkDialog::OnButton_SetPath(bool to)
|
||||
UString resultPath;
|
||||
if (!MyBrowseForFolder(*this, title, currentPath, resultPath))
|
||||
return;
|
||||
NFile::NName::NormalizeDirPathPrefix(resultPath);
|
||||
NName::NormalizeDirPathPrefix(resultPath);
|
||||
combo.SetCurSel(-1);
|
||||
combo.SetText(resultPath);
|
||||
}
|
||||
@@ -239,16 +240,23 @@ void CLinkDialog::OnButton_Link()
|
||||
UString from, to;
|
||||
_pathFromCombo.GetText(from);
|
||||
_pathToCombo.GetText(to);
|
||||
int i;
|
||||
for (i = 0; i < ARRAY_SIZE(k_LinkType_Buttons); i++)
|
||||
if (IsButtonCheckedBool(k_LinkType_Buttons[i]))
|
||||
break;
|
||||
if (i >= ARRAY_SIZE(k_LinkType_Buttons))
|
||||
|
||||
if (from.IsEmpty())
|
||||
return;
|
||||
if (!NName::IsAbsolutePath(from))
|
||||
from.Insert(0, CurDirPrefix);
|
||||
|
||||
int idb = k_LinkType_Buttons[i];
|
||||
int idb = -1;
|
||||
for (unsigned i = 0;; i++)
|
||||
{
|
||||
if (i >= ARRAY_SIZE(k_LinkType_Buttons))
|
||||
return;
|
||||
idb = k_LinkType_Buttons[i];
|
||||
if (IsButtonCheckedBool(idb))
|
||||
break;
|
||||
}
|
||||
|
||||
NFile::NFind::CFileInfo info1, info2;
|
||||
NFind::CFileInfo info1, info2;
|
||||
bool finded1 = info1.Find(us2fs(from));
|
||||
bool finded2 = info2.Find(us2fs(to));
|
||||
|
||||
@@ -259,14 +267,13 @@ void CLinkDialog::OnButton_Link()
|
||||
if (finded1 && info1.IsDir() != isDirLink ||
|
||||
finded2 && info2.IsDir() != isDirLink)
|
||||
{
|
||||
ShowError(L"Incorrect linkType");
|
||||
ShowError(L"Incorrect link type");
|
||||
return;
|
||||
}
|
||||
|
||||
if (idb == IDR_LINK_TYPE_HARD)
|
||||
{
|
||||
bool res = NFile::NDir::MyCreateHardLink(us2fs(from), us2fs(to));
|
||||
if (!res)
|
||||
if (!NDir::MyCreateHardLink(us2fs(from), us2fs(to)))
|
||||
{
|
||||
ShowLastErrorMessage();
|
||||
return;
|
||||
@@ -291,9 +298,10 @@ void CLinkDialog::OnButton_Link()
|
||||
}
|
||||
|
||||
|
||||
if (!NFile::NIO::SetReparseData(us2fs(from), isDirLink, data, (DWORD)data.Size()))
|
||||
if (!NIO::SetReparseData(us2fs(from), isDirLink, data, (DWORD)data.Size()))
|
||||
{
|
||||
ShowLastErrorMessage();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +329,8 @@ void CApp::Link()
|
||||
int index = indices[0];
|
||||
const UString itemName = srcPanel.GetItemName(index);
|
||||
|
||||
UString srcPath = srcPanel.GetFsPath() + srcPanel.GetItemPrefix(index);
|
||||
const UString fsPrefix = srcPanel.GetFsPath();
|
||||
const UString srcPath = fsPrefix + srcPanel.GetItemPrefix(index);
|
||||
UString path = srcPath;
|
||||
{
|
||||
int destPanelIndex = (NumPanels <= 1) ? srcPanelIndex : (1 - srcPanelIndex);
|
||||
@@ -332,6 +341,7 @@ void CApp::Link()
|
||||
}
|
||||
|
||||
CLinkDialog dlg;
|
||||
dlg.CurDirPrefix = fsPrefix;
|
||||
dlg.FilePath = srcPath + itemName;
|
||||
dlg.AnotherPath = path;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class CLinkDialog: public NWindows::NControl::CModalDialog
|
||||
void ShowError(const wchar_t *s);
|
||||
void Set_LinkType_Radio(int idb);
|
||||
public:
|
||||
UString CurDirPrefix;
|
||||
UString FilePath;
|
||||
UString AnotherPath;
|
||||
|
||||
|
||||
@@ -795,7 +795,7 @@ void CPanel::Change_ShowNtfsStrems_Mode()
|
||||
void CPanel::Post_Refresh_StatusBar()
|
||||
{
|
||||
if (_processStatusBar)
|
||||
PostMessage(kRefresh_StatusBar);
|
||||
PostMsg(kRefresh_StatusBar);
|
||||
}
|
||||
|
||||
void CPanel::AddToArchive()
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#ifndef __PANEL_H
|
||||
#define __PANEL_H
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <ShlObj.h>
|
||||
|
||||
#include "../../../../C/Alloc.h"
|
||||
|
||||
#include "../../../Common/Defs.h"
|
||||
|
||||
@@ -359,7 +359,7 @@ LRESULT CPanel::OnNotifyComboBoxEnter(const UString &s)
|
||||
{
|
||||
if (BindToPathAndRefresh(GetUnicodeString(s)) == S_OK)
|
||||
{
|
||||
PostMessage(kSetFocusToListView);
|
||||
PostMsg(kSetFocusToListView);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -370,7 +370,7 @@ bool CPanel::OnNotifyComboBoxEndEdit(PNMCBEENDEDITW info, LRESULT &result)
|
||||
if (info->iWhy == CBENF_ESCAPE)
|
||||
{
|
||||
_headerComboBox.SetText(_currentFolderPrefix);
|
||||
PostMessage(kSetFocusToListView);
|
||||
PostMsg(kSetFocusToListView);
|
||||
result = FALSE;
|
||||
return true;
|
||||
}
|
||||
@@ -401,7 +401,7 @@ bool CPanel::OnNotifyComboBoxEndEdit(PNMCBEENDEDIT info, LRESULT &result)
|
||||
if (info->iWhy == CBENF_ESCAPE)
|
||||
{
|
||||
_headerComboBox.SetText(_currentFolderPrefix);
|
||||
PostMessage(kSetFocusToListView);
|
||||
PostMsg(kSetFocusToListView);
|
||||
result = FALSE;
|
||||
return true;
|
||||
}
|
||||
@@ -528,9 +528,9 @@ bool CPanel::OnComboBoxCommand(UINT code, LPARAM /* param */, LRESULT &result)
|
||||
// _headerComboBox.SetText(pass); // it's fix for seclecting by mouse.
|
||||
if (BindToPathAndRefresh(pass) == S_OK)
|
||||
{
|
||||
PostMessage(kSetFocusToListView);
|
||||
PostMsg(kSetFocusToListView);
|
||||
#ifdef UNDER_CE
|
||||
PostMessage(kRefresh_HeaderComboBox);
|
||||
PostMsg(kRefresh_HeaderComboBox);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <tlhelp32.h>
|
||||
|
||||
#include "../../../Common/AutoPtr.h"
|
||||
|
||||
@@ -354,7 +354,7 @@ BOOL CPanel::OnEndLabelEdit(LV_DISPINFOW * lpnmh)
|
||||
|
||||
_dontShowMode = true;
|
||||
|
||||
PostMessage(kReLoadMessage);
|
||||
PostMsg(kReLoadMessage);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ void CPanel::OnArrowWithShift()
|
||||
}
|
||||
|
||||
_prevFocusedItem = focusedItem;
|
||||
PostMessage(kShiftSelectMessage);
|
||||
PostMsg(kShiftSelectMessage);
|
||||
_listView.RedrawItem(focusedItem);
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ void CProgressDialog::CheckNeedClose()
|
||||
{
|
||||
if (_needClose)
|
||||
{
|
||||
PostMessage(kCloseMessage);
|
||||
PostMsg(kCloseMessage);
|
||||
_needClose = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
{
|
||||
WaitCreating();
|
||||
if (_wasCreated)
|
||||
PostMessage(kCloseMessage);
|
||||
PostMsg(kCloseMessage);
|
||||
else
|
||||
_needClose = true;
|
||||
};
|
||||
|
||||
@@ -1229,7 +1229,7 @@ void CProgressDialog::CheckNeedClose()
|
||||
{
|
||||
if (_needClose)
|
||||
{
|
||||
PostMessage(kCloseMessage);
|
||||
PostMsg(kCloseMessage);
|
||||
_needClose = false;
|
||||
}
|
||||
}
|
||||
@@ -1241,7 +1241,7 @@ void CProgressDialog::ProcessWasFinished()
|
||||
WaitCreating();
|
||||
|
||||
if (_wasCreated)
|
||||
PostMessage(kCloseMessage);
|
||||
PostMsg(kCloseMessage);
|
||||
else
|
||||
_needClose = true;
|
||||
}
|
||||
|
||||
@@ -96,4 +96,5 @@ BEGIN
|
||||
IDS_PROP_STREAM_ID "Stream ID"
|
||||
IDS_PROP_READ_ONLY "Read-only"
|
||||
IDS_PROP_OUT_NAME "Out Name"
|
||||
IDS_PROP_COPY_LINK "Copy Link"
|
||||
END
|
||||
|
||||
@@ -92,3 +92,4 @@
|
||||
#define IDS_PROP_STREAM_ID 1092
|
||||
#define IDS_PROP_READ_ONLY 1093
|
||||
#define IDS_PROP_OUT_NAME 1094
|
||||
#define IDS_PROP_COPY_LINK 1095
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <ShlObj.h>
|
||||
|
||||
#include "../../../Common/StringConvert.h"
|
||||
|
||||
#include "../../../Windows/DLL.h"
|
||||
|
||||
@@ -12,8 +12,10 @@
|
||||
|
||||
#include "../../../Common/Common.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
#include <ShlObj.h>
|
||||
#include <shlwapi.h>
|
||||
// #include "../../../Common/MyWindows.h"
|
||||
|
||||
// #include <commctrl.h>
|
||||
// #include <ShlObj.h>
|
||||
// #include <shlwapi.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
#include "SysIconUtils.h"
|
||||
|
||||
#include <ShlObj.h>
|
||||
|
||||
#ifndef _UNICODE
|
||||
extern bool g_IsNT;
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#ifndef __SYS_ICON_UTILS_H
|
||||
#define __SYS_ICON_UTILS_H
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "../../../Common/MyString.h"
|
||||
|
||||
struct CExtIconPair
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include <ShlObj.h>
|
||||
|
||||
#include "../../../Common/StringConvert.h"
|
||||
#include "../../../Common/Defs.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user