https://git.reactos.org/?p=reactos.git;a=commitdiff;h=410cfbfe15319ef7d736bc35219e6220c32c994a

commit 410cfbfe15319ef7d736bc35219e6220c32c994a
Author:     Giannis Adamopoulos <[email protected]>
AuthorDate: Mon Oct 22 19:18:28 2018 +0300
Commit:     Giannis Adamopoulos <[email protected]>
CommitDate: Mon Oct 22 19:18:28 2018 +0300

    [SHELL32] CDefView: Disable auto arrange in list and details view mode.
    This supersedes PR #927 and does it correctly.
---
 dll/win32/shell32/CDefView.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp
index 9e67b441df..cd2b91d41c 100644
--- a/dll/win32/shell32/CDefView.cpp
+++ b/dll/win32/shell32/CDefView.cpp
@@ -1192,6 +1192,11 @@ HRESULT CDefView::FillArrangeAsMenu(HMENU hmenuArrange)
                        m_sortInfo.nHeaderID + 0x30, 
                        MF_BYCOMMAND);
 
+    if (m_FolderSettings.ViewMode == FVM_DETAILS || m_FolderSettings.ViewMode 
== FVM_LIST)
+        EnableMenuItem(hmenuArrange, FCIDM_SHVIEW_AUTOARRANGE, MF_BYCOMMAND | 
MF_GRAYED);
+    else
+        EnableMenuItem(hmenuArrange, FCIDM_SHVIEW_AUTOARRANGE, MF_BYCOMMAND); 
+
     return S_OK;
 }
 

Reply via email to