js: Add support for parental controls filtering to the desktop

Filter the apps shown on the desktop and in search results according to
whether they are blacklisted by the user’s parental controls.

This supports dynamically updating the filter during the user’s session.

This adds an optional dependency on libmalcontent. If that’s unavailable, no
parental controls filtering will occur.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/465
This commit is contained in:
Philip Withnall
2019-04-24 10:37:10 +01:00
committed by Florian Müllner
parent b82039e324
commit 3e5b90dbba
4 changed files with 178 additions and 4 deletions

View File

@ -46,6 +46,7 @@ const XdndHandler = imports.ui.xdndHandler;
const KbdA11yDialog = imports.ui.kbdA11yDialog;
const LocatePointer = imports.ui.locatePointer;
const PointerA11yTimeout = imports.ui.pointerA11yTimeout;
const ParentalControlsManager = imports.misc.parentalControlsManager;
const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
const STICKY_KEYS_ENABLE = 'stickykeys-enable';
@ -140,6 +141,10 @@ function start() {
sessionMode.connect('updated', _sessionUpdated);
St.Settings.get().connect('notify::gtk-theme', _loadDefaultStylesheet);
// Initialize ParentalControlsManager before the UI
ParentalControlsManager.getDefault();
_initializeUI();
shellAccessDialogDBusService = new AccessDialog.AccessDialogDBus();