This commit is contained in:
Igor Pavlov
2005-05-30 00:00:00 +00:00
committed by Kornel Lesiński
parent 8c1b5c7b7e
commit 3c510ba80b
926 changed files with 40559 additions and 23519 deletions
+60 -12
View File
@@ -60,10 +60,29 @@ void CApp::SetListSettings()
{
bool showDots = ReadShowDots();
bool showRealFileIcons = ReadShowRealFileIcons();
DWORD extendedStyle = LVS_EX_HEADERDRAGDROP;
if (ReadFullRow())
extendedStyle |= LVS_EX_FULLROWSELECT;
if (ReadShowGrid())
extendedStyle |= LVS_EX_GRIDLINES;
/*
if (ReadSingleClick())
{
extendedStyle |= LVS_EX_ONECLICKACTIVATE
| LVS_EX_TRACKSELECT;
if (ReadUnderline())
extendedStyle |= LVS_EX_UNDERLINEHOT;
}
*/
for (int i = 0; i < kNumPanelsMax; i++)
{
Panels[i]._showDots = showDots;
Panels[i]._showRealFileIcons = showRealFileIcons;
Panels[i]._exStyle = extendedStyle;
Panels[i].SetExtendedStyle();
}
}
@@ -89,7 +108,7 @@ void CApp::CreateOnePanel(int panelIndex, const UString &mainPath)
path = mainPath;
int id = 1000 + 100 * panelIndex;
Panels[panelIndex].Create(_window, _window,
id, 0, path, &m_PanelCallbackImp[panelIndex], &AppState);
id, path, &m_PanelCallbackImp[panelIndex], &AppState);
PanelsCreated[panelIndex] = true;
}
@@ -301,7 +320,7 @@ void CApp::ReloadRebar(HWND hwnd)
ReloadToolbars();
}
void CApp::Create(HWND hwnd, const UString &mainPath)
void CApp::Create(HWND hwnd, const UString &mainPath, int xSizes[2])
{
ReadToolbar();
ReloadRebar(hwnd);
@@ -316,9 +335,21 @@ void CApp::Create(HWND hwnd, const UString &mainPath)
UString mainPathSpec = mainPath;
if (LastFocusedPanel >= kNumPanelsMax)
LastFocusedPanel = 0;
CListMode listMode;
ReadListMode(listMode);
for (i = 0; i < kNumPanelsMax; i++)
{
Panels[i]._ListViewMode = listMode.Panels[i];
Panels[i]._xSize = xSizes[i];
}
for (i = 0; i < kNumPanelsMax; i++)
if (NumPanels > 1 || i == LastFocusedPanel)
{
if (NumPanels == 1)
Panels[i]._xSize = xSizes[0] + xSizes[1];
CreateOnePanel(i, (i == LastFocusedPanel) ? mainPath : L"");
}
Panels[LastFocusedPanel].SetFocusToList();
}
@@ -345,6 +376,7 @@ void CApp::SwitchOnOffOnePanel()
void CApp::Save()
{
AppState.Save();
CListMode listMode;
for (int i = 0; i < kNumPanelsMax; i++)
{
const CPanel &panel = Panels[i];
@@ -354,7 +386,9 @@ void CApp::Save()
else
path = GetFolderPath(panel._parentFolders[0].ParentFolder);
SavePanelPath(i, GetSystemString(path));
listMode.Panels[i] = panel.GetListViewMode();
}
SaveListMode(listMode);
}
void CApp::Release()
@@ -472,6 +506,10 @@ void CApp::OnCopy(UStringVector &externalNames, bool move, bool copyToSame, int
int destPanelIndex = (NumPanels <= 1) ? srcPanelIndex : (1 - srcPanelIndex);
CPanel &srcPanel = Panels[srcPanelIndex];
CPanel &destPanel = Panels[destPanelIndex];
CPanel::CDisableTimerProcessing disableTimerProcessing1(destPanel);
CPanel::CDisableTimerProcessing disableTimerProcessing2(srcPanel);
bool useSrcPanel = true;
if (!external)
if (NumPanels != 1)
@@ -551,7 +589,7 @@ void CApp::OnCopy(UStringVector &externalNames, bool move, bool copyToSame, int
{
if (fileInfo.IsDirectory())
{
destPath += TEXT('\\');
destPath += L'\\';
break;
}
}
@@ -559,7 +597,12 @@ void CApp::OnCopy(UStringVector &externalNames, bool move, bool copyToSame, int
if (pos < 0)
destPath.Empty();
else
{
destPath = destPath.Left(pos + 1);
if (destPath.Length() == 3 && destPath[1] == L':')
break;
destPath = destPath.Left(pos);
}
}
}
copyDialog.Value = destPath;
@@ -598,8 +641,12 @@ void CApp::OnCopy(UStringVector &externalNames, bool move, bool copyToSame, int
LangLoadStringW(IDS_COPYING, 0x03020205);
UString progressWindowTitle = LangLoadStringW(IDS_APP_TITLE, 0x03000000);
CPanel::CDisableTimerProcessing disableTimerProcessing1(destPanel);
CPanel::CDisableTimerProcessing disableTimerProcessing2(srcPanel);
CSelectedState srcSelState;
CSelectedState destSelState;
if (copyToSame || move)
srcPanel.SaveSelectedState(srcSelState);
if (!copyToSame)
destPanel.SaveSelectedState(destSelState);
HRESULT result;
if (useSrcPanel && !external)
@@ -607,13 +654,14 @@ void CApp::OnCopy(UStringVector &externalNames, bool move, bool copyToSame, int
CThreadExtract extracter;
extracter.ExtractCallbackSpec = new CExtractCallbackImp;
extracter.ExtractCallback = extracter.ExtractCallbackSpec;
extracter.ExtractCallbackSpec->_parentWindow = _window;
extracter.ExtractCallbackSpec->ParentWindow = _window;
extracter.ExtractCallbackSpec->ProgressDialog.MainWindow = _window;
extracter.ExtractCallbackSpec->ProgressDialog.MainTitle = progressWindowTitle;
extracter.ExtractCallbackSpec->ProgressDialog.MainAddTitle = title + L" ";
extracter.ExtractCallbackSpec->OverwriteMode = NExtract::NOverwriteMode::kAskBefore;
extracter.ExtractCallbackSpec->Init(NExtractionMode::NOverwrite::kAskBefore, false, L"");
extracter.ExtractCallbackSpec->Init();
extracter.Move = move;
extracter.FolderOperations = folderOperations;
extracter.Indices = indices;;
@@ -678,11 +726,11 @@ void CApp::OnCopy(UStringVector &externalNames, bool move, bool copyToSame, int
}
if (copyToSame || move)
{
srcPanel.RefreshListCtrlSaveFocused();
srcPanel.RefreshListCtrl(srcSelState);
}
if (!copyToSame)
{
destPanel.RefreshListCtrlSaveFocused();
destPanel.RefreshListCtrl(destSelState);
srcPanel.KillSelection();
}
disableTimerProcessing1.Restore();
@@ -735,10 +783,10 @@ void CApp::OnSetSubFolder(int srcPanelIndex)
destPanel.RefreshListCtrl();
}
int CApp::GetFocusedPanelIndex()
/*
int CApp::GetFocusedPanelIndex() const
{
return LastFocusedPanel;
/*
HWND hwnd = ::GetFocus();
while(true)
{
@@ -752,8 +800,8 @@ int CApp::GetFocusedPanelIndex()
}
hwnd = GetParent(hwnd);
}
*/
}
*/
static CSysString g_ToolTipBuffer;