https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d5f6b8c50b433ab1edfd5…
commit d5f6b8c50b433ab1edfd5f33fa9919bd2255bfc1
Author: Whindmar Saksit <whindsaks(a)proton.me>
AuthorDate: Thu Aug 15 18:40:32 2024 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Aug 15 18:40:32 2024 +0200
[SHELL32] Implement the Select verb in CommDlgBrowser (#7225)
- Use Select instead of Open default menu item.
- Support CDB2GVF_NOSELECTVERB, CDB2GVF_NOINCLUDEITEM and CDB2GVF_SHOWALLFILES
flags.
---
dll/win32/shell32/CDefView.cpp | 51 ++++++++++++++++++++++++-------
dll/win32/shell32/CDefaultContextMenu.cpp | 9 +++++-
dll/win32/shell32/lang/bg-BG.rc | 8 +++++
dll/win32/shell32/lang/ca-ES.rc | 8 +++++
dll/win32/shell32/lang/cs-CZ.rc | 8 +++++
dll/win32/shell32/lang/da-DK.rc | 8 +++++
dll/win32/shell32/lang/de-DE.rc | 8 +++++
dll/win32/shell32/lang/el-GR.rc | 8 +++++
dll/win32/shell32/lang/en-GB.rc | 8 +++++
dll/win32/shell32/lang/en-US.rc | 8 +++++
dll/win32/shell32/lang/es-ES.rc | 8 +++++
dll/win32/shell32/lang/et-EE.rc | 8 +++++
dll/win32/shell32/lang/eu-ES.rc | 8 +++++
dll/win32/shell32/lang/fi-FI.rc | 8 +++++
dll/win32/shell32/lang/fr-FR.rc | 8 +++++
dll/win32/shell32/lang/he-IL.rc | 8 +++++
dll/win32/shell32/lang/hi-IN.rc | 8 +++++
dll/win32/shell32/lang/hu-HU.rc | 8 +++++
dll/win32/shell32/lang/id-ID.rc | 8 +++++
dll/win32/shell32/lang/it-IT.rc | 8 +++++
dll/win32/shell32/lang/ja-JP.rc | 8 +++++
dll/win32/shell32/lang/ko-KR.rc | 8 +++++
dll/win32/shell32/lang/nl-NL.rc | 8 +++++
dll/win32/shell32/lang/no-NO.rc | 8 +++++
dll/win32/shell32/lang/pl-PL.rc | 8 +++++
dll/win32/shell32/lang/pt-BR.rc | 8 +++++
dll/win32/shell32/lang/pt-PT.rc | 8 +++++
dll/win32/shell32/lang/ro-RO.rc | 8 +++++
dll/win32/shell32/lang/ru-RU.rc | 8 +++++
dll/win32/shell32/lang/sk-SK.rc | 8 +++++
dll/win32/shell32/lang/sl-SI.rc | 8 +++++
dll/win32/shell32/lang/sq-AL.rc | 8 +++++
dll/win32/shell32/lang/sv-SE.rc | 8 +++++
dll/win32/shell32/lang/tr-TR.rc | 8 +++++
dll/win32/shell32/lang/uk-UA.rc | 8 +++++
dll/win32/shell32/lang/zh-CN.rc | 8 +++++
dll/win32/shell32/lang/zh-HK.rc | 8 +++++
dll/win32/shell32/lang/zh-TW.rc | 8 +++++
dll/win32/shell32/shresdef.h | 1 +
sdk/include/psdk/shobjidl.idl | 5 +++
40 files changed, 342 insertions(+), 12 deletions(-)
diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp
index ad9317d0a39..3ada8ae10b7 100644
--- a/dll/win32/shell32/CDefView.cpp
+++ b/dll/win32/shell32/CDefView.cpp
@@ -48,8 +48,9 @@ enum {
DEFVIEW_ARRANGESORT_MAX = DEFVIEW_ARRANGESORT_MAXENUM + 1, // Reserve one extra for
the current sort-by column
DVIDM_ARRANGESORT_LAST = FCIDM_SHVIEWLAST,
DVIDM_ARRANGESORT_FIRST = DVIDM_ARRANGESORT_LAST - (DEFVIEW_ARRANGESORT_MAX - 1),
+ DVIDM_COMMDLG_SELECT = DVIDM_ARRANGESORT_FIRST - 1,
- DVIDM_CONTEXTMENU_LAST = DVIDM_ARRANGESORT_FIRST - 1,
+ DVIDM_CONTEXTMENU_LAST = DVIDM_COMMDLG_SELECT - 1,
// FIXME: FCIDM_SHVIEWFIRST is 0 and using that with QueryContextMenu is a
// bad idea because it hides bugs related to the ids in ici.lpVerb.
// CONTEXT_MENU_BASE_ID acknowledges this but failed to apply the fix everywhere.
@@ -336,6 +337,18 @@ public:
HRESULT SaveViewState(IStream *pStream);
void UpdateFolderViewFlags();
+ DWORD GetCommDlgViewFlags()
+ {
+ CComPtr<ICommDlgBrowser2> pcdb2;
+ if (m_pCommDlgBrowser &&
SUCCEEDED(m_pCommDlgBrowser->QueryInterface(IID_PPV_ARG(ICommDlgBrowser2,
&pcdb2))))
+ {
+ DWORD flags;
+ if (SUCCEEDED(pcdb2->GetViewFlags(&flags)))
+ return flags;
+ }
+ return 0;
+ }
+
// *** IOleWindow methods ***
STDMETHOD(GetWindow)(HWND *lphwnd) override;
STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override;
@@ -624,7 +637,7 @@ HRESULT CDefView::IncludeObject(PCUITEMID_CHILD pidl)
{
HRESULT ret = S_OK;
- if (m_pCommDlgBrowser.p != NULL)
+ if (m_pCommDlgBrowser && !(GetCommDlgViewFlags() &
CDB2GVF_NOINCLUDEITEM))
{
TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl);
ret = m_pCommDlgBrowser->IncludeObject(this, pidl);
@@ -1477,6 +1490,9 @@ HRESULT CDefView::FillList(BOOL IsRefreshCommand)
SHELLSTATE shellstate;
SHGetSetSettings(&shellstate, SSF_SHOWALLOBJECTS | SSF_SHOWSUPERHIDDEN, FALSE);
+ if (GetCommDlgViewFlags() & CDB2GVF_SHOWALLFILES)
+ shellstate.fShowAllObjects = shellstate.fShowSuperHidden = TRUE;
+
if (shellstate.fShowAllObjects)
{
dFlags |= SHCONTF_INCLUDEHIDDEN;
@@ -2182,6 +2198,15 @@ LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM
lParam, BOOL &b
if (FAILED_UNEXPECTEDLY(hResult))
return 0;
+ if (m_pCommDlgBrowser && !(GetCommDlgViewFlags() &
CDB2GVF_NOSELECTVERB))
+ {
+ HMENU hMenuSource = LoadMenuW(_AtlBaseModule.GetResourceInstance(),
MAKEINTRESOURCEW(IDM_DVSELECT));
+ Shell_MergeMenus(m_hContextMenu, GetSubMenu(hMenuSource, 0), 0,
DVIDM_COMMDLG_SELECT, 0xffff, MM_ADDSEPARATOR | MM_DONTREMOVESEPS);
+ DestroyMenu(hMenuSource);
+ SetMenuDefaultItem(m_hContextMenu, DVIDM_COMMDLG_SELECT, MF_BYCOMMAND);
+ // TODO: ICommDlgBrowser2::GetDefaultMenuText == S_OK
+ }
+
// There is no position requested, so try to find one
if (lParam == ~0)
{
@@ -2215,21 +2240,25 @@ LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM
lParam, BOOL &b
m_ListView.ClientToScreen(&pt);
}
+ CComPtr<ICommDlgBrowser2> pcdb2;
+ if (m_pCommDlgBrowser &&
SUCCEEDED(m_pCommDlgBrowser->QueryInterface(IID_PPV_ARG(ICommDlgBrowser2,
&pcdb2))))
+ pcdb2->Notify(static_cast<IShellView*>(this),
CDB2N_CONTEXTMENU_START);
+
// This runs the message loop, calling back to us with f.e. WM_INITPOPUP (hence why
m_hContextMenu and m_pCM exist)
uCommand = TrackPopupMenu(m_hContextMenu,
TPM_LEFTALIGN | TPM_RETURNCMD | TPM_LEFTBUTTON |
TPM_RIGHTBUTTON,
pt.x, pt.y, 0, m_hWnd, NULL);
- if (uCommand == 0)
- return 0;
-
if (uCommand >= DVIDM_ARRANGESORT_FIRST && uCommand <=
DVIDM_ARRANGESORT_LAST)
- return SendMessage(WM_COMMAND, uCommand, 0);
-
- if (uCommand == FCIDM_SHVIEW_OPEN && OnDefaultCommand() == S_OK)
- return 0;
-
- InvokeContextMenuCommand(m_pCM, MAKEINTRESOURCEA(uCommand - CONTEXT_MENU_BASE_ID),
&pt);
+ {
+ SendMessage(WM_COMMAND, uCommand, 0);
+ }
+ else if (uCommand != 0 && !(uCommand == DVIDM_COMMDLG_SELECT &&
OnDefaultCommand() == S_OK))
+ {
+ InvokeContextMenuCommand(m_pCM, MAKEINTRESOURCEA(uCommand -
CONTEXT_MENU_BASE_ID), &pt);
+ }
+ if (pcdb2)
+ pcdb2->Notify(static_cast<IShellView*>(this), CDB2N_CONTEXTMENU_DONE);
return 0;
}
diff --git a/dll/win32/shell32/CDefaultContextMenu.cpp
b/dll/win32/shell32/CDefaultContextMenu.cpp
index f55ed72dc3c..ed2e95bb1c7 100644
--- a/dll/win32/shell32/CDefaultContextMenu.cpp
+++ b/dll/win32/shell32/CDefaultContextMenu.cpp
@@ -876,7 +876,7 @@ CDefaultContextMenu::QueryContextMenu(
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, cIds);
/* Add the default part of the menu */
- HMENU hmenuDefault = LoadMenu(_AtlBaseModule.GetResourceInstance(),
L"MENU_SHV_FILE");
+ HMENU hmenuDefault = LoadMenuW(_AtlBaseModule.GetResourceInstance(),
L"MENU_SHV_FILE");
/* Remove uneeded entries */
if (!(rfg & SFGAO_CANMOVE))
@@ -1260,6 +1260,13 @@ CDefaultContextMenu::BrowserFlagsFromVerb(LPCMINVOKECOMMANDINFOEX
lpcmi, PStatic
else
FlagsName = L"BrowserFlags";
+ CComPtr<ICommDlgBrowser> pcdb;
+ if (SUCCEEDED(psb->QueryInterface(IID_PPV_ARG(ICommDlgBrowser, &pcdb))))
+ {
+ if (LOBYTE(GetVersion()) < 6 || FlagsName[0] == 'E')
+ return 0; // Don't browse in-place
+ }
+
/* Try to get the flag from the verb */
hr = StringCbPrintfW(wszKey, sizeof(wszKey), L"shell\\%s",
pEntry->Verb.GetString());
if (FAILED_UNEXPECTEDLY(hr))
diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc
index 3c84e8d5b69..3f6ca3fdc89 100644
--- a/dll/win32/shell32/lang/bg-BG.rc
+++ b/dll/win32/shell32/lang/bg-BG.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Търсене на папка"
diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc
index 6feb6846e71..adb698a148d 100644
--- a/dll/win32/shell32/lang/ca-ES.rc
+++ b/dll/win32/shell32/lang/ca-ES.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Browse for Folder"
diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc
index b00c2827d8c..95ad5dcc8f7 100644
--- a/dll/win32/shell32/lang/cs-CZ.rc
+++ b/dll/win32/shell32/lang/cs-CZ.rc
@@ -96,6 +96,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Procházet..."
diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc
index b8b17b2a898..e7b84e57701 100644
--- a/dll/win32/shell32/lang/da-DK.rc
+++ b/dll/win32/shell32/lang/da-DK.rc
@@ -95,6 +95,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Søg efter Mappe"
diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc
index f4749e2fba7..3f558834d2a 100644
--- a/dll/win32/shell32/lang/de-DE.rc
+++ b/dll/win32/shell32/lang/de-DE.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Verzeichnis auswählen"
diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc
index e6290b69f2d..0fd46399191 100644
--- a/dll/win32/shell32/lang/el-GR.rc
+++ b/dll/win32/shell32/lang/el-GR.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Αναζήτηση φακέλου"
diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc
index 732adf7b38d..0a191cbc16b 100644
--- a/dll/win32/shell32/lang/en-GB.rc
+++ b/dll/win32/shell32/lang/en-GB.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Browse for Folder"
diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc
index 2c385b912a4..83f1245ea5f 100644
--- a/dll/win32/shell32/lang/en-US.rc
+++ b/dll/win32/shell32/lang/en-US.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Browse for Folder"
diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc
index 9f00de189ba..ed20a44cdcd 100644
--- a/dll/win32/shell32/lang/es-ES.rc
+++ b/dll/win32/shell32/lang/es-ES.rc
@@ -97,6 +97,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Explorar carpeta"
diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc
index 01bfb8a93f1..056706f257f 100644
--- a/dll/win32/shell32/lang/et-EE.rc
+++ b/dll/win32/shell32/lang/et-EE.rc
@@ -95,6 +95,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Vali kaust"
diff --git a/dll/win32/shell32/lang/eu-ES.rc b/dll/win32/shell32/lang/eu-ES.rc
index d2bc6c84741..a94192b88ca 100644
--- a/dll/win32/shell32/lang/eu-ES.rc
+++ b/dll/win32/shell32/lang/eu-ES.rc
@@ -95,6 +95,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Karpeta esploratu"
diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc
index 5be429d66c0..cb68d3b4682 100644
--- a/dll/win32/shell32/lang/fi-FI.rc
+++ b/dll/win32/shell32/lang/fi-FI.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Valitse Kansio"
diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc
index a43ab75d30f..8304728dffa 100644
--- a/dll/win32/shell32/lang/fr-FR.rc
+++ b/dll/win32/shell32/lang/fr-FR.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Sé&lectionner", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Parcourir"
diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc
index 074835d39ce..c56e94f7f9d 100644
--- a/dll/win32/shell32/lang/he-IL.rc
+++ b/dll/win32/shell32/lang/he-IL.rc
@@ -95,6 +95,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "בחירת תיקיה"
diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc
index 1080b805d21..5029f8f50c4 100644
--- a/dll/win32/shell32/lang/hi-IN.rc
+++ b/dll/win32/shell32/lang/hi-IN.rc
@@ -95,6 +95,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "फोल्डर खोंजे"
diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc
index 830f3c46f04..b7e3dd8dc69 100644
--- a/dll/win32/shell32/lang/hu-HU.rc
+++ b/dll/win32/shell32/lang/hu-HU.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Mappák böngészése"
diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc
index 6360884ee19..0a3ce0c2e23 100644
--- a/dll/win32/shell32/lang/id-ID.rc
+++ b/dll/win32/shell32/lang/id-ID.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Jelajah Folder"
diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc
index 69e0d5ae594..5cc05d35a9a 100644
--- a/dll/win32/shell32/lang/it-IT.rc
+++ b/dll/win32/shell32/lang/it-IT.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Sfoglia Cartella"
diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc
index 84cb86c57df..5eaa0bac54f 100644
--- a/dll/win32/shell32/lang/ja-JP.rc
+++ b/dll/win32/shell32/lang/ja-JP.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "フォルダの参照"
diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc
index 4f0f3a5b315..721a9433616 100644
--- a/dll/win32/shell32/lang/ko-KR.rc
+++ b/dll/win32/shell32/lang/ko-KR.rc
@@ -95,6 +95,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "폴더 찾아보기"
diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc
index 5b39ea455c3..85fe4161723 100644
--- a/dll/win32/shell32/lang/nl-NL.rc
+++ b/dll/win32/shell32/lang/nl-NL.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Browse for Folder"
diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc
index 47ee261927d..85d13ec384e 100644
--- a/dll/win32/shell32/lang/no-NO.rc
+++ b/dll/win32/shell32/lang/no-NO.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Bla etter mappe"
diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc
index 827346d2605..1a9f21e4ad8 100644
--- a/dll/win32/shell32/lang/pl-PL.rc
+++ b/dll/win32/shell32/lang/pl-PL.rc
@@ -97,6 +97,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Wybierz folder"
diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc
index a30fb7aad52..8aaf2f5b722 100644
--- a/dll/win32/shell32/lang/pt-BR.rc
+++ b/dll/win32/shell32/lang/pt-BR.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Procurar pasta"
diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc
index cf1a7ec8687..9fe1d302376 100644
--- a/dll/win32/shell32/lang/pt-PT.rc
+++ b/dll/win32/shell32/lang/pt-PT.rc
@@ -98,6 +98,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Procurar pasta"
diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc
index 3d801cec428..02d56b8673d 100644
--- a/dll/win32/shell32/lang/ro-RO.rc
+++ b/dll/win32/shell32/lang/ro-RO.rc
@@ -96,6 +96,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Specificare folder"
diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc
index 6f853297466..44d9255511c 100644
--- a/dll/win32/shell32/lang/ru-RU.rc
+++ b/dll/win32/shell32/lang/ru-RU.rc
@@ -97,6 +97,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Обзор"
diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc
index 22057697c15..b05b408be0e 100644
--- a/dll/win32/shell32/lang/sk-SK.rc
+++ b/dll/win32/shell32/lang/sk-SK.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Browse for Folder"
diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc
index f85da030386..bc1b6d1c70d 100644
--- a/dll/win32/shell32/lang/sl-SI.rc
+++ b/dll/win32/shell32/lang/sl-SI.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Browse for Folder"
diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc
index 5dcf7277f28..c1f0973b65d 100644
--- a/dll/win32/shell32/lang/sq-AL.rc
+++ b/dll/win32/shell32/lang/sq-AL.rc
@@ -95,6 +95,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Shfleto për Dosje"
diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc
index fb0e8d23639..929bbd914b7 100644
--- a/dll/win32/shell32/lang/sv-SE.rc
+++ b/dll/win32/shell32/lang/sv-SE.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Bläddra efter mapp"
diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc
index 140aeb7a933..c8bbcc708a8 100644
--- a/dll/win32/shell32/lang/tr-TR.rc
+++ b/dll/win32/shell32/lang/tr-TR.rc
@@ -97,6 +97,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Dizin İçin Göz At"
diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc
index daa8ba822be..b382287c6b8 100644
--- a/dll/win32/shell32/lang/uk-UA.rc
+++ b/dll/win32/shell32/lang/uk-UA.rc
@@ -88,6 +88,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Огляд папок"
diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc
index 6b5c75b2d23..501eda39614 100644
--- a/dll/win32/shell32/lang/zh-CN.rc
+++ b/dll/win32/shell32/lang/zh-CN.rc
@@ -98,6 +98,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "浏览文件夹"
diff --git a/dll/win32/shell32/lang/zh-HK.rc b/dll/win32/shell32/lang/zh-HK.rc
index 92327829346..b67aae92952 100644
--- a/dll/win32/shell32/lang/zh-HK.rc
+++ b/dll/win32/shell32/lang/zh-HK.rc
@@ -96,6 +96,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "瀏覽資料夾"
diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc
index ed2c1c2d7fb..c4e5ec18405 100644
--- a/dll/win32/shell32/lang/zh-TW.rc
+++ b/dll/win32/shell32/lang/zh-TW.rc
@@ -97,6 +97,14 @@ BEGIN
END
END
+IDM_DVSELECT MENU
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "Se&lect", 0
+ END
+END
+
IDD_BROWSE_FOR_FOLDER DIALOGEX 15, 40, 188, 192
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "瀏覽資料夾"
diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h
index 283e4f3d8d3..ca9a02e7cf6 100644
--- a/dll/win32/shell32/shresdef.h
+++ b/dll/win32/shell32/shresdef.h
@@ -878,6 +878,7 @@
#define IDM_COPYHERE 0x7
#define IDM_MOVEHERE 0x8
#define IDM_LINKHERE 0xB
+#define IDM_DVSELECT 0x104
#define IDM_MYDOCUMENTS 516
#define IDM_MYPICTURES 518
diff --git a/sdk/include/psdk/shobjidl.idl b/sdk/include/psdk/shobjidl.idl
index f137d474de4..a31a145190b 100644
--- a/sdk/include/psdk/shobjidl.idl
+++ b/sdk/include/psdk/shobjidl.idl
@@ -1442,6 +1442,11 @@ cpp_quote("#define CDBOSC_STATECHANGE 0x00000004")
]
interface ICommDlgBrowser2 : ICommDlgBrowser
{
+cpp_quote("#define CDB2N_CONTEXTMENU_DONE 1")
+cpp_quote("#define CDB2N_CONTEXTMENU_START 2")
+cpp_quote("#define CDB2GVF_SHOWALLFILES 0x00000001")
+cpp_quote("#define CDB2GVF_NOSELECTVERB 0x00000008")
+cpp_quote("#define CDB2GVF_NOINCLUDEITEM 0x00000010 /* IncludeObject should not be
called */")
HRESULT Notify(
[in] IShellView *ppshv,