[gnome-software/gnome-3-34] details: Hide add/remove shortcut buttons for parentally filtered apps
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-34] details: Hide add/remove shortcut buttons for parentally filtered apps
- Date: Thu, 3 Oct 2019 14:41:03 +0000 (UTC)
commit 1ca2512690e334ec61196e9a0991416a7f56a46d
Author: Philip Withnall <withnall endlessm com>
Date: Tue Mar 12 18:12:48 2019 +0000
details: Hide add/remove shortcut buttons for parentally filtered apps
There’s no point in being able to add a shortcut to the desktop for an
app if you are not allowed to launch it.
Signed-off-by: Philip Withnall <withnall endlessm com>
src/gs-details-page.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index f2be29da..62c28bca 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -200,6 +200,11 @@ gs_details_page_update_shortcut_button (GsDetailsPage *self)
if (gs_app_get_kind (self->app) != AS_APP_KIND_DESKTOP)
return;
+ /* Leave the button hidden if the app can’t be launched by the current
+ * user. */
+ if (gs_app_has_quirk (self->app, GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE))
+ return;
+
/* only consider the shortcut button if the app is installed */
switch (gs_app_get_state (self->app)) {
case AS_APP_STATE_INSTALLED:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]