diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-12-31 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:58 +0300 |
commit | 3a524e5ba2d7bb0c46e11502822f8093dd2ab0f4 (patch) | |
tree | b33da9cac0a5fc22a16bdf4de106c8a9eefd1465 /CPP/7zip/UI/FileManager | |
parent | c1f1243a70558e86e14b1ea09dc287737378894b (diff) |
4.634.63
Diffstat (limited to 'CPP/7zip/UI/FileManager')
-rwxr-xr-x | CPP/7zip/UI/FileManager/App.cpp | 7 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/FM.dsp | 4 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/Panel.cpp | 4 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/Panel.h | 4 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/PanelFolderChange.cpp | 3 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/PanelItemOpen.cpp | 2 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/PanelItems.cpp | 3 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/RegistryUtils.cpp | 11 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/RegistryUtils.h | 3 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/UpdateCallback100.cpp | 3 | ||||
-rwxr-xr-x | CPP/7zip/UI/FileManager/makefile | 2 |
11 files changed, 39 insertions, 7 deletions
diff --git a/CPP/7zip/UI/FileManager/App.cpp b/CPP/7zip/UI/FileManager/App.cpp index db5ef0da..11c76458 100755 --- a/CPP/7zip/UI/FileManager/App.cpp +++ b/CPP/7zip/UI/FileManager/App.cpp @@ -355,8 +355,10 @@ HRESULT CApp::Create(HWND hwnd, const UString &mainPath, int xSizes[2], bool &ar ReadListMode(listMode); for (i = 0; i < kNumPanelsMax; i++) { - Panels[i]._ListViewMode = listMode.Panels[i]; - Panels[i]._xSize = xSizes[i]; + CPanel &panel = Panels[i]; + panel._ListViewMode = listMode.Panels[i]; + panel._xSize = xSizes[i]; + panel._flatModeForArc = ReadFlatView(i); } for (i = 0; i < kNumPanelsMax; i++) if (NumPanels > 1 || i == LastFocusedPanel) @@ -414,6 +416,7 @@ void CApp::Save() path = GetFolderPath(panel._parentFolders[0].ParentFolder); SavePanelPath(i, path); listMode.Panels[i] = panel.GetListViewMode(); + SaveFlatView(i, panel._flatModeForArc); } SaveListMode(listMode); } diff --git a/CPP/7zip/UI/FileManager/FM.dsp b/CPP/7zip/UI/FileManager/FM.dsp index 38e3e19a..d13e0a1f 100755 --- a/CPP/7zip/UI/FileManager/FM.dsp +++ b/CPP/7zip/UI/FileManager/FM.dsp @@ -1319,11 +1319,11 @@ SOURCE=..\Agent\UpdateCallbackAgent.h # PROP Default_Filter "" # Begin Source File -SOURCE=..\..\Compress\Copy\CopyCoder.cpp +SOURCE=..\..\Compress\CopyCoder.cpp # End Source File # Begin Source File -SOURCE=..\..\Compress\Copy\CopyCoder.h +SOURCE=..\..\Compress\CopyCoder.h # End Source File # End Group # Begin Group "Interface" diff --git a/CPP/7zip/UI/FileManager/Panel.cpp b/CPP/7zip/UI/FileManager/Panel.cpp index cdb12ced..40192c5f 100755 --- a/CPP/7zip/UI/FileManager/Panel.cpp +++ b/CPP/7zip/UI/FileManager/Panel.cpp @@ -756,6 +756,10 @@ void CPanel::SetListViewMode(UInt32 index) void CPanel::ChangeFlatMode() { _flatMode = !_flatMode; + if (_parentFolders.Size() > 0) + _flatModeForArc = _flatMode; + else + _flatModeForDisk = _flatMode; RefreshListCtrlSaveFocused(); } diff --git a/CPP/7zip/UI/FileManager/Panel.h b/CPP/7zip/UI/FileManager/Panel.h index 86f3dc25..4ba36a71 100755 --- a/CPP/7zip/UI/FileManager/Panel.h +++ b/CPP/7zip/UI/FileManager/Panel.h @@ -271,6 +271,8 @@ public: int _xSize; bool _flatMode; + bool _flatModeForDisk; + bool _flatModeForArc; bool _dontShowMode; @@ -336,6 +338,8 @@ public: _selectionIsDefined(false), _ListViewMode(3), _flatMode(false), + _flatModeForDisk(false), + _flatModeForArc(false), _xSize(300), _mySelectMode(false), _enableItemChangeNotify(true), diff --git a/CPP/7zip/UI/FileManager/PanelFolderChange.cpp b/CPP/7zip/UI/FileManager/PanelFolderChange.cpp index f4d024b2..01fec329 100755 --- a/CPP/7zip/UI/FileManager/PanelFolderChange.cpp +++ b/CPP/7zip/UI/FileManager/PanelFolderChange.cpp @@ -501,6 +501,8 @@ void CPanel::OpenParentFolder() if (_parentFolders.Size () > 1) OpenParentArchiveFolder(); _parentFolders.DeleteBack(); + if (_parentFolders.IsEmpty()) + _flatMode = _flatModeForDisk; } } @@ -528,6 +530,7 @@ void CPanel::CloseOpenFolders() OpenParentArchiveFolder(); _parentFolders.DeleteBack(); } + _flatMode = _flatModeForDisk; _folder.Release(); _library.Free(); } diff --git a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp index 4d087a07..c40b0d18 100755 --- a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp +++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp @@ -105,6 +105,8 @@ HRESULT CPanel::OpenItemAsArchive(const UString &name, _folder = newFolder; _library.Attach(library.Detach()); + _flatMode = _flatModeForArc; + return S_OK; } diff --git a/CPP/7zip/UI/FileManager/PanelItems.cpp b/CPP/7zip/UI/FileManager/PanelItems.cpp index 3b309d27..58e14759 100755 --- a/CPP/7zip/UI/FileManager/PanelItems.cpp +++ b/CPP/7zip/UI/FileManager/PanelItems.cpp @@ -572,7 +572,8 @@ void CPanel::OpenSelectedItems(bool tryInternal) if (focusedItem >= 0) { int realIndex = GetRealItemIndex(focusedItem); - if (realIndex == kParentIndex && (tryInternal || indices.Size() == 0)) + if (realIndex == kParentIndex && (tryInternal || indices.Size() == 0) && + _listView.GetItemState(focusedItem, LVIS_SELECTED) == LVIS_SELECTED) indices.Insert(0, realIndex); } diff --git a/CPP/7zip/UI/FileManager/RegistryUtils.cpp b/CPP/7zip/UI/FileManager/RegistryUtils.cpp index f071a9c9..ed118457 100755 --- a/CPP/7zip/UI/FileManager/RegistryUtils.cpp +++ b/CPP/7zip/UI/FileManager/RegistryUtils.cpp @@ -3,6 +3,7 @@ #include "StdAfx.h" #include "RegistryUtils.h" +#include "Common/IntToString.h" #include "Windows/Registry.h" using namespace NWindows; @@ -28,6 +29,8 @@ static const TCHAR *kLargePagesEnable = TEXT("LargePages"); // static const TCHAR *kSingleClick = TEXT("SingleClick"); // static const TCHAR *kUnderline = TEXT("Underline"); +static const TCHAR *kFlatViewName = TEXT("FlatViewArc"); + void SaveRegLang(const UString &langFile) { CKey key; @@ -149,4 +152,12 @@ bool ReadUnderline(){ return ReadOption(kUnderline, false); } void SaveLockMemoryEnable(bool enable) { Save7ZipOption(kLargePagesEnable, enable); } bool ReadLockMemoryEnable() { return Read7ZipOption(kLargePagesEnable, false); } +static CSysString GetFlatViewName(UInt32 panelIndex) +{ + TCHAR panelString[32]; + ConvertUInt64ToString(panelIndex, panelString); + return (CSysString)kFlatViewName + panelString; +} +void SaveFlatView(UInt32 panelIndex, bool enable) { SaveOption(GetFlatViewName(panelIndex), enable); } +bool ReadFlatView(UInt32 panelIndex) { return ReadOption(GetFlatViewName(panelIndex), false); } diff --git a/CPP/7zip/UI/FileManager/RegistryUtils.h b/CPP/7zip/UI/FileManager/RegistryUtils.h index 0fec6f80..9b9c91cf 100755 --- a/CPP/7zip/UI/FileManager/RegistryUtils.h +++ b/CPP/7zip/UI/FileManager/RegistryUtils.h @@ -43,4 +43,7 @@ void SaveUnderline(bool enable); bool ReadUnderline(); */ +void SaveFlatView(UInt32 panelIndex, bool enable); +bool ReadFlatView(UInt32 panelIndex); + #endif diff --git a/CPP/7zip/UI/FileManager/UpdateCallback100.cpp b/CPP/7zip/UI/FileManager/UpdateCallback100.cpp index 8f6597f4..e23c7d34 100755 --- a/CPP/7zip/UI/FileManager/UpdateCallback100.cpp +++ b/CPP/7zip/UI/FileManager/UpdateCallback100.cpp @@ -60,8 +60,9 @@ STDMETHODIMP CUpdateCallback100Imp::CompressOperation(const wchar_t *name) return S_OK; } -STDMETHODIMP CUpdateCallback100Imp::DeleteOperation(const wchar_t * /* name */) +STDMETHODIMP CUpdateCallback100Imp::DeleteOperation(const wchar_t *name) { + ProgressDialog.ProgressSynch.SetCurrentFileName(name); return S_OK; } diff --git a/CPP/7zip/UI/FileManager/makefile b/CPP/7zip/UI/FileManager/makefile index 78921b90..bc1d2662 100755 --- a/CPP/7zip/UI/FileManager/makefile +++ b/CPP/7zip/UI/FileManager/makefile @@ -185,7 +185,7 @@ $(UI_COMMON_OBJS): ../Common/$(*B).cpp $(AGENT_OBJS): ../Agent/$(*B).cpp $(COMPL) -$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp +$O\CopyCoder.obj: ../../Compress/$(*B).cpp $(COMPL) $(C_OBJS): ../../../../C/$(*B).c $(COMPL_O2) |