Skip to content

Commit

Permalink
[BROWSEUI] CISFBand: Add "Open Folder" feature
Browse files Browse the repository at this point in the history
CORE-13996 #resolve
  • Loading branch information
binarymaster committed Nov 12, 2017
1 parent 9367ee3 commit cdb235f
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/bg-BG.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/de-DE.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/en-US.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/es-ES.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/fr-FR.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/he-IL.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/it-IT.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/ja-JP.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/pl-PL.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/pt-BR.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/ro-RO.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/ru-RU.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/sq-AL.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/tr-TR.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/uk-UA.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/zh-CN.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/lang/zh-TW.rc
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dll/win32/browseui/resource.h
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions dll/win32/browseui/shellbars/CISFBand.cpp
Expand Up @@ -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(SHELLEXECUTEINFO));

shexinfo.cbSize = sizeof(shexinfo);
shexinfo.fMask = SEE_MASK_IDLIST;
shexinfo.lpVerb = _T("explore");
shexinfo.lpIDList = m_pidl;
shexinfo.nShow = SW_SHOW;

if (!ShellExecuteEx(&shexinfo))
return E_FAIL;

break;
}
case IDM_SHOW_TEXT:
{
if (m_textFlag)
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit cdb235f

Please sign in to comment.