mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-12 09:57:24 +10:00
Search modern settings using our new shell folder
Use our modern settings shell folder (`shell:::{82E749ED-B971-4550-BAF7-06AA2BF7E836}`)
to search (enumerate) modern settings.
Fixes #57
This commit is contained in:
@@ -2192,11 +2192,15 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
|
||||
|
||||
if (res==CMD_PINSETTING)
|
||||
{
|
||||
CSearchManager::TItemCategory cat=(CSearchManager::TItemCategory)(item.categoryHash&CSearchManager::CATEGORY_MASK);
|
||||
if (cat==CSearchManager::CATEGORY_SETTING)
|
||||
CreatePinLink(pItemPidl1,item.name,NULL,0);
|
||||
else if (cat==CSearchManager::CATEGORY_METROSETTING)
|
||||
CreatePinLink(pItemPidl1,item.name,L"%windir%\\ImmersiveControlPanel\\systemsettings.exe",0);
|
||||
CString iconPath;
|
||||
if (item.pItemInfo)
|
||||
{
|
||||
CItemManager::RWLock lock(&g_ItemManager, false, CItemManager::RWLOCK_ITEMS);
|
||||
if (_wcsicmp(PathFindExtension(item.pItemInfo->GetPath()), L".settingcontent-ms") == 0)
|
||||
iconPath = L"%windir%\\ImmersiveControlPanel\\systemsettings.exe";
|
||||
}
|
||||
|
||||
CreatePinLink(pItemPidl1, item.name, iconPath.IsEmpty() ? nullptr : iconPath.GetString(), 0);
|
||||
m_bRefreshItems=true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user