mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-14 03:16:38 +10:00
Added option to customize Pinned folder location
Items can be pinned to directories that require administative privileges (such as Open-Shell's default installation directory), so long as users take ownership of the pinned folder. Also adds a command to Open-Shell's context menu that opens the current pinned folder. Adds general support for directory-based settings by creating a new setting type called TYPE_DIRECTORY which uses a new bool added to BrowseLinkHelper, called bFoldersOnly. START_MENU_PINNED_ROOT has been removed, and all instances of both it and BrowseLinkHelper have been adjusted accordingly. To create your own directory-based settings, use CSetting::TYPE_DIRECTORY. Empty directory paths are reset to their default value as they can cause unexpected behavior.
This commit is contained in:
committed by
Ibuprophen
parent
27e5c2bc74
commit
8031739110
@@ -91,7 +91,7 @@ STDMETHODIMP CStartMenuExt::Initialize( PCIDLIST_ABSOLUTE pidlFolder, IDataObjec
|
||||
bUsePinned=(setting==1);
|
||||
if (bUsePinned)
|
||||
{
|
||||
Strcpy(m_PinFolder1,_countof(m_PinFolder1),L"%APPDATA%\\OpenShell\\Pinned\\");
|
||||
Sprintf(m_PinFolder1,_countof(m_PinFolder1),L"%s\\",GetSettingString(L"PinnedItemsPath"));
|
||||
DoEnvironmentSubst(m_PinFolder1,_countof(m_PinFolder1));
|
||||
m_PinFolder2[0]=0;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ CSetting g_Settings[]={
|
||||
{L"DisablePinExt",CSetting::TYPE_BOOL,0,0,0},
|
||||
{L"FolderStartMenu",CSetting::TYPE_STRING,0,0,L""},
|
||||
{L"FolderCommonStartMenu",CSetting::TYPE_STRING,0,0,L""},
|
||||
{L"PinnedItemsPath",CSetting::TYPE_DIRECTORY,0,0,L"%APPDATA%\\OpenShell\\Pinned"},
|
||||
|
||||
{L"Language",CSetting::TYPE_GROUP},
|
||||
{L"Language",CSetting::TYPE_STRING,0,0,L"",CSetting::FLAG_COLD|CSetting::FLAG_SHARED},
|
||||
|
||||
Reference in New Issue
Block a user