This commit is contained in:
Igor Pavlov
2022-01-22 18:43:09 +00:00
committed by Kornel
parent 52eeaf1ad6
commit c3529a41f5
88 changed files with 3474 additions and 435 deletions

View File

@@ -224,14 +224,14 @@ STDMETHODIMP CFSDrives::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIANT
switch (propID)
{
case kpidIsDir: prop = !_volumeMode; break;
case kpidName: prop = di.Name; break;
case kpidName: prop = fs2us(di.Name); break;
case kpidOutName:
if (!di.Name.IsEmpty() && di.Name.Back() == ':')
{
FString s = di.Name;
s.DeleteBack();
AddExt(s, itemIndex);
prop = s;
prop = fs2us(s);
}
break;

View File

@@ -515,7 +515,7 @@ STDMETHODIMP CFSFolder::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *va
}
case kpidPrefix:
if (fi.Parent >= 0)
prop = Folders[fi.Parent];
prop = fs2us(Folders[fi.Parent]);
break;
case kpidNumSubDirs: if (fi.IsDir() && fi.FolderStat_Defined) prop = fi.NumFolders; break;
case kpidNumSubFiles: if (fi.IsDir() && fi.FolderStat_Defined) prop = fi.NumFiles; break;

View File

@@ -473,7 +473,10 @@ static HRESULT CopyFile_Ask(
static FString CombinePath(const FString &folderPath, const FString &fileName)
{
return folderPath + FCHAR_PATH_SEPARATOR + fileName;
FString s (folderPath);
s.Add_PathSepar(); // FCHAR_PATH_SEPARATOR
s += fileName;
return s;
}
static bool IsDestChild(const FString &src, const FString &dest)

View File

@@ -486,6 +486,8 @@ void CFileMenu::Load(HMENU hMenu, unsigned startPos)
ReadRegDiff(diffPath);
unsigned numRealItems = startPos;
const bool isBigScreen = NControl::IsDialogSizeOK(40, 200, g_HWND);
for (unsigned i = 0;; i++)
{
@@ -568,8 +570,6 @@ void CFileMenu::Load(HMENU hMenu, unsigned startPos)
if (item.wID == IDM_ALT_STREAMS)
disable = !isAltStreamsSupported;
bool isBigScreen = NControl::IsDialogSizeOK(40, 200);
if (!isBigScreen && (disable || item.IsSeparator()))
continue;

View File

@@ -69,7 +69,7 @@ STDMETHODIMP COpenArchiveCallback::GetProperty(PROPID propID, PROPVARIANT *value
{
switch (propID)
{
case kpidName: prop = _fileInfo.Name; break;
case kpidName: prop = fs2us(_fileInfo.Name); break;
case kpidIsDir: prop = _fileInfo.IsDir(); break;
case kpidSize: prop = _fileInfo.Size; break;
case kpidAttrib: prop = (UInt32)_fileInfo.Attrib; break;

View File

@@ -289,7 +289,7 @@ HRESULT CThreadCrc::ProcessVirt()
}
if (isFirstFile)
{
Hash.FirstFileName = path;
Hash.FirstFileName = fs2us(path);
isFirstFile = false;
}
sync.Set_FilePath(fs2us(path));
@@ -375,7 +375,7 @@ HRESULT CApp::CalculateCrc2(const UString &methodName)
t.Enumerator.FilePaths.Add(us2fs(srcPanel.GetItemRelPath(indices[i])));
if (t.Enumerator.FilePaths.Size() == 1)
t.Hash.MainName = t.Enumerator.FilePaths[0];
t.Hash.MainName = fs2us(t.Enumerator.FilePaths[0]);
UString basePrefix = srcPanel.GetFsPath();
UString basePrefix2 = basePrefix;

View File

@@ -511,7 +511,7 @@ void CPanel::ChangeComment()
LangString(IDS_COMMENT2, dlg.Static);
if (dlg.Create(GetParent()) != IDOK)
return;
NCOM::CPropVariant propVariant = dlg.Value.Ptr();
NCOM::CPropVariant propVariant (dlg.Value);
CDisableNotify disableNotify(*this);
HRESULT result = _folderOperations->SetProperty(realIndex, kpidComment, &propVariant, NULL);

View File

@@ -65,7 +65,7 @@ CAPTION "Progress"
RTEXT "", IDT_PROGRESS_ELAPSED_VAL, x1, y0, x1s, MY_TEXT_NOPREFIX
RTEXT "", IDT_PROGRESS_REMAINING_VAL, x1, y1, x1s, MY_TEXT_NOPREFIX
RTEXT "", IDT_PROGRESS_FILES_VAL, x1, y2, x1s, MY_TEXT_NOPREFIX
RTEXT "", IDT_PROGRESS_FILES_TOTAL x1, y3, x1s, MY_TEXT_NOPREFIX
RTEXT "", IDT_PROGRESS_FILES_TOTAL, x1, y3, x1s, MY_TEXT_NOPREFIX
RTEXT "", IDT_PROGRESS_ERRORS_VAL, x1, y4, x1s, MY_TEXT_NOPREFIX
RTEXT "", IDT_PROGRESS_TOTAL_VAL, x3, y0, x3s, MY_TEXT_NOPREFIX

View File

@@ -389,11 +389,11 @@ void CApp::VerCtrl(unsigned id)
dialog.OldFileInfo.SetTime(&fdi.Info.ftLastWriteTime);
dialog.OldFileInfo.SetSize(fdi.GetSize());
dialog.OldFileInfo.Name = path;
dialog.OldFileInfo.Name = fs2us(path);
dialog.NewFileInfo.SetTime(&fdi2.Info.ftLastWriteTime);
dialog.NewFileInfo.SetSize(fdi2.GetSize());
dialog.NewFileInfo.Name = path2;
dialog.NewFileInfo.Name = fs2us(path2);
dialog.ShowExtraButtons = false;
dialog.DefaultButton_is_NO = true;