https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e12763d5bc45a0a0fcf20…
commit e12763d5bc45a0a0fcf20c2898c1850e83516f85
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Sat Nov 11 18:16:22 2017 +0300
[BROWSEUI] CISFBand: Add "Open Folder" feature
CORE-13996 #resolve
---
dll/win32/browseui/lang/bg-BG.rc | 1 +
dll/win32/browseui/lang/de-DE.rc | 1 +
dll/win32/browseui/lang/en-US.rc | 1 +
dll/win32/browseui/lang/es-ES.rc | 1 +
dll/win32/browseui/lang/fr-FR.rc | 1 +
dll/win32/browseui/lang/he-IL.rc | 1 +
dll/win32/browseui/lang/it-IT.rc | 1 +
dll/win32/browseui/lang/ja-JP.rc | 1 +
dll/win32/browseui/lang/pl-PL.rc | 1 +
dll/win32/browseui/lang/pt-BR.rc | 1 +
dll/win32/browseui/lang/ro-RO.rc | 1 +
dll/win32/browseui/lang/ru-RU.rc | 1 +
dll/win32/browseui/lang/sq-AL.rc | 1 +
dll/win32/browseui/lang/tr-TR.rc | 1 +
dll/win32/browseui/lang/uk-UA.rc | 1 +
dll/win32/browseui/lang/zh-CN.rc | 1 +
dll/win32/browseui/lang/zh-TW.rc | 1 +
dll/win32/browseui/resource.h | 1 +
dll/win32/browseui/shellbars/CISFBand.cpp | 20 ++++++++++++++++++++
19 files changed, 38 insertions(+)
diff --git a/dll/win32/browseui/lang/bg-BG.rc b/dll/win32/browseui/lang/bg-BG.rc
index 3c926e1d70..8a269d8d6d 100644
--- a/dll/win32/browseui/lang/bg-BG.rc
+++ b/dll/win32/browseui/lang/bg-BG.rc
@@ -102,6 +102,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/de-DE.rc b/dll/win32/browseui/lang/de-DE.rc
index ae7f85d518..eeb812102a 100644
--- a/dll/win32/browseui/lang/de-DE.rc
+++ b/dll/win32/browseui/lang/de-DE.rc
@@ -120,6 +120,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/en-US.rc b/dll/win32/browseui/lang/en-US.rc
index be6f51ae8c..29aabb6f56 100644
--- a/dll/win32/browseui/lang/en-US.rc
+++ b/dll/win32/browseui/lang/en-US.rc
@@ -120,6 +120,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/es-ES.rc b/dll/win32/browseui/lang/es-ES.rc
index 7003b588e6..420f350f3e 100644
--- a/dll/win32/browseui/lang/es-ES.rc
+++ b/dll/win32/browseui/lang/es-ES.rc
@@ -104,6 +104,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/fr-FR.rc b/dll/win32/browseui/lang/fr-FR.rc
index da07016e3f..90c89bab9c 100644
--- a/dll/win32/browseui/lang/fr-FR.rc
+++ b/dll/win32/browseui/lang/fr-FR.rc
@@ -120,6 +120,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/he-IL.rc b/dll/win32/browseui/lang/he-IL.rc
index dfb3dd7100..28a1d629f2 100644
--- a/dll/win32/browseui/lang/he-IL.rc
+++ b/dll/win32/browseui/lang/he-IL.rc
@@ -104,6 +104,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/it-IT.rc b/dll/win32/browseui/lang/it-IT.rc
index 7fa4e6f7a0..b8beedf2ca 100644
--- a/dll/win32/browseui/lang/it-IT.rc
+++ b/dll/win32/browseui/lang/it-IT.rc
@@ -102,6 +102,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/ja-JP.rc b/dll/win32/browseui/lang/ja-JP.rc
index def88114c6..2d73353080 100644
--- a/dll/win32/browseui/lang/ja-JP.rc
+++ b/dll/win32/browseui/lang/ja-JP.rc
@@ -120,6 +120,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/pl-PL.rc b/dll/win32/browseui/lang/pl-PL.rc
index 8d5f6a6f5d..f1799d0d33 100644
--- a/dll/win32/browseui/lang/pl-PL.rc
+++ b/dll/win32/browseui/lang/pl-PL.rc
@@ -110,6 +110,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/pt-BR.rc b/dll/win32/browseui/lang/pt-BR.rc
index 2915c1e8cf..a1147b38a6 100644
--- a/dll/win32/browseui/lang/pt-BR.rc
+++ b/dll/win32/browseui/lang/pt-BR.rc
@@ -104,6 +104,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/ro-RO.rc b/dll/win32/browseui/lang/ro-RO.rc
index bbe6b76943..f026a96094 100644
--- a/dll/win32/browseui/lang/ro-RO.rc
+++ b/dll/win32/browseui/lang/ro-RO.rc
@@ -104,6 +104,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/ru-RU.rc b/dll/win32/browseui/lang/ru-RU.rc
index 593d685b83..2fa74fc922 100644
--- a/dll/win32/browseui/lang/ru-RU.rc
+++ b/dll/win32/browseui/lang/ru-RU.rc
@@ -104,6 +104,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/sq-AL.rc b/dll/win32/browseui/lang/sq-AL.rc
index 31d615019a..0decaa6937 100644
--- a/dll/win32/browseui/lang/sq-AL.rc
+++ b/dll/win32/browseui/lang/sq-AL.rc
@@ -121,6 +121,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/tr-TR.rc b/dll/win32/browseui/lang/tr-TR.rc
index 86e6ed6d6a..1fe3b6fee6 100644
--- a/dll/win32/browseui/lang/tr-TR.rc
+++ b/dll/win32/browseui/lang/tr-TR.rc
@@ -104,6 +104,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/uk-UA.rc b/dll/win32/browseui/lang/uk-UA.rc
index 0cebd38376..ff49e59e97 100644
--- a/dll/win32/browseui/lang/uk-UA.rc
+++ b/dll/win32/browseui/lang/uk-UA.rc
@@ -104,6 +104,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/zh-CN.rc b/dll/win32/browseui/lang/zh-CN.rc
index ca887e9670..7ab4cf42ff 100644
--- a/dll/win32/browseui/lang/zh-CN.rc
+++ b/dll/win32/browseui/lang/zh-CN.rc
@@ -122,6 +122,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/lang/zh-TW.rc b/dll/win32/browseui/lang/zh-TW.rc
index 3889152c0c..cd9b4ef5fd 100644
--- a/dll/win32/browseui/lang/zh-TW.rc
+++ b/dll/win32/browseui/lang/zh-TW.rc
@@ -122,6 +122,7 @@ BEGIN
MENUITEM "&Large Icons", IDM_LARGE_ICONS
MENUITEM "&Small Icons", IDM_SMALL_ICONS
END
+ MENUITEM "&Open Folder", IDM_OPEN_FOLDER
MENUITEM "&Show Text", IDM_SHOW_TEXT
END
END
diff --git a/dll/win32/browseui/resource.h b/dll/win32/browseui/resource.h
index fbad0083f7..24303de229 100644
--- a/dll/win32/browseui/resource.h
+++ b/dll/win32/browseui/resource.h
@@ -69,6 +69,7 @@
#define IDM_SMALL_ICONS 2003
#define IDM_SHOW_TEXT 2004
#define IDM_VIEW_MENU 2005
+#define IDM_OPEN_FOLDER 2006
/* Random id for band close button, feel free to change it */
#define IDM_BASEBAR_CLOSE 0xA200
diff --git a/dll/win32/browseui/shellbars/CISFBand.cpp
b/dll/win32/browseui/shellbars/CISFBand.cpp
index 2ea32eb63a..042a10640e 100644
--- a/dll/win32/browseui/shellbars/CISFBand.cpp
+++ b/dll/win32/browseui/shellbars/CISFBand.cpp
@@ -600,6 +600,23 @@ HRESULT CISFBand::CreateSimpleToolbar(HWND hWndParent)
if (FAILED_UNEXPECTEDLY(hr)) return hr;
break;
}
+ case IDM_OPEN_FOLDER:
+ {
+ SHELLEXECUTEINFO shexinfo;
+
+ memset(&shexinfo, 0x0, sizeof(shexinfo));
+
+ shexinfo.cbSize = sizeof(shexinfo);
+ shexinfo.fMask = SEE_MASK_IDLIST;
+ shexinfo.lpVerb = _T("open");
+ shexinfo.lpIDList = m_pidl;
+ shexinfo.nShow = SW_SHOW;
+
+ if (!ShellExecuteEx(&shexinfo))
+ return E_FAIL;
+
+ break;
+ }
case IDM_SHOW_TEXT:
{
if (m_textFlag)
@@ -646,6 +663,9 @@ HRESULT CISFBand::CreateSimpleToolbar(HWND hWndParent)
CheckMenuItem(qMenu, IDM_SMALL_ICONS, MF_UNCHECKED);
}
+ if (_ILIsDesktop(m_pidl))
+ DeleteMenu(qMenu, IDM_OPEN_FOLDER, MF_BYCOMMAND);
+
UINT idMax = Shell_MergeMenus(hmenu, GetSubMenu(qMenu, 0), indexMenu, idCmdFirst,
idCmdLast, MM_SUBMENUSHAVEIDS);
DestroyMenu(qMenu);
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(idMax - idCmdFirst +1));