ModernSettings: Add support for more settings

Based on `HostId`:
* {7E0522FC-1AC4-41CA-AFD0-3610417A9C41}
  execute `shell:::{PageId}`
* {12B1697E-D3A0-4DBC-B568-CCF64A3F934D}
  execute command in `DeepLink`
This commit is contained in:
ge0rdi
2020-08-31 19:20:09 +02:00
parent 7ee668e474
commit 6581868336
4 changed files with 54 additions and 15 deletions

View File

@@ -91,16 +91,11 @@ public:
ULONG i = 0;
while (SUCCEEDED(hr) && i < celt && m_item < m_items.size())
{
const auto& s = m_items[m_item];
if ((s.hostId.empty() && s.deepLink.empty()) ||
(s.hostId == L"{6E6DDBCB-9C89-434B-A994-D5F22239523B}" && !s.deepLink.empty()))
hr = m_parent->CreateChildID(m_items[m_item], &rgelt[i]);
if (SUCCEEDED(hr))
{
hr = m_parent->CreateChildID(s.fileName, &rgelt[i]);
if (SUCCEEDED(hr))
{
celtFetched++;
i++;
}
celtFetched++;
i++;
}
m_item++;
@@ -141,7 +136,7 @@ public:
private:
CComPtr<CModernSettingsShellFolder> m_parent;
std::shared_ptr<ModernSettings> m_settings;
std::vector<ModernSettings::Setting> m_items;
std::vector<std::wstring_view> m_items;
DWORD m_item = 0;
};