You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/runner/general_settings.cpp
+50-10
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,13 @@
11
11
static std::wstring settings_theme = L"system";
12
12
staticbool run_as_elevated = false;
13
13
14
+
// TODO: add resource.rc for settings project and localize
15
+
namespacelocalized_strings
16
+
{
17
+
const std::wstring_view STARTUP_DISABLED_BY_POLICY = L"This setting has been disabled by your administrator.";
18
+
const std::wstring_view STARTUP_DISABLED_BY_USER = LR"(This setting has been disabled manually via <a href="https://ms_settings_startupapps" target="_blank">Startup Settings</a>.)";
19
+
}
20
+
14
21
json::JsonObject load_general_settings()
15
22
{
16
23
auto loaded = PTSettingsHelper::load_general_settings();
// Open the requested link in the default browser registered in the Shell
246
-
int res = static_cast<int>(reinterpret_cast<uintptr_t>(ShellExecute(nullptr, L"open", args.Uri().AbsoluteUri().c_str(), nullptr, nullptr, SW_SHOWNORMAL)));
247
-
WINRT_VERIFY(res > 32);
246
+
using winrt::Windows::Foundation::Uri;
247
+
Uri uri = args.Uri();
248
+
// WebView doesn't let us to open ms-settings:protocol links directly, so we translate it
249
+
// from a https placeholder
250
+
if (uri.AbsoluteUri() == L"https://ms_settings_startupapps/")
0 commit comments