cleanup: Remove spaces in object literals

We only adopted this style relatively recently, so there's a bit
more to adjust. Still, it's manageable and another step towards
getting rid of the legacy style.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2866>
This commit is contained in:
Florian Müllner
2023-08-07 00:40:20 +02:00
committed by Marge Bot
parent 6a22af83dc
commit 071f92cfb6
93 changed files with 583 additions and 586 deletions

View File

@ -37,7 +37,7 @@ const ControlsManagerLayout = GObject.registerClass(
class ControlsManagerLayout extends Clutter.BoxLayout {
_init(searchEntry, appDisplay, workspacesDisplay, workspacesThumbnails,
searchController, dash, stateAdjustment) {
super._init({ orientation: Clutter.Orientation.VERTICAL });
super._init({orientation: Clutter.Orientation.VERTICAL});
this._appDisplay = appDisplay;
this._workspacesDisplay = workspacesDisplay;
@ -160,7 +160,7 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
vfunc_allocate(container, box) {
const childBox = new Clutter.ActorBox();
const { spacing } = this;
const {spacing} = this;
const startY = this._workAreaBox.y1;
box.y1 += startY;
@ -190,7 +190,7 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
// Workspace Thumbnails
let thumbnailsHeight = 0;
if (this._workspacesThumbnails.visible) {
const { expandFraction } = this._workspacesThumbnails;
const {expandFraction} = this._workspacesThumbnails;
[thumbnailsHeight] =
this._workspacesThumbnails.get_preferred_height(width);
thumbnailsHeight = Math.min(
@ -433,14 +433,14 @@ class ControlsManager extends St.Widget {
},
});
this._a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
this._a11ySettings = new Gio.Settings({schema_id: A11Y_SCHEMA});
this._lastOverlayKeyTime = 0;
global.display.connect('overlay-key', () => {
if (this._a11ySettings.get_boolean('stickykeys-enable'))
return;
const { initialState, finalState, transitioning } =
const {initialState, finalState, transitioning} =
this._stateAdjustment.getStateTransitionParams();
const time = GLib.get_monotonic_time() / 1000;
@ -466,7 +466,7 @@ class ControlsManager extends St.Widget {
!this.contains(global.stage.key_focus))
return Clutter.EVENT_PROPAGATE;
const { finalState } =
const {finalState} =
this._stateAdjustment.getStateTransitionParams();
let keynavDisplay;
@ -494,13 +494,13 @@ class ControlsManager extends St.Widget {
Main.wm.addKeybinding(
'toggle-application-view',
new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
new Gio.Settings({schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA}),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
this._toggleAppsPage.bind(this));
Main.wm.addKeybinding('shift-overview-up',
new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
new Gio.Settings({schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA}),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
() => this._shiftState(Meta.MotionDirection.UP));
@ -529,7 +529,7 @@ class ControlsManager extends St.Widget {
}
_getThumbnailsBoxParams() {
const { initialState, finalState, progress } =
const {initialState, finalState, progress} =
this._stateAdjustment.getStateTransitionParams();
const paramsForState = s => {
@ -553,7 +553,7 @@ class ControlsManager extends St.Widget {
break;
}
return { opacity, scale, translationY };
return {opacity, scale, translationY};
};
const initialParams = paramsForState(initialState);
@ -567,8 +567,8 @@ class ControlsManager extends St.Widget {
}
_updateThumbnailsBox(animate = false) {
const { shouldShow } = this._thumbnailsBox;
const { searchActive } = this._searchController;
const {shouldShow} = this._thumbnailsBox;
const {searchActive} = this._searchController;
const [opacity, scale, translationY] = this._getThumbnailsBoxParams();
const thumbnailsBoxVisible = shouldShow && !searchActive && opacity !== 0;
@ -597,7 +597,7 @@ class ControlsManager extends St.Widget {
if (!stateTransitionParams)
stateTransitionParams = this._stateAdjustment.getStateTransitionParams();
const { initialState, finalState } = stateTransitionParams;
const {initialState, finalState} = stateTransitionParams;
const state = Math.max(initialState, finalState);
this._appDisplay.visible =
@ -613,7 +613,7 @@ class ControlsManager extends St.Widget {
this._getFitModeForState(params.finalState),
params.progress);
const { fitModeAdjustment } = this._workspacesDisplay;
const {fitModeAdjustment} = this._workspacesDisplay;
fitModeAdjustment.value = fitMode;
this._updateThumbnailsBox();
@ -621,7 +621,7 @@ class ControlsManager extends St.Widget {
}
_onSearchChanged() {
const { searchActive } = this._searchController;
const {searchActive} = this._searchController;
if (!searchActive) {
this._updateAppDisplayVisibility();
@ -681,7 +681,7 @@ class ControlsManager extends St.Widget {
}
_shiftState(direction) {
let { currentState, finalState } = this._stateAdjustment.getStateTransitionParams();
let {currentState, finalState} = this._stateAdjustment.getStateTransitionParams();
if (direction === Meta.MotionDirection.DOWN)
finalState = Math.max(finalState - 1, ControlsState.HIDDEN);
@ -844,7 +844,7 @@ class ControlsManager extends St.Widget {
// We can't run the animation before the first allocation happens
await this.layout_manager.ensureAllocation();
const { STARTUP_ANIMATION_TIME } = Layout;
const {STARTUP_ANIMATION_TIME} = Layout;
// Opacity
this.ease({
@ -854,7 +854,7 @@ class ControlsManager extends St.Widget {
});
// Search bar falls from the ceiling
const { primaryMonitor } = Main.layoutManager;
const {primaryMonitor} = Main.layoutManager;
const [, y] = this._searchEntryBin.get_transformed_position();
const yOffset = y - primaryMonitor.y;