[BROWSEUI] CISFBand: Add "Open Folder" feature

CORE-13996 #resolve
This commit is contained in:
Stanislav Motylkov 2017-11-11 18:16:22 +03:00 committed by Giannis Adamopoulos
parent f01e6ed6c5
commit e12763d5bc
19 changed files with 38 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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));