[gnome-shell] cleanup: remove controversial naming
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] cleanup: remove controversial naming
- Date: Tue, 4 Aug 2020 11:35:05 +0000 (UTC)
commit 3541a57570c961e9e60cddeba81eb74646044500
Author: Olivier Fourdan <ofourdan redhat com>
Date: Tue Aug 4 10:39:29 2020 +0200
cleanup: remove controversial naming
Replace "whitelist" and "blacklist" with "allow" and "deny" in variable
naming, which better represents the purpose of those variables.
There is no functional change.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1393
js/misc/introspect.js | 16 ++++++++--------
js/misc/parentalControlsManager.js | 4 ++--
js/ui/inhibitShortcutsDialog.js | 4 ++--
js/ui/sessionMode.js | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/js/misc/introspect.js b/js/misc/introspect.js
index 6578e2b76a..bae7f63736 100644
--- a/js/misc/introspect.js
+++ b/js/misc/introspect.js
@@ -3,7 +3,7 @@ const { Gio, GLib, Meta, Shell, St } = imports.gi;
const INTROSPECT_SCHEMA = 'org.gnome.shell';
const INTROSPECT_KEY = 'introspect';
-const APP_WHITELIST = ['org.freedesktop.impl.portal.desktop.gtk'];
+const APP_ALLOWLIST = ['org.freedesktop.impl.portal.desktop.gtk'];
const INTROSPECT_DBUS_API_VERSION = 3;
@@ -46,13 +46,13 @@ var IntrospectService = class {
this._syncRunningApplications();
- this._whitelistMap = new Map();
- APP_WHITELIST.forEach(appName => {
+ this._allowlistMap = new Map();
+ APP_ALLOWLIST.forEach(appName => {
Gio.DBus.watch_name(Gio.BusType.SESSION,
appName,
Gio.BusNameWatcherFlags.NONE,
- (conn, name, owner) => this._whitelistMap.set(name, owner),
- (conn, name) => this._whitelistMap.delete(name));
+ (conn, name, owner) => this._allowlistMap.set(name, owner),
+ (conn, name) => this._allowlistMap.delete(name));
});
this._settings = St.Settings.get();
@@ -74,8 +74,8 @@ var IntrospectService = class {
return this._introspectSettings.get_boolean(INTROSPECT_KEY);
}
- _isSenderWhitelisted(sender) {
- return [...this._whitelistMap.values()].includes(sender);
+ _isSenderAllowed(sender) {
+ return [...this._allowlistMap.values()].includes(sender);
}
_getSandboxedAppId(app) {
@@ -138,7 +138,7 @@ var IntrospectService = class {
if (this._isIntrospectEnabled())
return true;
- if (this._isSenderWhitelisted(invocation.get_sender()))
+ if (this._isSenderAllowed(invocation.get_sender()))
return true;
return false;
diff --git a/js/misc/parentalControlsManager.js b/js/misc/parentalControlsManager.js
index 3c69efe305..fc1e7ced6f 100644
--- a/js/misc/parentalControlsManager.js
+++ b/js/misc/parentalControlsManager.js
@@ -121,10 +121,10 @@ var ParentalControlsManager = GObject.registerClass({
// Calculate whether the given app (a Gio.DesktopAppInfo) should be shown
// on the desktop, in search results, etc. The app should be shown if:
// - The .desktop file doesn’t say it should be hidden.
- // - The executable from the .desktop file’s Exec line isn’t blacklisted in
+ // - The executable from the .desktop file’s Exec line isn’t denied in
// the user’s parental controls.
// - None of the flatpak app IDs from the X-Flatpak and the
- // X-Flatpak-RenamedFrom lines are blacklisted in the user’s parental
+ // X-Flatpak-RenamedFrom lines are denied in the user’s parental
// controls.
shouldShowApp(appInfo) {
// Quick decision?
diff --git a/js/ui/inhibitShortcutsDialog.js b/js/ui/inhibitShortcutsDialog.js
index ac86eea49e..d16c55abdb 100644
--- a/js/ui/inhibitShortcutsDialog.js
+++ b/js/ui/inhibitShortcutsDialog.js
@@ -7,7 +7,7 @@ const PermissionStore = imports.misc.permissionStore;
const WAYLAND_KEYBINDINGS_SCHEMA = 'org.gnome.mutter.wayland.keybindings';
-const APP_WHITELIST = ['gnome-control-center.desktop'];
+const APP_ALLOWLIST = ['gnome-control-center.desktop'];
const APP_PERMISSIONS_TABLE = 'gnome';
const APP_PERMISSIONS_ID = 'shortcuts-inhibitor';
const GRANTED = 'GRANTED';
@@ -118,7 +118,7 @@ var InhibitShortcutsDialog = GObject.registerClass({
}
vfunc_show() {
- if (this._app && APP_WHITELIST.includes(this._app.get_id())) {
+ if (this._app && APP_ALLOWLIST.includes(this._app.get_id())) {
this._emitResponse(DialogResponse.ALLOW);
return;
}
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index e12fc2ef48..454804933e 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -113,10 +113,10 @@ function _loadMode(file, info) {
}
_modes[modeName] = {};
- let propBlacklist = ['unlockDialog'];
+ const excludedProps = ['unlockDialog'];
for (let prop in _modes[DEFAULT_MODE]) {
if (newMode[prop] !== undefined &&
- !propBlacklist.includes(prop))
+ !excludedProps.includes(prop))
_modes[modeName][prop] = newMode[prop];
}
_modes[modeName]['isPrimary'] = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]