diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-26 11:24:30 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-26 11:19:46 +0000 |
commit | bc9e978a5df5f2ee84b32d1a4a67d5e6eadb4e86 (patch) | |
tree | b79f9ca5d75e530bddc4c3c55999b7818e534fec /cui | |
parent | beb1479b9b2957d63d1bdadc3cc6839a92bf0144 (diff) |
Hide Quickstarter from General options in Windows store apps
In that environment, the shell:Startup shortcut created by us points to the
quickstart.exe under Program Files\WindowsApps\<StoreSpecificAppDir>\program.
The resulting shortcut can't launch, because of an inaccessible part in the
path (the protected WindowsApps directory). So the feature does not work in
the dialog.
Windows store apps should advertise the Windows startup task in the manifest.
Let's just hide the dialog entry in this case. A possible TODO would be to
provide a button instead, which would open the Startup Apps system applet,
similar to what we do for Default apps for file associations.
Change-Id: Ieafdf6d23ced96506b01c6b3cf9fb12904696df1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147735
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 02801e9537c3..1037cdd7ed1f 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -88,6 +88,7 @@ #include <svtools/imgdef.hxx> #if defined(_WIN32) +#include <systools/win32/winstoreutil.hxx> #include <vcl/fileregistration.hxx> #endif using namespace ::com::sun::star::uno; @@ -192,6 +193,11 @@ OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, weld::DialogController* p m_xQuickStarterFrame->hide(); //Hide frame label in case of no content m_xHelpImproveLabel->hide(); +#else + // Store-packaged apps (located under the protected Program Files\WindowsApps) can't use normal + // shell shortcuts to their exe; hide. TODO: show a button to open "Startup Apps" system applet? + if (sal::systools::IsStorePackagedApp()) + m_xQuickStarterFrame->hide(); #endif #if defined(_WIN32) |