Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2015-08-16 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:55 +0300
commitcba375916fb18db8b9101aedf4fa079e019311b3 (patch)
tree6275ae5fc2a8dd337ab0327180c871807e6ba5d4 /CPP/7zip/UI/FileManager
parent54490d51d5c6b0d794dcbad2d634d4c95fc25b6c (diff)
15.0615.06
Diffstat (limited to 'CPP/7zip/UI/FileManager')
-rw-r--r--CPP/7zip/UI/FileManager/BrowseDialog.cpp8
-rw-r--r--CPP/7zip/UI/FileManager/ClassDefs.cpp2
-rw-r--r--CPP/7zip/UI/FileManager/FM.cpp4
-rw-r--r--CPP/7zip/UI/FileManager/FSFolderCopy.cpp4
-rw-r--r--CPP/7zip/UI/FileManager/LinkDialog.cpp40
-rw-r--r--CPP/7zip/UI/FileManager/LinkDialog.h1
-rw-r--r--CPP/7zip/UI/FileManager/Panel.cpp2
-rw-r--r--CPP/7zip/UI/FileManager/Panel.h4
-rw-r--r--CPP/7zip/UI/FileManager/PanelFolderChange.cpp10
-rw-r--r--CPP/7zip/UI/FileManager/PanelItemOpen.cpp2
-rw-r--r--CPP/7zip/UI/FileManager/PanelOperations.cpp2
-rw-r--r--CPP/7zip/UI/FileManager/PanelSelect.cpp2
-rw-r--r--CPP/7zip/UI/FileManager/ProgressDialog.cpp2
-rw-r--r--CPP/7zip/UI/FileManager/ProgressDialog.h2
-rw-r--r--CPP/7zip/UI/FileManager/ProgressDialog2.cpp4
-rw-r--r--CPP/7zip/UI/FileManager/PropertyName.rc1
-rw-r--r--CPP/7zip/UI/FileManager/PropertyNameRes.h1
-rw-r--r--CPP/7zip/UI/FileManager/RootFolder.cpp4
-rw-r--r--CPP/7zip/UI/FileManager/StdAfx.h8
-rw-r--r--CPP/7zip/UI/FileManager/SysIconUtils.cpp2
-rw-r--r--CPP/7zip/UI/FileManager/SysIconUtils.h4
-rw-r--r--CPP/7zip/UI/FileManager/SystemPage.cpp4
22 files changed, 79 insertions, 34 deletions
diff --git a/CPP/7zip/UI/FileManager/BrowseDialog.cpp b/CPP/7zip/UI/FileManager/BrowseDialog.cpp
index 89a6b45a..8b605d0f 100644
--- a/CPP/7zip/UI/FileManager/BrowseDialog.cpp
+++ b/CPP/7zip/UI/FileManager/BrowseDialog.cpp
@@ -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();
diff --git a/CPP/7zip/UI/FileManager/ClassDefs.cpp b/CPP/7zip/UI/FileManager/ClassDefs.cpp
index b092a9ed..33197fc3 100644
--- a/CPP/7zip/UI/FileManager/ClassDefs.cpp
+++ b/CPP/7zip/UI/FileManager/ClassDefs.cpp
@@ -2,6 +2,8 @@
#include "StdAfx.h"
+#include "../../../Common/MyWindows.h"
+
#include "../../../Common/MyInitGuid.h"
#include "../Agent/Agent.h"
diff --git a/CPP/7zip/UI/FileManager/FM.cpp b/CPP/7zip/UI/FileManager/FM.cpp
index 00b152c8..1a7ed060 100644
--- a/CPP/7zip/UI/FileManager/FM.cpp
+++ b/CPP/7zip/UI/FileManager/FM.cpp
@@ -2,6 +2,10 @@
#include "StdAfx.h"
+#include "../../../Common/MyWindows.h"
+
+#include <shlwapi.h>
+
#include "../../../../C/Alloc.h"
#include "../../../Common/IntToString.h"
diff --git a/CPP/7zip/UI/FileManager/FSFolderCopy.cpp b/CPP/7zip/UI/FileManager/FSFolderCopy.cpp
index 54dabc57..af0cd8cc 100644
--- a/CPP/7zip/UI/FileManager/FSFolderCopy.cpp
+++ b/CPP/7zip/UI/FileManager/FSFolderCopy.cpp
@@ -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++)
{
diff --git a/CPP/7zip/UI/FileManager/LinkDialog.cpp b/CPP/7zip/UI/FileManager/LinkDialog.cpp
index bc482e4b..07f046e1 100644
--- a/CPP/7zip/UI/FileManager/LinkDialog.cpp
+++ b/CPP/7zip/UI/FileManager/LinkDialog.cpp
@@ -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;
diff --git a/CPP/7zip/UI/FileManager/LinkDialog.h b/CPP/7zip/UI/FileManager/LinkDialog.h
index 8417fac8..56deec9d 100644
--- a/CPP/7zip/UI/FileManager/LinkDialog.h
+++ b/CPP/7zip/UI/FileManager/LinkDialog.h
@@ -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;
diff --git a/CPP/7zip/UI/FileManager/Panel.cpp b/CPP/7zip/UI/FileManager/Panel.cpp
index a7416a4c..96a34af8 100644
--- a/CPP/7zip/UI/FileManager/Panel.cpp
+++ b/CPP/7zip/UI/FileManager/Panel.cpp
@@ -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()
diff --git a/CPP/7zip/UI/FileManager/Panel.h b/CPP/7zip/UI/FileManager/Panel.h
index 39915a27..5d03f6da 100644
--- a/CPP/7zip/UI/FileManager/Panel.h
+++ b/CPP/7zip/UI/FileManager/Panel.h
@@ -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"
diff --git a/CPP/7zip/UI/FileManager/PanelFolderChange.cpp b/CPP/7zip/UI/FileManager/PanelFolderChange.cpp
index cd70c727..4d9ce51f 100644
--- a/CPP/7zip/UI/FileManager/PanelFolderChange.cpp
+++ b/CPP/7zip/UI/FileManager/PanelFolderChange.cpp
@@ -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;
}
diff --git a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
index a485522f..b47a30a3 100644
--- a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
+++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
@@ -2,6 +2,8 @@
#include "StdAfx.h"
+#include "../../../Common/MyWindows.h"
+
#include <tlhelp32.h>
#include "../../../Common/AutoPtr.h"
diff --git a/CPP/7zip/UI/FileManager/PanelOperations.cpp b/CPP/7zip/UI/FileManager/PanelOperations.cpp
index 62a08e13..0afbc07b 100644
--- a/CPP/7zip/UI/FileManager/PanelOperations.cpp
+++ b/CPP/7zip/UI/FileManager/PanelOperations.cpp
@@ -354,7 +354,7 @@ BOOL CPanel::OnEndLabelEdit(LV_DISPINFOW * lpnmh)
_dontShowMode = true;
- PostMessage(kReLoadMessage);
+ PostMsg(kReLoadMessage);
return TRUE;
}
diff --git a/CPP/7zip/UI/FileManager/PanelSelect.cpp b/CPP/7zip/UI/FileManager/PanelSelect.cpp
index 7b53eb00..de9cf4b5 100644
--- a/CPP/7zip/UI/FileManager/PanelSelect.cpp
+++ b/CPP/7zip/UI/FileManager/PanelSelect.cpp
@@ -70,7 +70,7 @@ void CPanel::OnArrowWithShift()
}
_prevFocusedItem = focusedItem;
- PostMessage(kShiftSelectMessage);
+ PostMsg(kShiftSelectMessage);
_listView.RedrawItem(focusedItem);
}
diff --git a/CPP/7zip/UI/FileManager/ProgressDialog.cpp b/CPP/7zip/UI/FileManager/ProgressDialog.cpp
index b4195c18..4b20f1a9 100644
--- a/CPP/7zip/UI/FileManager/ProgressDialog.cpp
+++ b/CPP/7zip/UI/FileManager/ProgressDialog.cpp
@@ -184,7 +184,7 @@ void CProgressDialog::CheckNeedClose()
{
if (_needClose)
{
- PostMessage(kCloseMessage);
+ PostMsg(kCloseMessage);
_needClose = false;
}
}
diff --git a/CPP/7zip/UI/FileManager/ProgressDialog.h b/CPP/7zip/UI/FileManager/ProgressDialog.h
index 175db017..0f41b57a 100644
--- a/CPP/7zip/UI/FileManager/ProgressDialog.h
+++ b/CPP/7zip/UI/FileManager/ProgressDialog.h
@@ -152,7 +152,7 @@ public:
{
WaitCreating();
if (_wasCreated)
- PostMessage(kCloseMessage);
+ PostMsg(kCloseMessage);
else
_needClose = true;
};
diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2.cpp b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
index 231d0ace..dc828e72 100644
--- a/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
+++ b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
@@ -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;
}
diff --git a/CPP/7zip/UI/FileManager/PropertyName.rc b/CPP/7zip/UI/FileManager/PropertyName.rc
index 8b8c7899..5de5aeec 100644
--- a/CPP/7zip/UI/FileManager/PropertyName.rc
+++ b/CPP/7zip/UI/FileManager/PropertyName.rc
@@ -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
diff --git a/CPP/7zip/UI/FileManager/PropertyNameRes.h b/CPP/7zip/UI/FileManager/PropertyNameRes.h
index 3696ed2e..67f33902 100644
--- a/CPP/7zip/UI/FileManager/PropertyNameRes.h
+++ b/CPP/7zip/UI/FileManager/PropertyNameRes.h
@@ -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
diff --git a/CPP/7zip/UI/FileManager/RootFolder.cpp b/CPP/7zip/UI/FileManager/RootFolder.cpp
index c5b57821..2a5d513a 100644
--- a/CPP/7zip/UI/FileManager/RootFolder.cpp
+++ b/CPP/7zip/UI/FileManager/RootFolder.cpp
@@ -2,6 +2,10 @@
#include "StdAfx.h"
+#include "../../../Common/MyWindows.h"
+
+#include <ShlObj.h>
+
#include "../../../Common/StringConvert.h"
#include "../../../Windows/DLL.h"
diff --git a/CPP/7zip/UI/FileManager/StdAfx.h b/CPP/7zip/UI/FileManager/StdAfx.h
index 85389112..e6d96041 100644
--- a/CPP/7zip/UI/FileManager/StdAfx.h
+++ b/CPP/7zip/UI/FileManager/StdAfx.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
diff --git a/CPP/7zip/UI/FileManager/SysIconUtils.cpp b/CPP/7zip/UI/FileManager/SysIconUtils.cpp
index 2c35c191..c400bc29 100644
--- a/CPP/7zip/UI/FileManager/SysIconUtils.cpp
+++ b/CPP/7zip/UI/FileManager/SysIconUtils.cpp
@@ -10,6 +10,8 @@
#include "SysIconUtils.h"
+#include <ShlObj.h>
+
#ifndef _UNICODE
extern bool g_IsNT;
#endif
diff --git a/CPP/7zip/UI/FileManager/SysIconUtils.h b/CPP/7zip/UI/FileManager/SysIconUtils.h
index 20199acb..f1b27fa1 100644
--- a/CPP/7zip/UI/FileManager/SysIconUtils.h
+++ b/CPP/7zip/UI/FileManager/SysIconUtils.h
@@ -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
diff --git a/CPP/7zip/UI/FileManager/SystemPage.cpp b/CPP/7zip/UI/FileManager/SystemPage.cpp
index a7f0c3fb..d60d7b4f 100644
--- a/CPP/7zip/UI/FileManager/SystemPage.cpp
+++ b/CPP/7zip/UI/FileManager/SystemPage.cpp
@@ -2,6 +2,10 @@
#include "StdAfx.h"
+#include "../../../Common/MyWindows.h"
+
+#include <ShlObj.h>
+
#include "../../../Common/StringConvert.h"
#include "../../../Common/Defs.h"