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

@ -136,7 +136,7 @@ export class ServiceImplementation {
}
_injectTracking(methodName) {
const { prototype } = Gio.DBusMethodInvocation;
const {prototype} = Gio.DBusMethodInvocation;
const origMethod = prototype[methodName];
const that = this;

View File

@ -24,7 +24,7 @@ import St from 'gi://St';
const SCROLL_ANIMATION_TIME = 500;
const AuthListItem = GObject.registerClass({
Signals: { 'activate': {} },
Signals: {'activate': {}},
}, class AuthListItem extends St.Button {
_init(key, text) {
this.key = key;
@ -69,8 +69,8 @@ const AuthListItem = GObject.registerClass({
export const AuthList = GObject.registerClass({
Signals: {
'activate': { param_types: [GObject.TYPE_STRING] },
'item-added': { param_types: [AuthListItem.$gtype] },
'activate': {param_types: [GObject.TYPE_STRING]},
'item-added': {param_types: [AuthListItem.$gtype]},
},
}, class AuthList extends St.BoxLayout {
_init() {
@ -81,7 +81,7 @@ export const AuthList = GObject.registerClass({
y_align: Clutter.ActorAlign.CENTER,
});
this.label = new St.Label({ style_class: 'login-dialog-auth-list-title' });
this.label = new St.Label({style_class: 'login-dialog-auth-list-title'});
this.add_child(this.label);
this._scrollView = new St.ScrollView({

View File

@ -51,7 +51,7 @@ export const AuthPrompt = GObject.registerClass({
'failed': {},
'next': {},
'prompted': {},
'reset': { param_types: [GObject.TYPE_UINT] },
'reset': {param_types: [GObject.TYPE_UINT]},
},
}, class AuthPrompt extends St.BoxLayout {
_init(gdmClient, mode) {
@ -76,7 +76,7 @@ export const AuthPrompt = GObject.registerClass({
else if (this._mode == AuthPromptMode.UNLOCK_OR_LOG_IN)
reauthenticationOnly = false;
this._userVerifier = new GdmUtil.ShellUserVerifier(this._gdmClient, { reauthenticationOnly });
this._userVerifier = new GdmUtil.ShellUserVerifier(this._gdmClient, {reauthenticationOnly});
this._userVerifier.connect('ask-question', this._onAskQuestion.bind(this));
this._userVerifier.connect('show-message', this._onShowMessage.bind(this));

View File

@ -45,7 +45,7 @@ const _SCROLL_ANIMATION_TIME = 500;
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
export const UserListItem = GObject.registerClass({
Signals: { 'activate': {} },
Signals: {'activate': {}},
}, class UserListItem extends St.Button {
_init(user) {
let layout = new St.BoxLayout({
@ -158,8 +158,8 @@ export const UserListItem = GObject.registerClass({
const UserList = GObject.registerClass({
Signals: {
'activate': { param_types: [UserListItem.$gtype] },
'item-added': { param_types: [UserListItem.$gtype] },
'activate': {param_types: [UserListItem.$gtype]},
'item-added': {param_types: [UserListItem.$gtype]},
},
}, class UserList extends St.ScrollView {
_init() {
@ -312,7 +312,7 @@ const UserList = GObject.registerClass({
});
const SessionMenuButton = GObject.registerClass({
Signals: { 'session-activated': { param_types: [GObject.TYPE_STRING] } },
Signals: {'session-activated': {param_types: [GObject.TYPE_STRING]}},
}, class SessionMenuButton extends St.Bin {
_init() {
let button = new St.Button({
@ -327,7 +327,7 @@ const SessionMenuButton = GObject.registerClass({
y_align: Clutter.ActorAlign.CENTER,
});
super._init({ child: button });
super._init({child: button});
this._button = button;
this._menu = new PopupMenu.PopupMenu(this._button, 0, St.Side.BOTTOM);
@ -342,7 +342,7 @@ const SessionMenuButton = GObject.registerClass({
});
this._manager = new PopupMenu.PopupMenuManager(this._button,
{ actionMode: Shell.ActionMode.NONE });
{actionMode: Shell.ActionMode.NONE});
this._manager.addMenu(this._menu);
this._button.connect('clicked', () => this._menu.toggle());
@ -413,11 +413,11 @@ export const LoginDialog = GObject.registerClass({
},
}, class LoginDialog extends St.Widget {
_init(parentActor) {
super._init({ style_class: 'login-dialog', visible: false });
super._init({style_class: 'login-dialog', visible: false});
this.get_accessible().set_role(Atk.Role.WINDOW);
this.add_constraint(new Layout.MonitorConstraint({ primary: true }));
this.add_constraint(new Layout.MonitorConstraint({primary: true}));
this.connect('destroy', this._onDestroy.bind(this));
parentActor.add_child(this);
@ -429,7 +429,7 @@ export const LoginDialog = GObject.registerClass({
} catch (e) {
}
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
this._settings = new Gio.Settings({schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA});
this._settings.connect(`changed::${GdmUtil.BANNER_MESSAGE_KEY}`,
this._updateBanner.bind(this));
@ -493,7 +493,7 @@ export const LoginDialog = GObject.registerClass({
});
this.add_child(this._bannerView);
let bannerBox = new St.BoxLayout({ vertical: true });
let bannerBox = new St.BoxLayout({vertical: true});
this._bannerView.add_actor(bannerBox);
this._bannerLabel = new St.Label({
@ -885,7 +885,7 @@ export const LoginDialog = GObject.registerClass({
if (previousUser && beginRequest === AuthPrompt.BeginRequestType.REUSE_USERNAME) {
this._user = previousUser;
this._authPrompt.setUser(this._user);
this._authPrompt.begin({ userName: previousUser.get_user_name() });
this._authPrompt.begin({userName: previousUser.get_user_name()});
} else if (beginRequest === AuthPrompt.BeginRequestType.PROVIDE_USERNAME) {
if (!this._disableUserList)
this._showUserList();
@ -953,7 +953,7 @@ export const LoginDialog = GObject.registerClass({
let answer = this._authPrompt.getAnswer();
this._user = this._userManager.get_user(answer);
this._authPrompt.clear();
this._authPrompt.begin({ userName: answer });
this._authPrompt.begin({userName: answer});
this._updateCancelButton();
});
this._updateCancelButton();
@ -1195,7 +1195,7 @@ export const LoginDialog = GObject.registerClass({
let userName = item.user.get_user_name();
let hold = new Batch.Hold();
this._authPrompt.begin({ userName, hold });
this._authPrompt.begin({userName, hold});
return hold;
}
@ -1264,12 +1264,12 @@ export const LoginDialog = GObject.registerClass({
Main.ctrlAltTabManager.addGroup(this,
_('Login Window'),
'dialog-password-symbolic',
{ sortGroup: CtrlAltTab.SortGroup.MIDDLE });
{sortGroup: CtrlAltTab.SortGroup.MIDDLE});
this.activate();
this.opacity = 0;
this._grab = Main.pushModal(global.stage, { actionMode: Shell.ActionMode.LOGIN_SCREEN });
this._grab = Main.pushModal(global.stage, {actionMode: Shell.ActionMode.LOGIN_SCREEN});
this.ease({
opacity: 255,

View File

@ -99,7 +99,7 @@ export function cloneAndFadeOutActor(actor) {
export class ShellUserVerifier extends Signals.EventEmitter {
constructor(client, params) {
super();
params = Params.parse(params, { reauthenticationOnly: false });
params = Params.parse(params, {reauthenticationOnly: false});
this._reauthOnly = params.reauthenticationOnly;
this._client = client;
@ -107,7 +107,7 @@ export class ShellUserVerifier extends Signals.EventEmitter {
this._defaultService = null;
this._preemptingService = null;
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
this._settings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA});
this._settings.connect('changed',
this._updateDefaultService.bind(this));
this._updateDefaultService();
@ -316,7 +316,7 @@ export class ShellUserVerifier extends Signals.EventEmitter {
_queueMessage(serviceName, message, messageType) {
let interval = this._getIntervalForMessage(message);
this._messageQueue.push({ serviceName, text: message, type: messageType, interval });
this._messageQueue.push({serviceName, text: message, type: messageType, interval});
this._queueMessageTimeout();
}

View File

@ -221,7 +221,7 @@ class IBusManager extends Signals.EventEmitter {
this._candidatePopup.setPanelService(this._panelService);
this._panelService.connect('update-property', this._updateProperty.bind(this));
this._panelService.connect('set-cursor-location', (ps, x, y, w, h) => {
let cursorLocation = { x, y, width: w, height: h };
let cursorLocation = {x, y, width: w, height: h};
this.emit('set-cursor-location', cursorLocation);
});
this._panelService.connect('focus-in', (panel, path) => {

View File

@ -103,7 +103,7 @@ export function findMatchingSlash(expr, offset) {
*/
export function findMatchingBrace(expr, offset) {
let closeBrace = expr.charAt(offset);
let openBrace = { ')': '(', ']': '[' }[closeBrace];
let openBrace = {')': '(', ']': '['}[closeBrace];
return findTheBrace(expr, offset - 1, openBrace, closeBrace);
}

View File

@ -67,7 +67,7 @@ class KeyboardManager {
this._currentKeymap.options == options)
return;
this._currentKeymap = { layouts, variants, options };
this._currentKeymap = {layouts, variants, options};
global.backend.set_keymap(layouts, variants, options);
}
@ -106,7 +106,7 @@ class KeyboardManager {
for (let i = 0; i < ids.length; ++i) {
let [found, , , _layout, _variant] = this._xkbInfo.get_layout_info(ids[i]);
if (found)
this._layoutInfos[ids[i]] = { id: ids[i], layout: _layout, variant: _variant };
this._layoutInfos[ids[i]] = {id: ids[i], layout: _layout, variant: _variant};
}
let i = 0;
@ -142,9 +142,9 @@ class KeyboardManager {
let _layout, _variant;
[found, , , _layout, _variant] = this._xkbInfo.get_layout_info(id);
if (found)
return { layout: _layout, variant: _variant };
return {layout: _layout, variant: _variant};
else
return { layout: DEFAULT_LAYOUT, variant: DEFAULT_VARIANT };
return {layout: DEFAULT_LAYOUT, variant: DEFAULT_VARIANT};
}
_buildGroupStrings(_group) {

View File

@ -199,7 +199,7 @@ class LoginManagerSystemd extends Signals.EventEmitter {
await this._proxy.call_with_unix_fd_list('Inhibit',
inVariant, 0, -1, null, cancellable);
const [fd] = fdList.steal_fds();
return new Gio.UnixInputStream({ fd });
return new Gio.UnixInputStream({fd});
}
_prepareForSleep(proxy, sender, [aboutToSuspend]) {

View File

@ -243,7 +243,7 @@ export const BroadbandModem = GObject.registerClass({
},
}, class BroadbandModem extends ModemBase {
_init(path, capabilities) {
super._init({ capabilities });
super._init({capabilities});
this._proxy = new BroadbandModemProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
this._proxy_3gpp = new BroadbandModem3gppProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);
this._proxy_cdma = new BroadbandModemCdmaProxy(Gio.DBus.system, 'org.freedesktop.ModemManager1', path);

View File

@ -76,7 +76,7 @@ const ParentalControlsManager = GObject.registerClass({
try {
const connection = await Gio.DBus.get(Gio.BusType.SYSTEM, null);
this._manager = new Malcontent.Manager({ connection });
this._manager = new Malcontent.Manager({connection});
this._appFilter = await this._getAppFilter();
} catch (e) {
logError(e, 'Failed to get parental controls settings');

View File

@ -106,7 +106,7 @@ class SignalTracker {
_getSignalData(obj) {
let data = this._map.get(obj);
if (data === undefined) {
data = { ownerSignals: [], destroyId: 0 };
data = {ownerSignals: [], destroyId: 0};
this._map.set(obj, data);
}
return data;
@ -164,7 +164,7 @@ class SignalTracker {
* @returns {void}
*/
untrack(obj) {
const { ownerSignals, destroyId } = this._getSignalData(obj);
const {ownerSignals, destroyId} = this._getSignalData(obj);
this._map.delete(obj);
const ownerProto = this._getObjectProto(this._owner);

View File

@ -284,7 +284,7 @@ const SystemActions = GObject.registerClass({
let results = [];
for (let [key, { available, keywords }] of this._actions) {
for (let [key, {available, keywords}] of this._actions) {
if (available && terms.every(t => keywords.some(k => k.startsWith(t))))
results.push(key);
}

View File

@ -52,7 +52,7 @@ let _desktopSettings = null;
export function findUrls(str) {
let res = [], match;
while ((match = _urlRegexp.exec(str)))
res.push({ url: match[2], pos: match.index + match[1].length });
res.push({url: match[2], pos: match.index + match[1].length});
return res;
}
@ -143,7 +143,7 @@ function trySpawn(argv) {
// We are only interested in the part in the parentheses. (And
// we can't pattern match the text, since it gets localized.)
let message = err.message.replace(/.*\((.+)\)/, '$1');
throw new err.constructor({ code: err.code, message });
throw new err.constructor({code: err.code, message});
} else {
throw err;
}
@ -196,9 +196,9 @@ function _handleSpawnError(command, err) {
*/
export function createTimeLabel(date, params) {
if (_desktopSettings == null)
_desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
_desktopSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'});
let label = new St.Label({ text: formatTime(date, params) });
let label = new St.Label({text: formatTime(date, params)});
_desktopSettings.connectObject(
'changed::clock-format', () => (label.text = formatTime(date, params)),
label);

View File

@ -69,7 +69,7 @@ export class WeatherClient extends Signals.EventEmitter {
this._permStore.connectSignal('Changed',
this._onPermStoreChanged.bind(this));
this._locationSettings = new Gio.Settings({ schema_id: 'org.gnome.system.location' });
this._locationSettings = new Gio.Settings({schema_id: 'org.gnome.system.location'});
this._locationSettings.connect('changed::enabled',
this._updateAutoLocation.bind(this));

View File

@ -25,7 +25,7 @@ const DialogResponse = {
const AccessDialog = GObject.registerClass(
class AccessDialog extends ModalDialog.ModalDialog {
_init(invocation, handle, title, description, body, options) {
super._init({ styleClass: 'access-dialog' });
super._init({styleClass: 'access-dialog'});
this._invocation = invocation;
this._handle = handle;
@ -46,7 +46,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
let grantLabel = options['grant_label'] || _('Allow');
let choices = options['choices'] || [];
let content = new Dialog.MessageDialogContent({ title, description });
let content = new Dialog.MessageDialogContent({title, description});
this.contentLayout.add_actor(content);
this._choices = new Map();

View File

@ -408,17 +408,17 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
const CyclerHighlight = GObject.registerClass(
class CyclerHighlight extends St.Widget {
_init() {
super._init({ layout_manager: new Clutter.BinLayout() });
super._init({layout_manager: new Clutter.BinLayout()});
this._window = null;
this._clone = new Clutter.Clone();
this.add_actor(this._clone);
this._highlight = new St.Widget({ style_class: 'cycler-highlight' });
this._highlight = new St.Widget({style_class: 'cycler-highlight'});
this.add_actor(this._highlight);
let coordinate = Clutter.BindCoordinate.ALL;
let constraint = new Clutter.BindConstraint({ coordinate });
let constraint = new Clutter.BindConstraint({coordinate});
this._clone.bind_property('source', constraint, 'source', 0);
this.add_constraint(constraint);
@ -473,10 +473,10 @@ class CyclerHighlight extends St.Widget {
// expects instead of inheriting from SwitcherList
const CyclerList = GObject.registerClass({
Signals: {
'item-activated': { param_types: [GObject.TYPE_INT] },
'item-entered': { param_types: [GObject.TYPE_INT] },
'item-removed': { param_types: [GObject.TYPE_INT] },
'item-highlighted': { param_types: [GObject.TYPE_INT] },
'item-activated': {param_types: [GObject.TYPE_INT]},
'item-entered': {param_types: [GObject.TYPE_INT]},
'item-removed': {param_types: [GObject.TYPE_INT]},
'item-highlighted': {param_types: [GObject.TYPE_INT]},
},
}, class CyclerList extends St.Widget {
highlight(index, _justOutline) {
@ -543,7 +543,7 @@ const CyclerPopup = GObject.registerClass({
export const GroupCyclerPopup = GObject.registerClass(
class GroupCyclerPopup extends CyclerPopup {
_init() {
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell.app-switcher' });
this._settings = new Gio.Settings({schema_id: 'org.gnome.shell.app-switcher'});
super._init();
}
@ -577,7 +577,7 @@ export const WindowSwitcherPopup = GObject.registerClass(
class WindowSwitcherPopup extends SwitcherPopup.SwitcherPopup {
_init() {
super._init();
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell.window-switcher' });
this._settings = new Gio.Settings({schema_id: 'org.gnome.shell.window-switcher'});
let windows = this._getWindowList();
@ -634,7 +634,7 @@ class WindowSwitcherPopup extends SwitcherPopup.SwitcherPopup {
export const WindowCyclerPopup = GObject.registerClass(
class WindowCyclerPopup extends CyclerPopup {
_init() {
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell.window-switcher' });
this._settings = new Gio.Settings({schema_id: 'org.gnome.shell.window-switcher'});
super._init();
}
@ -698,7 +698,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
this._arrows = [];
let windowTracker = Shell.WindowTracker.get_default();
let settings = new Gio.Settings({ schema_id: 'org.gnome.shell.app-switcher' });
let settings = new Gio.Settings({schema_id: 'org.gnome.shell.app-switcher'});
let workspace = null;
if (settings.get_boolean('current-workspace-only')) {
@ -880,7 +880,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
this._removeIcon(app);
}, this);
let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' });
let arrow = new St.DrawingArea({style_class: 'switcher-arrow'});
arrow.connect('repaint', () => SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM));
this.add_actor(arrow);
this._arrows.push(arrow);
@ -922,7 +922,7 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
vertical: true,
});
let bin = new St.Bin({ style_class: 'thumbnail' });
let bin = new St.Bin({style_class: 'thumbnail'});
box.add_actor(bin);
this._thumbnailBins.push(bin);
@ -1006,10 +1006,10 @@ class WindowIcon extends St.BoxLayout {
this.window = window;
this._icon = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this._icon = new St.Widget({layout_manager: new Clutter.BinLayout()});
this.add_child(this._icon);
this.label = new St.Label({ text: window.get_title() });
this.label = new St.Label({text: window.get_title()});
let tracker = Shell.WindowTracker.get_default();
this.app = tracker.get_window_app(window);
@ -1048,7 +1048,7 @@ class WindowIcon extends St.BoxLayout {
_createAppIcon(app, size) {
let appIcon = app
? app.create_icon_texture(size)
: new St.Icon({ icon_name: 'icon-missing', icon_size: size });
: new St.Icon({icon_name: 'icon-missing', icon_size: size});
appIcon.x_expand = appIcon.y_expand = true;
appIcon.x_align = appIcon.y_align = Clutter.ActorAlign.END;

View File

@ -733,7 +733,7 @@ var BaseAppView = GObject.registerClass({
adjustment.remove_transition('value');
const progress = adjustment.value / adjustment.page_size;
const points = Array.from({ length: this._grid.nPages }, (v, i) => i);
const points = Array.from({length: this._grid.nPages}, (v, i) => i);
const size = tracker.orientation === Clutter.Orientation.VERTICAL
? this._grid.allocation.get_height() : this._grid.allocation.get_width();
@ -794,7 +794,7 @@ var BaseAppView = GObject.registerClass({
if (!success)
return;
const { source } = dragEvent;
const {source} = dragEvent;
const [page, position, dragLocation] =
this._getDropTarget(x, y, source);
const item = position !== -1
@ -836,7 +836,7 @@ var BaseAppView = GObject.registerClass({
if (!this._delayedMoveData)
return;
const { source, destroyId, timeoutId } = this._delayedMoveData;
const {source, destroyId, timeoutId} = this._delayedMoveData;
if (timeoutId > 0)
GLib.source_remove(timeoutId);
@ -1032,7 +1032,7 @@ var BaseAppView = GObject.registerClass({
if (dropTarget === this._prevPageIndicator ||
dropTarget === this._nextPageIndicator) {
const increment = dropTarget === this._prevPageIndicator ? -1 : 1;
const { currentPage, nPages } = this._grid;
const {currentPage, nPages} = this._grid;
const page = Math.min(currentPage + increment, nPages);
const position = page < nPages ? -1 : 0;
@ -1040,7 +1040,7 @@ var BaseAppView = GObject.registerClass({
this.goToPage(page);
} else if (this._delayedMoveData) {
// Dropped before the icon was moved
const { page, position } = this._delayedMoveData;
const {page, position} = this._delayedMoveData;
this._moveItem(source, page, position);
this._removeDelayedMove();
@ -1094,7 +1094,7 @@ var BaseAppView = GObject.registerClass({
}
_getItemPosition(item) {
const { itemsPerPage } = this._grid;
const {itemsPerPage} = this._grid;
let iconIndex = this._orderedItems.indexOf(item);
if (iconIndex === -1)
@ -1285,7 +1285,7 @@ var BaseAppView = GObject.registerClass({
});
const PageManager = GObject.registerClass({
Signals: { 'layout-changed': {} },
Signals: {'layout-changed': {}},
}, class PageManager extends GObject.Object {
_init() {
super._init();
@ -1376,7 +1376,7 @@ class AppDisplay extends BaseAppView {
Shell.AppSystem.get_default().connect('installed-changed', () => {
Main.queueDeferredWork(this._redisplayWorkId);
});
this._folderSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
this._folderSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.app-folders'});
this._ensureDefaultFolders();
this._folderSettings.connect('changed::folder-children', () => {
Main.queueDeferredWork(this._redisplayWorkId);
@ -1441,9 +1441,9 @@ class AppDisplay extends BaseAppView {
const folders = Object.keys(DEFAULT_FOLDERS);
this._folderSettings.set_strv('folder-children', folders);
const { path } = this._folderSettings;
const {path} = this._folderSettings;
for (const folder of folders) {
const { name, categories, apps } = DEFAULT_FOLDERS[folder];
const {name, categories, apps} = DEFAULT_FOLDERS[folder];
const child = new Gio.Settings({
schema_id: 'org.gnome.desktop.app-folders.folder',
path: `${path}folders/${folder}/`,
@ -1467,7 +1467,7 @@ class AppDisplay extends BaseAppView {
global.settings.is_writable('favorite-apps') ||
global.settings.is_writable('app-picker-layout');
this._placeholder = new AppIcon(app, { isDraggable });
this._placeholder = new AppIcon(app, {isDraggable});
this._placeholder.connect('notify::pressed', icon => {
if (icon.pressed)
this.updateDragFocus(icon);
@ -1583,7 +1583,7 @@ class AppDisplay extends BaseAppView {
if (!icon) {
let app = appSys.lookup_app(appId);
icon = new AppIcon(app, { isDraggable });
icon = new AppIcon(app, {isDraggable});
icon.connect('notify::pressed', () => {
if (icon.pressed)
this.updateDragFocus(icon);
@ -1801,7 +1801,7 @@ export class AppSearchProvider {
}
getResultMetas(apps) {
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
let metas = [];
for (let id of apps) {
if (id.endsWith('.desktop')) {
@ -1823,7 +1823,7 @@ export class AppSearchProvider {
style_class: 'system-action-icon',
});
metas.push({ id, name, createIcon });
metas.push({id, name, createIcon});
}
}
@ -1885,7 +1885,7 @@ export const AppViewItem = GObject.registerClass(
class AppViewItem extends St.Button {
_init(params = {}, isDraggable = true, expandTitleOnHover = true) {
super._init({
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
reactive: true,
button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO,
can_focus: true,
@ -1895,7 +1895,7 @@ class AppViewItem extends St.Button {
this._delegate = this;
if (isDraggable) {
this._draggable = DND.makeDraggable(this, { timeoutThreshold: 200 });
this._draggable = DND.makeDraggable(this, {timeoutThreshold: 200});
this._draggable.connect('drag-begin', this._onDragBegin.bind(this));
this._draggable.connect('drag-cancelled', this._onDragCancelled.bind(this));
@ -1927,8 +1927,8 @@ class AppViewItem extends St.Button {
if (!this._expandTitleOnHover || !this.icon.label)
return;
const { label } = this.icon;
const { clutterText } = label;
const {label} = this.icon;
const {clutterText} = label;
const layout = clutterText.get_layout();
if (!layout.is_wrapped() && !layout.is_ellipsized())
return;
@ -2188,7 +2188,7 @@ class FolderView extends BaseAppView {
let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL;
for (let i = 0; i < 4; i++) {
const style = `width: ${subSize}px; height: ${subSize}px;`;
let bin = new St.Bin({ style });
let bin = new St.Bin({style});
if (i < numItems)
bin.child = this._orderedItems[i].app.create_icon_texture(subSize);
layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);
@ -2288,7 +2288,7 @@ class FolderView extends BaseAppView {
for (const key of keys)
this._folder.reset(key);
let settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
let settings = new Gio.Settings({schema_id: 'org.gnome.desktop.app-folders'});
let folders = settings.get_strv('folder-children');
folders.splice(folders.indexOf(this._id), 1);
settings.set_strv('folder-children', folders);
@ -2491,7 +2491,7 @@ export const FolderIcon = GObject.registerClass({
export const AppFolderDialog = GObject.registerClass({
Signals: {
'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
'open-state-changed': {param_types: [GObject.TYPE_BOOLEAN]},
},
}, class AppFolderDialog extends St.Bin {
_init(source, folder, appDisplay) {
@ -2502,7 +2502,7 @@ export const AppFolderDialog = GObject.registerClass({
reactive: true,
});
this.add_constraint(new Layout.MonitorConstraint({ primary: true }));
this.add_constraint(new Layout.MonitorConstraint({primary: true}));
const clickAction = new Clutter.ClickAction();
clickAction.connect('clicked', () => {
@ -2784,7 +2784,7 @@ export const AppFolderDialog = GObject.registerClass({
_onDestroy() {
if (this._isOpen) {
this._isOpen = false;
this._grabHelper.ungrab({ actor: this });
this._grabHelper.ungrab({actor: this});
this._grabHelper = null;
}
@ -2865,7 +2865,7 @@ export const AppFolderDialog = GObject.registerClass({
_withinDialog(x, y) {
const childExtents = this.child.get_transformed_extents();
return childExtents.contains_point(new Graphene.Point({ x, y }));
return childExtents.contains_point(new Graphene.Point({x, y}));
}
_setupDragMonitor() {
@ -2969,26 +2969,26 @@ export const AppFolderDialog = GObject.registerClass({
this._showFolderLabel();
this._isOpen = false;
this._grabHelper.ungrab({ actor: this });
this._grabHelper.ungrab({actor: this});
this.emit('open-state-changed', false);
}
});
export const AppIcon = GObject.registerClass({
Signals: {
'menu-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
'menu-state-changed': {param_types: [GObject.TYPE_BOOLEAN]},
'sync-tooltip': {},
},
}, class AppIcon extends AppViewItem {
_init(app, iconParams = {}) {
// Get the isDraggable property without passing it on to the BaseIcon:
const appIconParams = Params.parse(iconParams, { isDraggable: true }, true);
const appIconParams = Params.parse(iconParams, {isDraggable: true}, true);
const isDraggable = appIconParams['isDraggable'];
delete iconParams['isDraggable'];
const expandTitleOnHover = appIconParams['expandTitleOnHover'];
delete iconParams['expandTitleOnHover'];
super._init({ style_class: 'app-well-app' }, isDraggable, expandTitleOnHover);
super._init({style_class: 'app-well-app'}, isDraggable, expandTitleOnHover);
this.app = app;
this._id = app.get_id();
@ -3185,7 +3185,7 @@ export const AppIcon = GObject.registerClass({
}
shellWorkspaceLaunch(params) {
let { stack } = new Error();
let {stack} = new Error();
log(`shellWorkspaceLaunch is deprecated, use app.open_new_window() instead\n${stack}`);
params = Params.parse(params, {

View File

@ -157,7 +157,7 @@ export class AppMenu extends PopupMenu.PopupMenu {
if (!canFavorite)
return;
const { id } = this._app;
const {id} = this._app;
this._toggleFavoriteItem.label.text = this._appFavorites.isFavorite(id)
? _('Unpin')
: _('Pin to Dash');

View File

@ -21,10 +21,10 @@ const AudioDevice = {
const AudioDeviceSelectionIface = loadInterfaceXML('org.gnome.Shell.AudioDeviceSelection');
const AudioDeviceSelectionDialog = GObject.registerClass({
Signals: { 'device-selected': { param_types: [GObject.TYPE_UINT] } },
Signals: {'device-selected': {param_types: [GObject.TYPE_UINT]}},
}, class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog {
_init(devices) {
super._init({ styleClass: 'audio-device-selection-dialog' });
super._init({styleClass: 'audio-device-selection-dialog'});
this._deviceItems = {};

View File

@ -187,7 +187,7 @@ class BackgroundCache extends Signals.EventEmitter {
return;
}
animation = new Animation({ file: params.file });
animation = new Animation({file: params.file});
animation.load_async(null, () => {
this._animations[params.settingsSchema] = animation;
@ -238,7 +238,7 @@ function getBackgroundCache() {
}
const Background = GObject.registerClass({
Signals: { 'loaded': {}, 'bg-changed': {} },
Signals: {'loaded': {}, 'bg-changed': {}},
}, class Background extends Meta.Background {
_init(params) {
params = Params.parse(params, {
@ -249,7 +249,7 @@ const Background = GObject.registerClass({
style: null,
});
super._init({ meta_display: global.display });
super._init({meta_display: global.display});
this._settings = params.settings;
this._file = params.file;
@ -260,7 +260,7 @@ const Background = GObject.registerClass({
this._cancellable = new Gio.Cancellable();
this.isLoaded = false;
this._interfaceSettings = new Gio.Settings({ schema_id: INTERFACE_SCHEMA });
this._interfaceSettings = new Gio.Settings({schema_id: INTERFACE_SCHEMA});
this._clock = new GnomeDesktop.WallClock();
this._clock.connectObject('notify::timezone',
@ -532,11 +532,11 @@ const Background = GObject.registerClass({
let _systemBackground;
export const SystemBackground = GObject.registerClass({
Signals: { 'loaded': {} },
Signals: {'loaded': {}},
}, class SystemBackground extends Meta.BackgroundActor {
_init() {
if (_systemBackground == null) {
_systemBackground = new Meta.Background({ meta_display: global.display });
_systemBackground = new Meta.Background({meta_display: global.display});
_systemBackground.set_color(DEFAULT_BACKGROUND_COLOR);
}
@ -559,7 +559,7 @@ class BackgroundSource {
// Allow override the background image setting for performance testing
this._layoutManager = layoutManager;
this._overrideImage = GLib.getenv('SHELL_BACKGROUND_IMAGE');
this._settings = new Gio.Settings({ schema_id: settingsSchema });
this._settings = new Gio.Settings({schema_id: settingsSchema});
this._backgrounds = [];
const monitorManager = global.backend.get_monitor_manager();
@ -567,7 +567,7 @@ class BackgroundSource {
monitorManager.connect('monitors-changed',
this._onMonitorsChanged.bind(this));
this._interfaceSettings = new Gio.Settings({ schema_id: INTERFACE_SCHEMA });
this._interfaceSettings = new Gio.Settings({schema_id: INTERFACE_SCHEMA});
}
_onMonitorsChanged() {
@ -772,7 +772,7 @@ export class BackgroundManager extends Signals.EventEmitter {
this._newBackgroundActor = newBackgroundActor;
const { background } = newBackgroundActor.content;
const {background} = newBackgroundActor.content;
if (background.isLoaded) {
this._swapBackgroundActor();

View File

@ -28,7 +28,7 @@ const POPUP_ANIMATION_TIME = 150;
*
*/
export const BoxPointer = GObject.registerClass({
Signals: { 'arrow-side-changed': {} },
Signals: {'arrow-side-changed': {}},
}, class BoxPointer extends St.Widget {
/**
* @param {*} arrowSide side to draw the arrow on

View File

@ -106,7 +106,7 @@ export const EventSourceBase = GObject.registerClass({
GObject.ParamFlags.READABLE,
false),
},
Signals: { 'changed': {} },
Signals: {'changed': {}},
}, class EventSourceBase extends GObject.Object {
/**
* @returns {boolean}
@ -405,17 +405,17 @@ class DBusEventSource extends EventSourceBase {
let dayBegin = _getBeginningOfDay(day);
let dayEnd = _getEndOfDay(day);
const { done } = this._getFilteredEvents(dayBegin, dayEnd).next();
const {done} = this._getFilteredEvents(dayBegin, dayEnd).next();
return !done;
}
});
export const Calendar = GObject.registerClass({
Signals: { 'selected-date-changed': { param_types: [GLib.DateTime.$gtype] } },
Signals: {'selected-date-changed': {param_types: [GLib.DateTime.$gtype]}},
}, class Calendar extends St.Widget {
_init() {
this._weekStart = Shell.util_get_week_start();
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.calendar' });
this._settings = new Gio.Settings({schema_id: 'org.gnome.desktop.calendar'});
this._settings.connect(`changed::${SHOW_WEEKDATE_KEY}`, this._onSettingsChange.bind(this));
this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY);
@ -491,7 +491,7 @@ export const Calendar = GObject.registerClass({
this.destroy_all_children();
// Top line of the calendar '<| September 2009 |>'
this._topBox = new St.BoxLayout({ style_class: 'calendar-month-header' });
this._topBox = new St.BoxLayout({style_class: 'calendar-month-header'});
layout.attach(this._topBox, 0, 0, offsetCols + 7, 1);
this._backButton = new St.Button({
@ -898,13 +898,13 @@ class NotificationSection extends MessageList.MessageListSection {
const Placeholder = GObject.registerClass(
class Placeholder extends St.BoxLayout {
_init() {
super._init({ style_class: 'message-list-placeholder', vertical: true });
super._init({style_class: 'message-list-placeholder', vertical: true});
this._date = new Date();
this._icon = new St.Icon({ icon_name: 'no-notifications-symbolic' });
this._icon = new St.Icon({icon_name: 'no-notifications-symbolic'});
this.add_actor(this._icon);
this._label = new St.Label({ text: _('No Notifications') });
this._label = new St.Label({text: _('No Notifications')});
this.add_actor(this._label);
}
});
@ -957,7 +957,7 @@ class CalendarMessageList extends St.Widget {
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
box.add_actor(this._scrollView);
let hbox = new St.BoxLayout({ style_class: 'message-list-controls' });
let hbox = new St.BoxLayout({style_class: 'message-list-controls'});
box.add_child(hbox);
const dndLabel = new St.Label({

View File

@ -20,10 +20,10 @@ class CheckBox extends St.Button {
});
this.set_accessible_role(Atk.Role.CHECK_BOX);
this._box = new St.Bin({ y_align: Clutter.ActorAlign.START });
this._box = new St.Bin({y_align: Clutter.ActorAlign.START});
container.add_actor(this._box);
this._label = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
this._label = new St.Label({y_align: Clutter.ActorAlign.CENTER});
this._label.clutter_text.set_line_wrap(true);
this._label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
this.set_label_actor(this._label);

View File

@ -44,7 +44,7 @@ export const CloseDialog = GObject.registerClass({
let title = _('“%s” is not responding.').format(windowApp.get_name());
let description = _('You may choose to wait a short while for it to ' +
'continue or force the app to quit entirely.');
return new Dialog.MessageDialogContent({ title, description });
return new Dialog.MessageDialogContent({title, description});
}
_updateScale() {
@ -55,7 +55,7 @@ export const CloseDialog = GObject.registerClass({
if (this._window.get_client_type() !== Meta.WindowClientType.WAYLAND)
return;
let { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
let {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
this._dialog.set_scale(1 / scaleFactor, 1 / scaleFactor);
}
@ -131,7 +131,7 @@ export const CloseDialog = GObject.registerClass({
if (shouldTrack) {
Main.layoutManager.trackChrome(this._dialog,
{ affectsInputRegion: true });
{affectsInputRegion: true});
} else {
Main.layoutManager.untrackChrome(this._dialog);
}

View File

@ -18,7 +18,7 @@ const AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
class AutomountManager {
constructor() {
this._settings = new Gio.Settings({ schema_id: SETTINGS_SCHEMA });
this._settings = new Gio.Settings({schema_id: SETTINGS_SCHEMA});
this._activeOperations = new Map();
this._session = new GnomeSession.SessionManager();
this._session.connectSignal('InhibitorAdded',
@ -227,7 +227,7 @@ class AutomountManager {
const existingDialog = prevOperation?.borrowDialog();
let operation =
new ShellMountOperation.ShellMountOperation(volume,
{ existingDialog });
{existingDialog});
this._mountVolume(volume, operation);
}

View File

@ -87,7 +87,7 @@ function HotplugSniffer() {
class ContentTypeDiscoverer {
constructor() {
this._settings = new Gio.Settings({ schema_id: SETTINGS_SCHEMA });
this._settings = new Gio.Settings({schema_id: SETTINGS_SCHEMA});
}
async guessContentTypes(mount) {
@ -166,7 +166,7 @@ class AutorunDispatcher {
constructor(manager) {
this._manager = manager;
this._sources = [];
this._settings = new Gio.Settings({ schema_id: SETTINGS_SCHEMA });
this._settings = new Gio.Settings({schema_id: SETTINGS_SCHEMA});
}
_getAutorunSettingForType(contentType) {

View File

@ -17,7 +17,7 @@ import {wiggle} from '../../misc/animationUtils.js';
const KeyringDialog = GObject.registerClass(
class KeyringDialog extends ModalDialog.ModalDialog {
_init() {
super._init({ styleClass: 'prompt-dialog' });
super._init({styleClass: 'prompt-dialog'});
this.prompt = new Shell.KeyringPrompt();
this.prompt.connect('show-password', this._onShowPassword.bind(this));
@ -61,7 +61,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
this.prompt.set_password_actor(this._passwordEntry.clutter_text);
this.prompt.set_confirm_actor(this._confirmEntry.clutter_text);
let warningBox = new St.BoxLayout({ vertical: true });
let warningBox = new St.BoxLayout({vertical: true});
let capsLockWarning = new ShellEntry.CapsLockWarning();
let syncCapsLockWarningVisibility = () => {
@ -72,7 +72,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
this.prompt.connect('notify::confirm-visible', syncCapsLockWarningVisibility);
warningBox.add_child(capsLockWarning);
let warning = new St.Label({ style_class: 'prompt-dialog-error-label' });
let warning = new St.Label({style_class: 'prompt-dialog-error-label'});
warning.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
warning.clutter_text.line_wrap = true;
this.prompt.bind_property('warning',

View File

@ -24,7 +24,7 @@ const VPN_UI_GROUP = 'VPN Plugin UI';
const NetworkSecretDialog = GObject.registerClass(
class NetworkSecretDialog extends ModalDialog.ModalDialog {
_init(agent, requestId, connection, settingName, hints, flags, contentOverride) {
super._init({ styleClass: 'prompt-dialog' });
super._init({styleClass: 'prompt-dialog'});
this._agent = agent;
this._requestId = requestId;
@ -469,10 +469,10 @@ class VPNRequestHandler extends Signals.EventEmitter {
});
this._childPid = pid;
this._stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true });
this._stdout = new Gio.UnixInputStream({ fd: stdout, close_fd: true });
this._stdin = new Gio.UnixOutputStream({fd: stdin, close_fd: true});
this._stdout = new Gio.UnixInputStream({fd: stdout, close_fd: true});
GLib.close(stderr);
this._dataStdout = new Gio.DataInputStream({ base_stream: this._stdout });
this._dataStdout = new Gio.DataInputStream({base_stream: this._stdout});
if (this._newStylePlugin)
this._readStdoutNewStyle();

View File

@ -28,10 +28,10 @@ const DIALOG_ICON_SIZE = 64;
const DELAYED_RESET_TIMEOUT = 200;
const AuthenticationDialog = GObject.registerClass({
Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } },
Signals: {'done': {param_types: [GObject.TYPE_BOOLEAN]}},
}, class AuthenticationDialog extends ModalDialog.ModalDialog {
_init(actionId, description, cookie, userNames) {
super._init({ styleClass: 'prompt-dialog' });
super._init({styleClass: 'prompt-dialog'});
this.actionId = actionId;
this.message = description;
@ -45,7 +45,7 @@ const AuthenticationDialog = GObject.registerClass({
let title = _('Authentication Required');
let headerContent = new Dialog.MessageDialogContent({ title, description });
let headerContent = new Dialog.MessageDialogContent({title, description});
this.contentLayout.add_child(headerContent);
let bodyContent = new Dialog.MessageDialogContent();
@ -106,7 +106,7 @@ const AuthenticationDialog = GObject.registerClass({
GObject.BindingFlags.SYNC_CREATE);
passwordBox.add_child(this._passwordEntry);
let warningBox = new St.BoxLayout({ vertical: true });
let warningBox = new St.BoxLayout({vertical: true});
let capsLockWarning = new ShellEntry.CapsLockWarning();
this._passwordEntry.bind_property('visible',
@ -134,7 +134,7 @@ const AuthenticationDialog = GObject.registerClass({
* infoMessage and errorMessageLabel - but it is still invisible because
* gnome-shell.css sets the color to be transparent
*/
this._nullMessageLabel = new St.Label({ style_class: 'prompt-dialog-null-label' });
this._nullMessageLabel = new St.Label({style_class: 'prompt-dialog-null-label'});
this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._nullMessageLabel.clutter_text.line_wrap = true;
warningBox.add_child(this._nullMessageLabel);

View File

@ -388,9 +388,9 @@ class ChatSource extends MessageTray.Source {
getIcon() {
let file = this._contact.get_avatar_file();
if (file)
return new Gio.FileIcon({ file });
return new Gio.FileIcon({file});
else
return new Gio.ThemedIcon({ name: 'avatar-default' });
return new Gio.ThemedIcon({name: 'avatar-default'});
}
getSecondaryIcon() {
@ -419,7 +419,7 @@ class ChatSource extends MessageTray.Source {
default:
iconName = 'user-offline';
}
return new Gio.ThemedIcon({ name: iconName });
return new Gio.ThemedIcon({name: iconName});
}
_updateAvatarIcon() {
@ -427,7 +427,7 @@ class ChatSource extends MessageTray.Source {
if (this._notification) {
this._notification.update(this._notification.title,
this._notification.bannerBodyText,
{ gicon: this.getIcon() });
{gicon: this.getIcon()});
}
}
@ -633,7 +633,7 @@ class ChatSource extends MessageTray.Source {
if (this._notification) {
this._notification.update(this._notification.title,
this._notification.bannerBodyText,
{ secondaryGIcon: this.getSecondaryIcon() });
{secondaryGIcon: this.getSecondaryIcon()});
}
}
@ -667,14 +667,14 @@ class ChatNotificationMessage extends GObject.Object {
const ChatNotification = HAVE_TP ? GObject.registerClass({
Signals: {
'message-removed': { param_types: [ChatNotificationMessage.$gtype] },
'message-added': { param_types: [ChatNotificationMessage.$gtype] },
'timestamp-changed': { param_types: [ChatNotificationMessage.$gtype] },
'message-removed': {param_types: [ChatNotificationMessage.$gtype]},
'message-added': {param_types: [ChatNotificationMessage.$gtype]},
'timestamp-changed': {param_types: [ChatNotificationMessage.$gtype]},
},
}, class ChatNotification extends MessageTray.Notification {
_init(source) {
super._init(source, source.title, null,
{ secondaryGIcon: source.getSecondaryIcon() });
{secondaryGIcon: source.getSecondaryIcon()});
this.setUrgency(MessageTray.Urgency.HIGH);
this.setResident(true);
@ -775,7 +775,7 @@ const ChatNotification = HAVE_TP ? GObject.registerClass({
timestamp: currentTime,
noTimestamp: false,
});
const { noTimestamp } = props;
const {noTimestamp} = props;
delete props.noTimestamp;
// Reset the old message timeout
@ -897,7 +897,7 @@ class ChatNotificationBanner extends MessageTray.NotificationBanner {
this._oldMaxScrollValue = Math.max(adjustment.lower, adjustment.upper - adjustment.page_size);
});
this._inputHistory = new History.HistoryManager({ entry: this._responseEntry.clutter_text });
this._inputHistory = new History.HistoryManager({entry: this._responseEntry.clutter_text});
this._composingTimeoutId = 0;

View File

@ -66,7 +66,7 @@ class DashItemContainer extends St.Widget {
_init() {
super._init({
style_class: 'dash-item-container',
pivot_point: new Graphene.Point({ x: .5, y: .5 }),
pivot_point: new Graphene.Point({x: .5, y: .5}),
layout_manager: new Clutter.BinLayout(),
scale_x: 0,
scale_y: 0,
@ -76,7 +76,7 @@ class DashItemContainer extends St.Widget {
});
this._labelText = '';
this.label = new St.Label({ style_class: 'dash-label' });
this.label = new St.Label({style_class: 'dash-label'});
this.label.hide();
Main.layoutManager.addChrome(this.label);
this.label.connectObject('destroy', () => (this.label = null), this);
@ -288,7 +288,7 @@ const DragPlaceholderItem = GObject.registerClass(
class DragPlaceholderItem extends DashItemContainer {
_init() {
super._init();
this.setChild(new St.Bin({ style_class: 'placeholder' }));
this.setChild(new St.Bin({style_class: 'placeholder'}));
}
});
@ -296,7 +296,7 @@ const EmptyDropTargetItem = GObject.registerClass(
class EmptyDropTargetItem extends DashItemContainer {
_init() {
super._init();
this.setChild(new St.Bin({ style_class: 'empty-dash-drop-target' }));
this.setChild(new St.Bin({style_class: 'empty-dash-drop-target'}));
}
});
@ -317,7 +317,7 @@ class DashIconsLayout extends Clutter.BoxLayout {
const baseIconSizes = [16, 22, 24, 32, 48, 64];
export const Dash = GObject.registerClass({
Signals: { 'icon-size-changed': {} },
Signals: {'icon-size-changed': {}},
}, class Dash extends St.Widget {
_init() {
this._maxWidth = -1;

View File

@ -58,7 +58,7 @@ class Dialog extends St.Widget {
this._dialog.add_child(this.contentLayout);
this.buttonLayout = new St.Widget({
layout_manager: new Clutter.BoxLayout({ homogeneous: true }),
layout_manager: new Clutter.BoxLayout({homogeneous: true}),
});
this._dialog.add_child(this.buttonLayout);
}
@ -86,7 +86,7 @@ class Dialog extends St.Widget {
if (!buttonInfo)
return Clutter.EVENT_PROPAGATE;
let { button, action } = buttonInfo;
let {button, action} = buttonInfo;
if (action && button.reactive) {
action();
@ -111,7 +111,7 @@ class Dialog extends St.Widget {
}
addButton(buttonInfo) {
let { label, action, key } = buttonInfo;
let {label, action, key} = buttonInfo;
let isDefault = buttonInfo['default'];
let keys;
@ -170,8 +170,8 @@ export const MessageDialogContent = GObject.registerClass({
},
}, class MessageDialogContent extends St.BoxLayout {
_init(params) {
this._title = new St.Label({ style_class: 'message-dialog-title' });
this._description = new St.Label({ style_class: 'message-dialog-description' });
this._title = new St.Label({style_class: 'message-dialog-title'});
this._description = new St.Label({style_class: 'message-dialog-description'});
this._description.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._description.clutter_text.line_wrap = true;
@ -257,7 +257,7 @@ export const ListSection = GObject.registerClass({
},
}, class ListSection extends St.BoxLayout {
_init(params) {
this._title = new St.Label({ style_class: 'dialog-list-title' });
this._title = new St.Label({style_class: 'dialog-list-title'});
this._listScrollView = new St.ScrollView({
style_class: 'dialog-list-scrollview',
@ -319,7 +319,7 @@ export const ListSectionItem = GObject.registerClass({
y_align: Clutter.ActorAlign.CENTER,
});
this._title = new St.Label({ style_class: 'dialog-list-item-title' });
this._title = new St.Label({style_class: 'dialog-list-item-title'});
this._description = new St.Label({
style_class: 'dialog-list-item-title-description',
@ -328,7 +328,7 @@ export const ListSectionItem = GObject.registerClass({
textLayout.add_child(this._title);
textLayout.add_child(this._description);
let defaultParams = { style_class: 'dialog-list-item' };
let defaultParams = {style_class: 'dialog-list-item'};
super._init(Object.assign(defaultParams, params));
this.label_actor = this._title;

View File

@ -50,7 +50,7 @@ let currentDraggable = null;
function _getEventHandlerActor() {
if (!eventHandlerActor) {
eventHandlerActor = new Clutter.Actor({ width: 0, height: 0, reactive: true });
eventHandlerActor = new Clutter.Actor({width: 0, height: 0, reactive: true});
Main.uiGroup.add_actor(eventHandlerActor);
// We connect to 'event' rather than 'captured-event' because the capturing phase doesn't happen
// when you've grabbed the pointer.

View File

@ -13,7 +13,7 @@ const DRAG_DISTANCE = 80;
export const EdgeDragAction = GObject.registerClass({
Signals: {
'activated': {},
'progress': { param_types: [GObject.TYPE_DOUBLE] },
'progress': {param_types: [GObject.TYPE_DOUBLE]},
},
}, class EdgeDragAction extends Clutter.GestureAction {
_init(side, allowedModes) {
@ -25,7 +25,7 @@ export const EdgeDragAction = GObject.registerClass({
}
_getMonitorRect(x, y) {
let rect = new Meta.Rectangle({ x: x - 1, y: y - 1, width: 1, height: 1 });
let rect = new Meta.Rectangle({x: x - 1, y: y - 1, width: 1, height: 1});
let monitorIndex = global.display.get_monitor_index_for_rect(rect);
return global.display.get_monitor_geometry(monitorIndex);

View File

@ -398,7 +398,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
// Use a different description when we are installing a system upgrade
// if the PackageKit proxy is available (i.e. PackageKit is available).
if (dialogContent.upgradeDescription) {
const { name, version } = this._updateInfo.PreparedUpgrade;
const {name, version} = this._updateInfo.PreparedUpgrade;
if (name != null && version != null)
description = dialogContent.upgradeDescription(name, version);
}

View File

@ -159,7 +159,7 @@ function _easeActor(actor, params) {
.map(p => actor.get_transition(p))
.filter(t => t !== null);
transitions.forEach(t => t.set({ repeatCount, autoReverse }));
transitions.forEach(t => t.set({repeatCount, autoReverse}));
const [transition] = transitions;
@ -232,7 +232,7 @@ function _easeActorProperty(actor, propName, target, params) {
let pspec = actor.find_property(propName);
let transition = new Clutter.PropertyTransition(Object.assign({
property_name: propName,
interval: new Clutter.Interval({ value_type: pspec.value_type }),
interval: new Clutter.Interval({value_type: pspec.value_type}),
remove_on_complete: true,
repeat_count: repeatCount,
auto_reverse: autoReverse,

View File

@ -95,7 +95,7 @@ export function uninstallExtension(uuid) {
* @throws
*/
function checkResponse(message) {
const { statusCode } = message;
const {statusCode} = message;
const phrase = Soup.Status.get_phrase(statusCode);
if (statusCode !== Soup.Status.OK)
throw new Error(`Unexpected response: ${phrase}`);
@ -159,7 +159,7 @@ export async function downloadExtensionUpdate(uuid) {
const dir = Gio.File.new_for_path(
GLib.build_filenamev([global.userdatadir, 'extension-updates', uuid]));
const params = { shell_version: Config.PACKAGE_VERSION };
const params = {shell_version: Config.PACKAGE_VERSION};
const message = Soup.Message.new_from_encoded_form('GET',
REPOSITORY_URL_DOWNLOAD.format(uuid),
Soup.form_encode_hash(params));
@ -246,7 +246,7 @@ export async function checkForUpdates() {
const InstallExtensionDialog = GObject.registerClass(
class InstallExtensionDialog extends ModalDialog.ModalDialog {
_init(uuid, info, invocation) {
super._init({ styleClass: 'extension-dialog' });
super._init({styleClass: 'extension-dialog'});
this._uuid = uuid;
this._info = info;
@ -278,7 +278,7 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog {
async _onInstallButtonPressed() {
this.close();
const params = { shell_version: Config.PACKAGE_VERSION };
const params = {shell_version: Config.PACKAGE_VERSION};
const message = Soup.Message.new_from_encoded_form('GET',
REPOSITORY_URL_DOWNLOAD.format(this._uuid),
Soup.form_encode_hash(params));

View File

@ -465,7 +465,7 @@ export class ExtensionManager extends Signals.EventEmitter {
}
async unloadExtension(extension) {
const { uuid, type } = extension;
const {uuid, type} = extension;
// Try to disable it -- if it's ERROR'd, we can't guarantee that,
// but it will be removed on next reboot, and hopefully nothing
@ -486,7 +486,7 @@ export class ExtensionManager extends Signals.EventEmitter {
async reloadExtension(oldExtension) {
// Grab the things we'll need to pass to createExtensionObject
// to reload it.
let { uuid, dir, type } = oldExtension;
let {uuid, dir, type} = oldExtension;
// Then unload the old extension.
await this.unloadExtension(oldExtension);

View File

@ -246,7 +246,7 @@ export class GrabHelper {
if (type == Clutter.EventType.KEY_PRESS &&
event.get_key_symbol() == Clutter.KEY_Escape) {
this.ungrab({ isUser: true });
this.ungrab({isUser: true});
return Clutter.EVENT_STOP;
}
@ -286,7 +286,7 @@ export class GrabHelper {
this._ignoreUntilRelease = true;
let i = this._actorInGrabStack(targetActor) + 1;
this.ungrab({ actor: this._grabStack[i].actor, isUser: true });
this.ungrab({actor: this._grabStack[i].actor, isUser: true});
return Clutter.EVENT_STOP;
}

View File

@ -41,8 +41,8 @@ const CandidateArea = GObject.registerClass({
reactive: true,
track_hover: true,
});
box._indexLabel = new St.Label({ style_class: 'candidate-index' });
box._candidateLabel = new St.Label({ style_class: 'candidate-label' });
box._indexLabel = new St.Label({style_class: 'candidate-index'});
box._candidateLabel = new St.Label({style_class: 'candidate-label'});
box.add_child(box._indexLabel);
box.add_child(box._candidateLabel);
this._candidateBoxes.push(box);
@ -55,7 +55,7 @@ const CandidateArea = GObject.registerClass({
});
}
this._buttonBox = new St.BoxLayout({ style_class: 'candidate-page-button-box' });
this._buttonBox = new St.BoxLayout({style_class: 'candidate-page-button-box'});
this._previousButton = new St.Button({
style_class: 'candidate-page-button candidate-page-button-previous button',
@ -152,7 +152,7 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
this.visible = false;
this.style_class = 'candidate-popup-boxpointer';
this._dummyCursor = new Clutter.Actor({ opacity: 0 });
this._dummyCursor = new Clutter.Actor({opacity: 0});
Main.layoutManager.uiGroup.add_actor(this._dummyCursor);
Main.layoutManager.addTopChrome(this);
@ -328,7 +328,7 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
// so don't raise to the top.
// The on-screen keyboard is expected to be above any entries,
// so just above the keyboard gets us to the right layer.
const { keyboardBox } = Main.layoutManager;
const {keyboardBox} = Main.layoutManager;
this.get_parent().set_child_above_sibling(this, keyboardBox);
} else {
this.close(BoxPointer.PopupAnimation.NONE);

View File

@ -73,7 +73,7 @@ class BaseIcon extends Shell.SquareBin {
if (params.showLabel)
styleClass += ' overview-icon-with-label';
super._init({ style_class: styleClass });
super._init({style_class: styleClass});
this._box = new St.BoxLayout({
vertical: true,
@ -83,12 +83,12 @@ class BaseIcon extends Shell.SquareBin {
this.set_child(this._box);
this.iconSize = ICON_SIZE;
this._iconBin = new St.Bin({ x_align: Clutter.ActorAlign.CENTER });
this._iconBin = new St.Bin({x_align: Clutter.ActorAlign.CENTER});
this._box.add_actor(this._iconBin);
if (params.showLabel) {
this.label = new St.Label({ text: label });
this.label = new St.Label({text: label});
this.label.clutter_text.set({
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
@ -142,7 +142,7 @@ class BaseIcon extends Shell.SquareBin {
if (this._setSizeManually) {
size = this.iconSize;
} else {
const { scaleFactor } =
const {scaleFactor} =
St.ThemeContext.get_for_stage(global.stage);
let [found, len] = node.lookup_length('icon-size', false);
@ -526,7 +526,7 @@ export const IconGridLayout = GObject.registerClass({
}
_appendPage() {
this._pages.push({ children: [] });
this._pages.push({children: []});
this.emit('pages-changed');
}
@ -1226,7 +1226,7 @@ export const IconGrid = GObject.registerClass({
}
_findBestModeForSize(width, height) {
const { pagePadding } = this.layout_manager;
const {pagePadding} = this.layout_manager;
width -= pagePadding.left + pagePadding.right;
height -= pagePadding.top + pagePadding.bottom;

View File

@ -15,7 +15,7 @@ class KbdA11yDialog extends GObject.Object {
_init() {
super._init();
this._a11ySettings = new Gio.Settings({ schema_id: KEYBOARD_A11Y_SCHEMA });
this._a11ySettings = new Gio.Settings({schema_id: KEYBOARD_A11Y_SCHEMA});
let seat = Clutter.get_default_backend().get_default_seat();
seat.connect('kbd-a11y-flags-changed',
@ -50,7 +50,7 @@ class KbdA11yDialog extends GObject.Object {
return;
}
let content = new Dialog.MessageDialogContent({ title, description });
let content = new Dialog.MessageDialogContent({title, description});
dialog.contentLayout.add_child(content);
dialog.addButton({

View File

@ -176,7 +176,7 @@ class Suggestions extends St.BoxLayout {
}
add(word, callback) {
let button = new St.Button({ label: word });
let button = new St.Button({label: word});
button.connect('button-press-event', () => {
callback();
return Clutter.EVENT_STOP;
@ -272,7 +272,7 @@ const Key = GObject.registerClass({
}, class Key extends St.BoxLayout {
_init(params, extendedKeys = []) {
const {label, iconName, commitString, keyval} = {keyval: 0, ...params};
super._init({ style_class: 'key-container' });
super._init({style_class: 'key-container'});
this._keyval = parseInt(keyval, 16);
this.keyButton = this._makeKey(commitString, label, iconName);
@ -659,7 +659,7 @@ const EmojiPager = GObject.registerClass({
GLib.MININT32, GLib.MAXINT32, 0),
},
Signals: {
'emoji': { param_types: [GObject.TYPE_STRING] },
'emoji': {param_types: [GObject.TYPE_STRING]},
'page-changed': {
param_types: [GObject.TYPE_INT, GObject.TYPE_INT, GObject.TYPE_INT],
},
@ -813,7 +813,7 @@ const EmojiPager = GObject.registerClass({
if (j % itemsPerPage == 0) {
page++;
pageKeys = [];
this._pages.push({ pageKeys, nPages, page, section: this._sections[i] });
this._pages.push({pageKeys, nPages, page, section: this._sections[i]});
}
pageKeys.push(section.keys[j]);
@ -936,7 +936,7 @@ const EmojiPager = GObject.registerClass({
const EmojiSelection = GObject.registerClass({
Signals: {
'emoji-selected': { param_types: [GObject.TYPE_STRING] },
'emoji-selected': {param_types: [GObject.TYPE_STRING]},
'close-request': {},
'toggle': {},
},
@ -956,15 +956,15 @@ const EmojiSelection = GObject.registerClass({
});
this._sections = [
{ first: 'grinning face', label: '🙂️' },
{ first: 'selfie', label: '👍️' },
{ first: 'monkey face', label: '🌷️' },
{ first: 'grapes', label: '🍴️' },
{ first: 'globe showing Europe-Africa', label: '✈️' },
{ first: 'jack-o-lantern', label: '🏃️' },
{ first: 'muted speaker', label: '🔔️' },
{ first: 'ATM sign', label: '❤️' },
{ first: 'chequered flag', label: '🚩️' },
{first: 'grinning face', label: '🙂️'},
{first: 'selfie', label: '👍️'},
{first: 'monkey face', label: '🌷️'},
{first: 'grapes', label: '🍴️'},
{first: 'globe showing Europe-Africa', label: '✈️'},
{first: 'jack-o-lantern', label: '🏃️'},
{first: 'muted speaker', label: '🔔️'},
{first: 'ATM sign', label: '❤️'},
{first: 'chequered flag', label: '🚩️'},
];
this._gridLayout = gridLayout;
@ -1057,7 +1057,7 @@ const EmojiSelection = GObject.registerClass({
/* Create the key */
let label = emoji[currentKey].char + String.fromCharCode(0xFE0F);
currentSection.keys.push({ label, variants });
currentSection.keys.push({label, variants});
currentKey = i;
variants = [];
}
@ -1121,23 +1121,23 @@ const EmojiSelection = GObject.registerClass({
const Keypad = GObject.registerClass({
Signals: {
'keyval': { param_types: [GObject.TYPE_UINT] },
'keyval': {param_types: [GObject.TYPE_UINT]},
},
}, class Keypad extends AspectContainer {
_init() {
let keys = [
{ label: '1', keyval: Clutter.KEY_1, left: 0, top: 0 },
{ label: '2', keyval: Clutter.KEY_2, left: 1, top: 0 },
{ label: '3', keyval: Clutter.KEY_3, left: 2, top: 0 },
{ label: '4', keyval: Clutter.KEY_4, left: 0, top: 1 },
{ label: '5', keyval: Clutter.KEY_5, left: 1, top: 1 },
{ label: '6', keyval: Clutter.KEY_6, left: 2, top: 1 },
{ label: '7', keyval: Clutter.KEY_7, left: 0, top: 2 },
{ label: '8', keyval: Clutter.KEY_8, left: 1, top: 2 },
{ label: '9', keyval: Clutter.KEY_9, left: 2, top: 2 },
{ label: '0', keyval: Clutter.KEY_0, left: 1, top: 3 },
{ keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic', left: 3, top: 0 },
{ keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic', left: 3, top: 1, height: 2 },
{label: '1', keyval: Clutter.KEY_1, left: 0, top: 0},
{label: '2', keyval: Clutter.KEY_2, left: 1, top: 0},
{label: '3', keyval: Clutter.KEY_3, left: 2, top: 0},
{label: '4', keyval: Clutter.KEY_4, left: 0, top: 1},
{label: '5', keyval: Clutter.KEY_5, left: 1, top: 1},
{label: '6', keyval: Clutter.KEY_6, left: 2, top: 1},
{label: '7', keyval: Clutter.KEY_7, left: 0, top: 2},
{label: '8', keyval: Clutter.KEY_8, left: 1, top: 2},
{label: '9', keyval: Clutter.KEY_9, left: 2, top: 2},
{label: '0', keyval: Clutter.KEY_0, left: 1, top: 3},
{keyval: Clutter.KEY_BackSpace, icon: 'edit-clear-symbolic', left: 3, top: 0},
{keyval: Clutter.KEY_Return, extraClassName: 'enter-key', icon: 'keyboard-enter-symbolic', left: 3, top: 1, height: 2},
];
super._init({
@ -1151,7 +1151,7 @@ const Keypad = GObject.registerClass({
column_homogeneous: true,
row_homogeneous: true,
});
this._box = new St.Widget({ layout_manager: gridLayout, x_expand: true, y_expand: true });
this._box = new St.Widget({layout_manager: gridLayout, x_expand: true, y_expand: true});
this.add_child(this._box);
for (let i = 0; i < keys.length; i++) {
@ -1181,7 +1181,7 @@ export class KeyboardManager extends Signals.EventEmitter {
super();
this._keyboard = null;
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
this._a11yApplicationsSettings = new Gio.Settings({schema_id: A11Y_APPLICATIONS_SCHEMA});
this._a11yApplicationsSettings.connect('changed', this._syncEnabled.bind(this));
this._seat = Clutter.get_default_backend().get_default_seat();

View File

@ -219,7 +219,7 @@ export const LayoutManager = GObject.registerClass({
this._pendingLoadBackground = false;
// Set up stage hierarchy to group all UI actors under one container.
this.uiGroup = new UiActor({ name: 'uiGroup' });
this.uiGroup = new UiActor({name: 'uiGroup'});
this.uiGroup.set_flags(Clutter.ActorFlags.NO_LAYOUT);
global.stage.add_child(this.uiGroup);
@ -308,7 +308,7 @@ export const LayoutManager = GObject.registerClass({
// A dummy actor that tracks the mouse or text cursor, based on the
// position and size set in setDummyCursorGeometry.
this.dummyCursor = new St.Widget({ width: 0, height: 0, opacity: 0 });
this.dummyCursor = new St.Widget({width: 0, height: 0, opacity: 0});
this.uiGroup.add_actor(this.dummyCursor);
let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
@ -984,7 +984,7 @@ export const LayoutManager = GObject.registerClass({
findIndexForActor(actor) {
let [x, y] = actor.get_transformed_position();
let [w, h] = actor.get_transformed_size();
let rect = new Meta.Rectangle({ x, y, width: w, height: h });
let rect = new Meta.Rectangle({x, y, width: w, height: h});
return global.display.get_monitor_index_for_rect(rect);
}
@ -1048,7 +1048,7 @@ export const LayoutManager = GObject.registerClass({
h = Math.round(h);
if (actorData.affectsInputRegion && wantsInputRegion && actorData.actor.get_paint_visibility())
rects.push(new Meta.Rectangle({ x, y, width: w, height: h }));
rects.push(new Meta.Rectangle({x, y, width: w, height: h}));
let monitor = null;
if (actorData.affectsStruts)
@ -1098,8 +1098,8 @@ export const LayoutManager = GObject.registerClass({
continue;
}
let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 });
let strut = new Meta.Strut({ rect: strutRect, side });
let strutRect = new Meta.Rectangle({x: x1, y: y1, width: x2 - x1, height: y2 - y1});
let strut = new Meta.Strut({rect: strutRect, side});
struts.push(strut);
}
}
@ -1445,7 +1445,7 @@ class PressureBarrier extends Signals.EventEmitter {
const ScreenTransition = GObject.registerClass(
class ScreenTransition extends Clutter.Actor {
_init() {
super._init({ visible: false });
super._init({visible: false});
}
vfunc_hide() {

View File

@ -140,9 +140,9 @@ export const Lightbox = GObject.registerClass({
this._radialEffect = params.radialEffect;
if (this._radialEffect)
this.add_effect(new RadialShaderEffect({ name: 'radial' }));
this.add_effect(new RadialShaderEffect({name: 'radial'}));
else
this.set({ opacity: 0, style_class: 'lightbox' });
this.set({opacity: 0, style_class: 'lightbox'});
container.add_actor(this);
container.set_child_above_sibling(this, null);
@ -209,7 +209,7 @@ export const Lightbox = GObject.registerClass({
'@effects.radial.brightness', VIGNETTE_BRIGHTNESS, easeProps);
this.ease_property(
'@effects.radial.sharpness', VIGNETTE_SHARPNESS,
Object.assign({ onComplete }, easeProps));
Object.assign({onComplete}, easeProps));
} else {
this.ease(Object.assign(easeProps, {
opacity: 255 * this._fadeFactor,
@ -235,9 +235,9 @@ export const Lightbox = GObject.registerClass({
this.ease_property(
'@effects.radial.brightness', 1.0, easeProps);
this.ease_property(
'@effects.radial.sharpness', 0.0, Object.assign({ onComplete }, easeProps));
'@effects.radial.sharpness', 0.0, Object.assign({onComplete}, easeProps));
} else {
this.ease(Object.assign(easeProps, { opacity: 0, onComplete }));
this.ease(Object.assign(easeProps, {opacity: 0, onComplete}));
}
}

View File

@ -9,7 +9,7 @@ const LOCATE_POINTER_SCHEMA = 'org.gnome.desktop.interface';
export class LocatePointer {
constructor() {
this._settings = new Gio.Settings({ schema_id: LOCATE_POINTER_SCHEMA });
this._settings = new Gio.Settings({schema_id: LOCATE_POINTER_SCHEMA});
this._settings.connect(`changed::${LOCATE_POINTER_KEY}`, () => this._syncEnabled());
this._syncEnabled();
}

View File

@ -49,8 +49,8 @@ const LG_ANIMATION_TIME = 500;
const CLUTTER_DEBUG_FLAG_CATEGORIES = new Map([
// Paint debugging can easily result in a non-responsive session
['DebugFlag', { argPos: 0, exclude: ['PAINT'] }],
['DrawDebugFlag', { argPos: 1, exclude: [] }],
['DebugFlag', {argPos: 0, exclude: ['PAINT']}],
['DrawDebugFlag', {argPos: 1, exclude: []}],
// Exluded due to the only current option likely to result in shooting ones
// foot
// ['PickDebugFlag', { argPos: 2, exclude: [] }],
@ -83,17 +83,17 @@ class AutoComplete extends Signals.EventEmitter {
// multiple matches + double tab = emit a suggest event with all possible options
if (event.completions.length == 1) {
this.additionalCompletionText(event.completions[0], event.attrHead);
this.emit('completion', { completion: event.completions[0], type: 'whole-word' });
this.emit('completion', {completion: event.completions[0], type: 'whole-word'});
} else if (event.completions.length > 1 && event.tabType === 'single') {
let commonPrefix = JsParse.getCommonPrefix(event.completions);
if (commonPrefix.length > 0) {
this.additionalCompletionText(commonPrefix, event.attrHead);
this.emit('completion', { completion: commonPrefix, type: 'prefix' });
this.emit('suggest', { completions: event.completions });
this.emit('completion', {completion: commonPrefix, type: 'prefix'});
this.emit('suggest', {completions: event.completions});
}
} else if (event.completions.length > 1 && event.tabType === 'double') {
this.emit('suggest', { completions: event.completions });
this.emit('suggest', {completions: event.completions});
}
}
@ -134,7 +134,7 @@ class AutoComplete extends Signals.EventEmitter {
}
const Notebook = GObject.registerClass({
Signals: { 'selection': { param_types: [Clutter.Actor.$gtype] } },
Signals: {'selection': {param_types: [Clutter.Actor.$gtype]}},
}, class Notebook extends St.BoxLayout {
_init() {
super._init({
@ -142,7 +142,7 @@ const Notebook = GObject.registerClass({
y_expand: true,
});
this.tabControls = new St.BoxLayout({ style_class: 'labels' });
this.tabControls = new St.BoxLayout({style_class: 'labels'});
this._selectedIndex = -1;
this._tabs = [];
@ -154,7 +154,7 @@ const Notebook = GObject.registerClass({
reactive: true,
track_hover: true,
});
let label = new St.Button({ label: name });
let label = new St.Button({label: name});
label.connect('clicked', () => {
this.selectChild(child);
return true;
@ -162,7 +162,7 @@ const Notebook = GObject.registerClass({
labelBox.add_child(label);
this.tabControls.add(labelBox);
let scrollview = new St.ScrollView({ y_expand: true });
let scrollview = new St.ScrollView({y_expand: true});
scrollview.get_hscroll_bar().hide();
scrollview.add_actor(child);
@ -310,19 +310,19 @@ class ObjLink extends St.Button {
const Result = GObject.registerClass(
class Result extends St.BoxLayout {
_init(lookingGlass, command, o, index) {
super._init({ vertical: true });
super._init({vertical: true});
this.index = index;
this.o = o;
this._lookingGlass = lookingGlass;
let cmdTxt = new St.Label({ text: command });
let cmdTxt = new St.Label({text: command});
cmdTxt.clutter_text.ellipsize = Pango.EllipsizeMode.END;
this.add(cmdTxt);
let box = new St.BoxLayout({});
this.add(box);
let resultTxt = new St.Label({ text: `r(${index}) = ` });
let resultTxt = new St.Label({text: `r(${index}) = `});
resultTxt.clutter_text.ellipsize = Pango.EllipsizeMode.END;
box.add(resultTxt);
let objLink = new ObjLink(this._lookingGlass, o);
@ -333,7 +333,7 @@ class Result extends St.BoxLayout {
const WindowList = GObject.registerClass({
}, class WindowList extends St.BoxLayout {
_init(lookingGlass) {
super._init({ name: 'Windows', vertical: true, style: 'spacing: 8px' });
super._init({name: 'Windows', vertical: true, style: 'spacing: 8px'});
let tracker = Shell.WindowTracker.get_default();
this._updateId = Main.initializeDeferredWork(this, this._updateWindowList.bind(this));
global.display.connect('window-created', this._updateWindowList.bind(this));
@ -356,24 +356,24 @@ const WindowList = GObject.registerClass({
metaWindow.connect('unmanaged', this._updateWindowList.bind(this));
metaWindow._lookingGlassManaged = true;
}
let box = new St.BoxLayout({ vertical: true });
let box = new St.BoxLayout({vertical: true});
this.add(box);
let windowLink = new ObjLink(this._lookingGlass, metaWindow, metaWindow.title);
box.add_child(windowLink);
let propsBox = new St.BoxLayout({ vertical: true, style: 'padding-left: 6px;' });
let propsBox = new St.BoxLayout({vertical: true, style: 'padding-left: 6px;'});
box.add(propsBox);
propsBox.add(new St.Label({ text: `wmclass: ${metaWindow.get_wm_class()}` }));
propsBox.add(new St.Label({text: `wmclass: ${metaWindow.get_wm_class()}`}));
let app = tracker.get_window_app(metaWindow);
if (app != null && !app.is_window_backed()) {
let icon = app.create_icon_texture(22);
let propBox = new St.BoxLayout({ style: 'spacing: 6px; ' });
let propBox = new St.BoxLayout({style: 'spacing: 6px; '});
propsBox.add(propBox);
propBox.add_child(new St.Label({ text: 'app: ' }));
propBox.add_child(new St.Label({text: 'app: '}));
let appLink = new ObjLink(this._lookingGlass, app, app.get_id());
propBox.add_child(appLink);
propBox.add_child(icon);
} else {
propsBox.add(new St.Label({ text: '<untracked>' }));
propsBox.add(new St.Label({text: '<untracked>'}));
}
}
}
@ -387,7 +387,7 @@ const ObjInspector = GObject.registerClass(
class ObjInspector extends St.ScrollView {
_init(lookingGlass) {
super._init({
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
});
this._obj = null;
@ -417,7 +417,7 @@ class ObjInspector extends St.ScrollView {
this._container.destroy_all_children();
let hbox = new St.BoxLayout({ style_class: 'lg-obj-inspector-title' });
let hbox = new St.BoxLayout({style_class: 'lg-obj-inspector-title'});
this._container.add_actor(hbox);
let label = new St.Label({
text: `Inspecting: ${typeof obj}: ${objectToString(obj)}`,
@ -425,12 +425,12 @@ class ObjInspector extends St.ScrollView {
});
label.single_line_mode = true;
hbox.add_child(label);
let button = new St.Button({ label: 'Insert', style_class: 'lg-obj-inspector-button' });
let button = new St.Button({label: 'Insert', style_class: 'lg-obj-inspector-button'});
button.connect('clicked', this._onInsert.bind(this));
hbox.add(button);
if (this._previousObj != null) {
button = new St.Button({ label: 'Back', style_class: 'lg-obj-inspector-button' });
button = new St.Button({label: 'Back', style_class: 'lg-obj-inspector-button'});
button.connect('clicked', this._onBack.bind(this));
hbox.add(button);
}
@ -454,10 +454,10 @@ class ObjInspector extends St.ScrollView {
let prop = obj[propName];
link = new ObjLink(this._lookingGlass, prop);
} catch (e) {
link = new St.Label({ text: '<error>' });
link = new St.Label({text: '<error>'});
}
let box = new St.BoxLayout();
box.add(new St.Label({ text: `${propName}: ` }));
box.add(new St.Label({text: `${propName}: `}));
box.add(link);
this._container.add_actor(box);
}
@ -468,7 +468,7 @@ class ObjInspector extends St.ScrollView {
if (this._open)
return;
const grab = Main.pushModal(this, { actionMode: Shell.ActionMode.LOOKING_GLASS });
const grab = Main.pushModal(this, {actionMode: Shell.ActionMode.LOOKING_GLASS});
if (grab.get_seat_state() !== Clutter.GrabState.ALL) {
Main.popModal(grab);
return;
@ -577,11 +577,11 @@ class RedBorderEffect extends Clutter.Effect {
const Inspector = GObject.registerClass({
Signals: {
'closed': {},
'target': { param_types: [Clutter.Actor.$gtype, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'target': {param_types: [Clutter.Actor.$gtype, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE]},
},
}, class Inspector extends Clutter.Actor {
_init(lookingGlass) {
super._init({ width: 0, height: 0 });
super._init({width: 0, height: 0});
Main.uiGroup.add_actor(this);
@ -592,7 +592,7 @@ const Inspector = GObject.registerClass({
});
this._eventHandler = eventHandler;
this.add_actor(eventHandler);
this._displayText = new St.Label({ x_expand: true });
this._displayText = new St.Label({x_expand: true});
eventHandler.add_child(this._displayText);
eventHandler.connect('key-press-event', this._onKeyPressEvent.bind(this));
@ -718,7 +718,7 @@ const Inspector = GObject.registerClass({
const Extensions = GObject.registerClass({
}, class Extensions extends St.BoxLayout {
_init(lookingGlass) {
super._init({ vertical: true, name: 'lookingGlassExtensions' });
super._init({vertical: true, name: 'lookingGlassExtensions'});
this._lookingGlass = lookingGlass;
this._noExtensions = new St.Label({
@ -753,7 +753,7 @@ const Extensions = GObject.registerClass({
this._extensionsList.remove_actor(this._noExtensions);
this._numExtensions++;
const { name } = extension.metadata;
const {name} = extension.metadata;
const pos = [...this._extensionsList].findIndex(
dsp => dsp._extension.metadata.name.localeCompare(name) > 0);
this._extensionsList.insert_child_at_index(extensionDisplay, pos);
@ -778,14 +778,14 @@ const Extensions = GObject.registerClass({
if (shouldShow) {
let errors = extension.errors;
let errorDisplay = new St.BoxLayout({ vertical: true });
let errorDisplay = new St.BoxLayout({vertical: true});
if (errors && errors.length) {
for (let i = 0; i < errors.length; i++)
errorDisplay.add(new St.Label({ text: errors[i] }));
errorDisplay.add(new St.Label({text: errors[i]}));
} else {
/* Translators: argument is an extension UUID. */
let message = _('%s has not emitted any errors.').format(extension.uuid);
errorDisplay.add(new St.Label({ text: message }));
errorDisplay.add(new St.Label({text: message}));
}
actor._errorDisplay = errorDisplay;
@ -822,7 +822,7 @@ const Extensions = GObject.registerClass({
}
_createExtensionDisplay(extension) {
let box = new St.BoxLayout({ style_class: 'lg-extension', vertical: true });
let box = new St.BoxLayout({style_class: 'lg-extension', vertical: true});
box._extension = extension;
let name = new St.Label({
style_class: 'lg-extension-name',
@ -837,7 +837,7 @@ const Extensions = GObject.registerClass({
});
box.add_child(description);
let metaBox = new St.BoxLayout({ style_class: 'lg-extension-meta' });
let metaBox = new St.BoxLayout({style_class: 'lg-extension-meta'});
box.add(metaBox);
const state = new St.Label({
style_class: 'lg-extension-state',
@ -895,7 +895,7 @@ const ActorLink = GObject.registerClass({
icon_size: 8,
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
});
const label = new St.Label({
@ -1002,7 +1002,7 @@ class ActorTreeViewer extends St.BoxLayout {
this._lookingGlass.inspectObject(actor, button);
});
const mainContainer = new St.BoxLayout({ vertical: true });
const mainContainer = new St.BoxLayout({vertical: true});
const childrenContainer = new St.BoxLayout({
vertical: true,
style: 'padding: 0 0 0 18px',
@ -1298,7 +1298,7 @@ class LookingGlass extends St.BoxLayout {
// Sort of magic, but...eh.
this._maxItems = 150;
this._interfaceSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
this._interfaceSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'});
this._interfaceSettings.connect('changed::monospace-font-name',
this._updateFont.bind(this));
this._updateFont();
@ -1316,7 +1316,7 @@ class LookingGlass extends St.BoxLayout {
Main.uiGroup.add_actor(this._objInspector);
this._objInspector.hide();
let toolbar = new St.BoxLayout({ name: 'Toolbar' });
let toolbar = new St.BoxLayout({name: 'Toolbar'});
this.add_actor(toolbar);
const inspectButton = new St.Button({
style_class: 'lg-toolbar-button',
@ -1360,11 +1360,11 @@ class LookingGlass extends St.BoxLayout {
this._notebook = notebook;
this.add_child(notebook);
let emptyBox = new St.Bin({ x_expand: true });
let emptyBox = new St.Bin({x_expand: true});
toolbar.add_child(emptyBox);
toolbar.add_actor(notebook.tabControls);
this._evalBox = new St.BoxLayout({ name: 'EvalBox', vertical: true });
this._evalBox = new St.BoxLayout({name: 'EvalBox', vertical: true});
notebook.appendPage('Evaluator', this._evalBox);
this._resultsArea = new St.BoxLayout({
@ -1380,7 +1380,7 @@ class LookingGlass extends St.BoxLayout {
});
this._evalBox.add_actor(this._entryArea);
let label = new St.Label({ text: CHEVRON });
let label = new St.Label({text: CHEVRON});
this._entryArea.add(label);
this._entry = new St.Entry({
@ -1479,7 +1479,7 @@ class LookingGlass extends St.BoxLayout {
_showCompletions(completions) {
if (!this._completionActor) {
this._completionActor = new St.Label({ name: 'LookingGlassAutoCompletionText', style_class: 'lg-completions-text' });
this._completionActor = new St.Label({name: 'LookingGlassAutoCompletionText', style_class: 'lg-completions-text'});
this._completionActor.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._completionActor.clutter_text.line_wrap = true;
this._evalBox.insert_child_below(this._completionActor, this._entryArea);
@ -1624,7 +1624,7 @@ class LookingGlass extends St.BoxLayout {
if (this._open)
return;
let grab = Main.pushModal(this, { actionMode: Shell.ActionMode.LOOKING_GLASS });
let grab = Main.pushModal(this, {actionMode: Shell.ActionMode.LOOKING_GLASS});
if (grab.get_seat_state() !== Clutter.GrabState.ALL) {
Main.popModal(grab);
return;

View File

@ -105,7 +105,7 @@ export class Magnifier extends Signals.EventEmitter {
let cursorTracker = Meta.CursorTracker.get_for_display(global.display);
this._cursorTracker = cursorTracker;
this._mouseSprite = new Clutter.Actor({ request_mode: Clutter.RequestMode.CONTENT_SIZE });
this._mouseSprite = new Clutter.Actor({request_mode: Clutter.RequestMode.CONTENT_SIZE});
this._mouseSprite.content = new MouseSpriteContent();
this._cursorRoot = new Clutter.Actor();
@ -553,7 +553,7 @@ export class Magnifier extends Signals.EventEmitter {
}
_settingsInit(zoomRegion) {
this._settings = new Gio.Settings({ schema_id: MAGNIFIER_SCHEMA });
this._settings = new Gio.Settings({schema_id: MAGNIFIER_SCHEMA});
this._settings.connect(`changed::${SCREEN_POSITION_KEY}`,
this._updateScreenPosition.bind(this));
@ -772,8 +772,8 @@ class ZoomRegion {
this._screenPosition = GDesktopEnums.MagnifierScreenPosition.FULL_SCREEN;
this._invertLightness = false;
this._colorSaturation = 1.0;
this._brightness = { r: NO_CHANGE, g: NO_CHANGE, b: NO_CHANGE };
this._contrast = { r: NO_CHANGE, g: NO_CHANGE, b: NO_CHANGE };
this._brightness = {r: NO_CHANGE, g: NO_CHANGE, b: NO_CHANGE};
this._contrast = {r: NO_CHANGE, g: NO_CHANGE, b: NO_CHANGE};
this._magView = null;
this._background = null;
@ -878,7 +878,7 @@ class ZoomRegion {
throw new Error(`Failed to validate parent window: ${e}`);
}
const { focusWindow } = global.display;
const {focusWindow} = global.display;
if (!focusWindow)
return null;
@ -1298,7 +1298,7 @@ class ZoomRegion {
scrollToMousePos() {
this._followingCursor = true;
if (this._mouseTrackingMode != GDesktopEnums.MagnifierMouseTrackingMode.NONE)
this._changeROI({ redoCursorTracking: true });
this._changeROI({redoCursorTracking: true});
else
this._updateMousePosition();
@ -1476,14 +1476,14 @@ class ZoomRegion {
_createActors() {
// The root actor for the zoom region
this._magView = new St.Bin({ style_class: 'magnifier-zoom-region' });
this._magView = new St.Bin({style_class: 'magnifier-zoom-region'});
global.stage.add_actor(this._magView);
// hide the magnified region from CLUTTER_PICK_ALL
Shell.util_set_hidden_from_pick(this._magView, true);
// Add a group to clip the contents of the magnified view.
let mainGroup = new Clutter.Actor({ clip_to_allocation: true });
let mainGroup = new Clutter.Actor({clip_to_allocation: true});
this._magView.set_child(mainGroup);
// Add a background for when the magnified uiGroup is scrolled
@ -1502,7 +1502,7 @@ class ZoomRegion {
// Add either the given mouseSourceActor to the ZoomRegion, or a clone of
// it.
if (this._mouseSourceActor.get_parent() != null)
this._mouseActor = new Clutter.Clone({ source: this._mouseSourceActor });
this._mouseActor = new Clutter.Clone({source: this._mouseSourceActor});
else
this._mouseActor = this._mouseSourceActor;
mainGroup.add_actor(this._mouseActor);
@ -1555,7 +1555,7 @@ class ZoomRegion {
this._updateMagViewGeometry();
if (!fromROIUpdate)
this._changeROI({ redoCursorTracking: this._followingCursor }); // will update mouse
this._changeROI({redoCursorTracking: this._followingCursor}); // will update mouse
if (this.isActive() && this._isMouseOverRegion())
this._magnifier.hideSystemCursor();
@ -1885,7 +1885,7 @@ class Crosshairs extends Clutter.Actor {
if (container) {
crosshairsActor = this;
if (this.get_parent() != null) {
crosshairsActor = new Clutter.Clone({ source: this });
crosshairsActor = new Clutter.Clone({source: this});
this._clones.push(crosshairsActor);
// Clones don't share visibility.

View File

@ -363,7 +363,7 @@ export const Message = GObject.registerClass({
let titleBox = new St.BoxLayout();
contentBox.add_actor(titleBox);
this.titleLabel = new St.Label({ style_class: 'message-title' });
this.titleLabel = new St.Label({style_class: 'message-title'});
this.setTitle(title);
titleBox.add_actor(this.titleLabel);
@ -381,7 +381,7 @@ export const Message = GObject.registerClass({
});
titleBox.add_actor(this._closeButton);
this._bodyStack = new St.Widget({ x_expand: true });
this._bodyStack = new St.Widget({x_expand: true});
this._bodyStack.layout_manager = new LabelExpanderLayout();
contentBox.add_actor(this._bodyStack);
@ -569,7 +569,7 @@ export const MessageListSection = GObject.registerClass({
Signals: {
'can-clear-changed': {},
'empty-changed': {},
'message-focused': { param_types: [Message.$gtype] },
'message-focused': {param_types: [Message.$gtype]},
},
}, class MessageListSection extends St.BoxLayout {
_init() {
@ -628,7 +628,7 @@ export const MessageListSection = GObject.registerClass({
let listItem = new St.Bin({
child: message,
layout_manager: new ScaleLayout(),
pivot_point: new Graphene.Point({ x: .5, y: .5 }),
pivot_point: new Graphene.Point({x: .5, y: .5}),
});
listItem._connectionsIds = [];
@ -645,7 +645,7 @@ export const MessageListSection = GObject.registerClass({
this._list.insert_child_at_index(listItem, index);
if (animate) {
listItem.set({ scale_x: 0, scale_y: 0 });
listItem.set({scale_x: 0, scale_y: 0});
listItem.ease({
scale_x: 1,
scale_y: 1,

View File

@ -199,7 +199,7 @@ export const NotificationGenericPolicy = GObject.registerClass({
super._init();
this.id = 'generic';
this._masterSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications' });
this._masterSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.notifications'});
this._masterSettings.connect('changed', this._changed.bind(this));
}
@ -231,7 +231,7 @@ export const NotificationApplicationPolicy = GObject.registerClass({
this.id = id;
this._canonicalId = this._canonicalizeId(id);
this._masterSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.notifications' });
this._masterSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.notifications'});
this._settings = new Gio.Settings({
schema_id: 'org.gnome.desktop.notifications.application',
path: `/org/gnome/desktop/notifications/application/${this._canonicalId}/`,
@ -360,8 +360,8 @@ export const Notification = GObject.registerClass({
},
Signals: {
'activated': {},
'destroy': { param_types: [GObject.TYPE_UINT] },
'updated': { param_types: [GObject.TYPE_BOOLEAN] },
'destroy': {param_types: [GObject.TYPE_UINT]},
'updated': {param_types: [GObject.TYPE_BOOLEAN]},
},
}, class Notification extends GObject.Object {
_init(source, title, banner, params) {
@ -441,7 +441,7 @@ export const Notification = GObject.registerClass({
// @label: the label for the action's button
// @callback: the callback for the action
addAction(label, callback) {
this.actions.push({ label, callback });
this.actions.push({label, callback});
}
setUrgency(urgency) {
@ -656,14 +656,14 @@ export const Source = GObject.registerClass({
null),
},
Signals: {
'destroy': { param_types: [GObject.TYPE_UINT] },
'destroy': {param_types: [GObject.TYPE_UINT]},
'icon-updated': {},
'notification-added': { param_types: [Notification.$gtype] },
'notification-show': { param_types: [Notification.$gtype] },
'notification-added': {param_types: [Notification.$gtype]},
'notification-show': {param_types: [Notification.$gtype]},
},
}, class Source extends GObject.Object {
_init(title, iconName) {
super._init({ title });
super._init({title});
this.SOURCE_ICON_SIZE = 48;
@ -735,7 +735,7 @@ export const Source = GObject.registerClass({
}
getIcon() {
return new Gio.ThemedIcon({ name: this.iconName });
return new Gio.ThemedIcon({name: this.iconName});
}
_onNotificationDestroy(notification) {
@ -809,8 +809,8 @@ SignalTracker.registerDestroyableType(Source);
export const MessageTray = GObject.registerClass({
Signals: {
'queue-changed': {},
'source-added': { param_types: [Source.$gtype] },
'source-removed': { param_types: [Source.$gtype] },
'source-added': {param_types: [Source.$gtype]},
'source-removed': {param_types: [Source.$gtype]},
},
}, class MessageTray extends St.Widget {
_init() {
@ -829,7 +829,7 @@ export const MessageTray = GObject.registerClass({
this._onStatusChanged(status);
});
let constraint = new Layout.MonitorConstraint({ primary: true });
let constraint = new Layout.MonitorConstraint({primary: true});
Main.layoutManager.panelBox.bind_property('visible',
constraint, 'work-area',
GObject.BindingFlags.SYNC_CREATE);
@ -877,8 +877,8 @@ export const MessageTray = GObject.registerClass({
this._notificationTimeoutId = 0;
this._notificationRemoved = false;
Main.layoutManager.addChrome(this, { affectsInputRegion: false });
Main.layoutManager.trackChrome(this._bannerBin, { affectsInputRegion: true });
Main.layoutManager.addChrome(this, {affectsInputRegion: false});
Main.layoutManager.trackChrome(this._bannerBin, {affectsInputRegion: true});
global.display.connect('in-fullscreen-changed', this._updateState.bind(this));
@ -904,7 +904,7 @@ export const MessageTray = GObject.registerClass({
this._onDragEnd.bind(this));
Main.wm.addKeybinding('focus-active-notification',
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
Meta.KeyBindingFlags.NONE,
Shell.ActionMode.NORMAL |
Shell.ActionMode.OVERVIEW,

View File

@ -32,7 +32,7 @@ export const ModalDialog = GObject.registerClass({
Math.max(...Object.values(State)),
State.CLOSED),
},
Signals: { 'opened': {}, 'closed': {} },
Signals: {'opened': {}, 'closed': {}},
}, class ModalDialog extends St.Widget {
_init(params) {
super._init({
@ -73,7 +73,7 @@ export const ModalDialog = GObject.registerClass({
x_expand: true,
y_expand: true,
});
this._backgroundBin = new St.Bin({ child: this.backgroundStack });
this._backgroundBin = new St.Bin({child: this.backgroundStack});
this._monitorConstraint = new Layout.MonitorConstraint();
this._backgroundBin.add_constraint(this._monitorConstraint);
this.add_actor(this._backgroundBin);
@ -89,7 +89,7 @@ export const ModalDialog = GObject.registerClass({
});
this._lightbox.highlight(this._backgroundBin);
this._eventBlocker = new Clutter.Actor({ reactive: true });
this._eventBlocker = new Clutter.Actor({reactive: true});
this.backgroundStack.add_actor(this._eventBlocker);
}
@ -237,7 +237,7 @@ export const ModalDialog = GObject.registerClass({
if (this._hasModal)
return true;
let params = { actionMode: this._actionMode };
let params = {actionMode: this._actionMode};
if (timestamp)
params['timestamp'] = timestamp;
let grab = Main.pushModal(this, params);

View File

@ -27,7 +27,7 @@ class MediaMessage extends MessageList.Message {
this._player = player;
this._icon = new St.Icon({ style_class: 'media-message-cover-icon' });
this._icon = new St.Icon({style_class: 'media-message-cover-icon'});
this.setIcon(this._icon);
// reclaim space used by unused elements

View File

@ -67,17 +67,17 @@ class FdoNotificationDaemon {
stockIcon = 'dialog-error';
break;
}
return new Gio.ThemedIcon({ name: stockIcon });
return new Gio.ThemedIcon({name: stockIcon});
}
_iconForNotificationData(icon) {
if (icon) {
if (icon.substr(0, 7) == 'file://')
return new Gio.FileIcon({ file: Gio.File.new_for_uri(icon) });
return new Gio.FileIcon({file: Gio.File.new_for_uri(icon)});
else if (icon[0] == '/')
return new Gio.FileIcon({ file: Gio.File.new_for_path(icon) });
return new Gio.FileIcon({file: Gio.File.new_for_path(icon)});
else
return new Gio.ThemedIcon({ name: icon });
return new Gio.ThemedIcon({name: icon});
}
return null;
}
@ -139,7 +139,7 @@ class FdoNotificationDaemon {
hints[hint] = hints[hint].deepUnpack();
}
hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
hints = Params.parse(hints, {urgency: Urgency.NORMAL}, true);
// Filter out chat, presence, calls and invitation notifications from
// Empathy, since we handle that information from telepathyClient.js
@ -200,8 +200,8 @@ class FdoNotificationDaemon {
}
_notifyForSource(source, ndata) {
const { icon, summary, body, actions, hints } = ndata;
let { notification } = ndata;
const {icon, summary, body, actions, hints} = ndata;
let {notification} = ndata;
if (notification == null) {
notification = new MessageTray.Notification(source);
@ -524,7 +524,7 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
}
_onButtonClicked(button) {
let { action, target } = button;
let {action, target} = button;
this._activateAction(action.unpack(), target);
}

View File

@ -12,7 +12,7 @@ import * as Main from './main.js';
const OsdMonitorLabel = GObject.registerClass(
class OsdMonitorLabel extends St.Widget {
_init(monitor, label) {
super._init({ x_expand: true, y_expand: true });
super._init({x_expand: true, y_expand: true});
this._monitor = monitor;

View File

@ -25,7 +25,7 @@ class OsdWindow extends Clutter.Actor {
});
this._monitorIndex = monitorIndex;
let constraint = new Layout.MonitorConstraint({ index: monitorIndex });
let constraint = new Layout.MonitorConstraint({index: monitorIndex});
this.add_constraint(constraint);
this._hbox = new St.BoxLayout({
@ -33,7 +33,7 @@ class OsdWindow extends Clutter.Actor {
});
this.add_actor(this._hbox);
this._icon = new St.Icon({ y_expand: true });
this._icon = new St.Icon({y_expand: true});
this._hbox.add_child(this._icon);
this._vbox = new St.BoxLayout({

View File

@ -56,7 +56,7 @@ class ShellInfo {
notification.setForFeedback(forFeedback);
} else {
notification = this._source.notifications[0];
notification.update(text, null, { clear: true });
notification.update(text, null, {clear: true});
}
if (undoCallback)
@ -77,7 +77,7 @@ class OverviewActor extends St.BoxLayout {
vertical: true,
});
this.add_constraint(new LayoutManager.MonitorConstraint({ primary: true }));
this.add_constraint(new LayoutManager.MonitorConstraint({primary: true}));
this._controls = new OverviewControls.ControlsManager();
this.add_child(this._controls);
@ -239,7 +239,7 @@ export class Overview extends Signals.EventEmitter {
}
_sessionUpdated() {
const { hasOverview } = Main.sessionMode;
const {hasOverview} = Main.sessionMode;
if (!hasOverview)
this.hide();
@ -268,7 +268,7 @@ export class Overview extends Signals.EventEmitter {
Main.wm.addKeybinding(
'toggle-overview',
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.toggle.bind(this));
@ -276,7 +276,7 @@ export class Overview extends Signals.EventEmitter {
const swipeTracker = new SwipeTracker.SwipeTracker(global.stage,
Clutter.Orientation.VERTICAL,
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
{ allowDrag: false, allowScroll: false });
{allowDrag: false, allowScroll: false});
swipeTracker.orientation = Clutter.Orientation.VERTICAL;
swipeTracker.connect('begin', this._gestureBegin.bind(this));
swipeTracker.connect('update', this._gestureUpdate.bind(this));

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;

View File

@ -25,7 +25,7 @@ const LTR = 0;
const RTL = 1;
const PadChooser = GObject.registerClass({
Signals: { 'pad-selected': { param_types: [Clutter.InputDevice.$gtype] } },
Signals: {'pad-selected': {param_types: [Clutter.InputDevice.$gtype]}},
}, class PadChooser extends St.Button {
_init(device, groupDevices) {
super._init({
@ -94,7 +94,7 @@ const PadChooser = GObject.registerClass({
});
const KeybindingEntry = GObject.registerClass({
Signals: { 'keybinding-edited': { param_types: [GObject.TYPE_STRING] } },
Signals: {'keybinding-edited': {param_types: [GObject.TYPE_STRING]}},
}, class KeybindingEntry extends St.Entry {
_init() {
super._init({hint_text: _('New shortcut…'), style: 'width: 10em'});
@ -114,20 +114,20 @@ const KeybindingEntry = GObject.registerClass({
});
const ActionComboBox = GObject.registerClass({
Signals: { 'action-selected': { param_types: [GObject.TYPE_INT] } },
Signals: {'action-selected': {param_types: [GObject.TYPE_INT]}},
}, class ActionComboBox extends St.Button {
_init() {
super._init({ style_class: 'button' });
super._init({style_class: 'button'});
this.set_toggle_mode(true);
const boxLayout = new Clutter.BoxLayout({
orientation: Clutter.Orientation.HORIZONTAL,
spacing: 6,
});
let box = new St.Widget({ layout_manager: boxLayout });
let box = new St.Widget({layout_manager: boxLayout});
this.set_child(box);
this._label = new St.Label({ style_class: 'combo-box-label' });
this._label = new St.Label({style_class: 'combo-box-label'});
box.add_child(this._label);
const arrow = new St.Icon({
@ -203,7 +203,7 @@ const ActionComboBox = GObject.registerClass({
});
const ActionEditor = GObject.registerClass({
Signals: { 'done': {} },
Signals: {'done': {}},
}, class ActionEditor extends St.Widget {
_init() {
const boxLayout = new Clutter.BoxLayout({
@ -211,7 +211,7 @@ const ActionEditor = GObject.registerClass({
spacing: 12,
});
super._init({ layout_manager: boxLayout });
super._init({layout_manager: boxLayout});
this._actionComboBox = new ActionComboBox();
this._actionComboBox.connect('action-selected', this._onActionSelected.bind(this));
@ -447,12 +447,12 @@ const PadDiagram = GObject.registerClass({
this._updateDiagramScale();
for (let i = 0; i < this._labels.length; i++) {
const { label, x, y, arrangement } = this._labels[i];
const {label, x, y, arrangement} = this._labels[i];
this._allocateChild(label, x, y, arrangement);
}
if (this._editorActor && this._curEdited) {
const { x, y, arrangement } = this._curEdited;
const {x, y, arrangement} = this._curEdited;
this._allocateChild(this._editorActor, x, y, arrangement);
}
}
@ -567,14 +567,14 @@ const PadDiagram = GObject.registerClass({
return false;
let label = new St.Label();
this._labels.push({ label, action, idx, dir, x, y, arrangement });
this._labels.push({label, action, idx, dir, x, y, arrangement});
this.add_actor(label);
return true;
}
updateLabels(getText) {
for (let i = 0; i < this._labels.length; i++) {
const { label, action, idx, dir } = this._labels[i];
const {label, action, idx, dir} = this._labels[i];
let str = getText(action, idx, dir);
label.set_text(str);
}
@ -592,7 +592,7 @@ const PadDiagram = GObject.registerClass({
this._editorActor.hide();
if (this._curEdited) {
const { label, action, idx, dir } = this._curEdited;
const {label, action, idx, dir} = this._curEdited;
this._applyLabel(label, action, idx, dir, str);
this._curEdited = null;
}
@ -625,7 +625,7 @@ const PadDiagram = GObject.registerClass({
export const PadOsd = GObject.registerClass({
Signals: {
'pad-selected': { param_types: [Clutter.InputDevice.$gtype] },
'pad-selected': {param_types: [Clutter.InputDevice.$gtype]},
'closed': {},
},
}, class PadOsd extends St.BoxLayout {
@ -677,7 +677,7 @@ export const PadOsd = GObject.registerClass({
Main.uiGroup.add_actor(this);
this._monitorIndex = monitorIndex;
let constraint = new Layout.MonitorConstraint({ index: monitorIndex });
let constraint = new Layout.MonitorConstraint({index: monitorIndex});
this.add_constraint(constraint);
this._titleBox = new St.BoxLayout({
@ -702,7 +702,7 @@ export const PadOsd = GObject.registerClass({
this._titleLabel.clutter_text.set_text(padDevice.get_device_name());
labelBox.add_actor(this._titleLabel);
this._tipLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER });
this._tipLabel = new St.Label({x_align: Clutter.ActorAlign.CENTER});
labelBox.add_actor(this._tipLabel);
this._updatePadChooser();
@ -896,7 +896,7 @@ export const PadOsd = GObject.registerClass({
return;
this._endActionEdition();
this._editedAction = { type, number, dir, mode };
this._editedAction = {type, number, dir, mode};
const settingsPath = `${this._settings.path}${key}/`;
this._editedActionSettings = Gio.Settings.new_with_path('org.gnome.desktop.peripherals.tablet.pad-button',

View File

@ -11,7 +11,7 @@ const INDICATOR_INACTIVE_SCALE = 2 / 3;
const INDICATOR_INACTIVE_SCALE_PRESSED = 0.5;
export const PageIndicators = GObject.registerClass({
Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } },
Signals: {'page-activated': {param_types: [GObject.TYPE_INT]}},
}, class PageIndicators extends St.BoxLayout {
_init(orientation = Clutter.Orientation.VERTICAL) {
let vertical = orientation == Clutter.Orientation.VERTICAL;
@ -65,7 +65,7 @@ export const PageIndicators = GObject.registerClass({
});
indicator.child = new St.Widget({
style_class: 'page-indicator-icon',
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
});
indicator.connect('clicked', () => {
this.emit('page-activated', pageIndex);

View File

@ -68,13 +68,13 @@ const AppMenuButton = GObject.registerClass({
this._menuManager = panel.menuManager;
this._targetApp = null;
let bin = new St.Bin({ name: 'appMenu' });
let bin = new St.Bin({name: 'appMenu'});
this.add_actor(bin);
this.bind_property('reactive', this, 'can-focus', 0);
this.reactive = false;
this._container = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
this._container = new St.BoxLayout({style_class: 'panel-status-menu-box'});
bin.set_child(this._container);
let textureCache = St.TextureCache.get_default();
@ -478,11 +478,11 @@ class Panel extends St.Widget {
this.menuManager = new PopupMenu.PopupMenuManager(this);
this._leftBox = new St.BoxLayout({ name: 'panelLeft' });
this._leftBox = new St.BoxLayout({name: 'panelLeft'});
this.add_child(this._leftBox);
this._centerBox = new St.BoxLayout({ name: 'panelCenter' });
this._centerBox = new St.BoxLayout({name: 'panelCenter'});
this.add_child(this._centerBox);
this._rightBox = new St.BoxLayout({ name: 'panelRight' });
this._rightBox = new St.BoxLayout({name: 'panelRight'});
this.add_child(this._rightBox);
this.connect('button-press-event', this._onButtonPress.bind(this));
@ -497,7 +497,7 @@ class Panel extends St.Widget {
Main.layoutManager.panelBox.add(this);
Main.ctrlAltTabManager.addGroup(this, _('Top Bar'), 'focus-top-bar-symbolic',
{ sortGroup: CtrlAltTab.SortGroup.TOP });
{sortGroup: CtrlAltTab.SortGroup.TOP});
Main.sessionMode.connect('updated', this._updatePanel.bind(this));

View File

@ -22,7 +22,7 @@ class ButtonBox extends St.Widget {
this._delegate = this;
this.container = new St.Bin({ child: this });
this.container = new St.Bin({child: this});
this.connect('style-changed', this._onStyleChanged.bind(this));
this.connect('destroy', this._onDestroy.bind(this));
@ -95,7 +95,7 @@ class ButtonBox extends St.Widget {
});
export const Button = GObject.registerClass({
Signals: { 'menu-set': {} },
Signals: {'menu-set': {}},
}, class PanelMenuButton extends ButtonBox {
_init(menuAlignment, nameText, dontCreateMenu) {
super._init({
@ -216,7 +216,7 @@ class SystemIndicator extends St.BoxLayout {
get indicators() {
let klass = this.constructor.name;
let { stack } = new Error();
let {stack} = new Error();
log(`Usage of indicator.indicators is deprecated for ${klass}\n${stack}`);
return this;
}
@ -226,7 +226,7 @@ class SystemIndicator extends St.BoxLayout {
}
_addIndicator() {
let icon = new St.Icon({ style_class: 'system-status-icon' });
let icon = new St.Icon({style_class: 'system-status-icon'});
this.add_actor(icon);
icon.connect('notify::visible', this._syncIndicatorsVisible.bind(this));
this._syncIndicatorsVisible();

View File

@ -73,7 +73,7 @@ export const PopupBaseMenuItem = GObject.registerClass({
true),
},
Signals: {
'activate': { param_types: [Clutter.Event.$gtype] },
'activate': {param_types: [Clutter.Event.$gtype]},
},
}, class PopupBaseMenuItem extends St.BoxLayout {
_init(params) {
@ -291,7 +291,7 @@ class PopupSeparatorMenuItem extends PopupBaseMenuItem {
can_focus: false,
});
this.label = new St.Label({ text: text || '' });
this.label = new St.Label({text: text || ''});
this.add(this.label);
this.label_actor = this.label;
@ -354,7 +354,7 @@ export const Switch = GObject.registerClass({
});
export const PopupSwitchMenuItem = GObject.registerClass({
Signals: { 'toggled': { param_types: [GObject.TYPE_BOOLEAN] } },
Signals: {'toggled': {param_types: [GObject.TYPE_BOOLEAN]}},
}, class PopupSwitchMenuItem extends PopupBaseMenuItem {
_init(text, active, params) {
super._init(params);
@ -614,7 +614,7 @@ export class PopupMenuBase extends Signals.EventEmitter {
_connectItemSignals(menuItem) {
menuItem.connectObject(
'notify::active', () => {
const { active } = menuItem;
const {active} = menuItem;
if (active && this._activeMenuItem !== menuItem) {
if (this._activeMenuItem)
this._activeMenuItem.active = false;
@ -626,7 +626,7 @@ export class PopupMenuBase extends Signals.EventEmitter {
}
},
'notify::sensitive', () => {
const { sensitive } = menuItem;
const {sensitive} = menuItem;
if (!sensitive && this._activeMenuItem === menuItem) {
if (!this.actor.navigate_focus(menuItem.actor,
St.DirectionType.TAB_FORWARD, true))
@ -1168,7 +1168,7 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
this.add_style_class_name('popup-submenu-menu-item');
if (wantIcon) {
this.icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.icon = new St.Icon({style_class: 'popup-menu-icon'});
this.add_child(this.icon);
}
@ -1187,7 +1187,7 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
this.add_child(expander);
this._triangle = arrowIcon(St.Side.RIGHT);
this._triangle.pivot_point = new Graphene.Point({ x: 0.5, y: 0.6 });
this._triangle.pivot_point = new Graphene.Point({x: 0.5, y: 0.6});
this._triangleBin = new St.Widget({
y_expand: true,
@ -1270,7 +1270,7 @@ class PopupSubMenuMenuItem extends PopupBaseMenuItem {
export class PopupMenuManager {
constructor(owner, grabParams) {
this._grabParams = Params.parse(grabParams,
{ actionMode: Shell.ActionMode.POPUP });
{actionMode: Shell.ActionMode.POPUP});
global.stage.connect('notify::key-focus', () => {
if (!this.activeMenu)
return;

View File

@ -237,7 +237,7 @@ class RemoteSearchProvider {
}
if (gicon)
icon = new St.Icon({ gicon, icon_size: size });
icon = new St.Icon({gicon, icon_size: size});
return icon;
}

View File

@ -32,8 +32,8 @@ class RunDialog extends ModalDialog.ModalDialog {
destroyOnClose: false,
});
this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
this._terminalSettings = new Gio.Settings({ schema_id: TERMINAL_SCHEMA });
this._lockdownSettings = new Gio.Settings({schema_id: LOCKDOWN_SCHEMA});
this._terminalSettings = new Gio.Settings({schema_id: TERMINAL_SCHEMA});
global.settings.connect('changed::development-tools', () => {
this._enableInternalCommands = global.settings.get_boolean('development-tools');
});
@ -62,7 +62,7 @@ class RunDialog extends ModalDialog.ModalDialog {
let title = _('Run a Command');
let content = new Dialog.MessageDialogContent({ title });
let content = new Dialog.MessageDialogContent({title});
this.contentLayout.add_actor(content);
let entry = new St.Entry({

View File

@ -70,7 +70,7 @@ export class ScreenShield extends Signals.EventEmitter {
y_expand: true,
reactive: true,
can_focus: true,
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
name: 'lockDialogGroup',
});
@ -108,10 +108,10 @@ export class ScreenShield extends Signals.EventEmitter {
this._loginSession = null;
this._getLoginSession();
this._settings = new Gio.Settings({ schema_id: SCREENSAVER_SCHEMA });
this._settings = new Gio.Settings({schema_id: SCREENSAVER_SCHEMA});
this._settings.connect(`changed::${LOCK_ENABLED_KEY}`, this._syncInhibitor.bind(this));
this._lockSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
this._lockSettings = new Gio.Settings({schema_id: LOCKDOWN_SCHEMA});
this._lockSettings.connect(`changed::${DISABLE_LOCK_KEY}`, this._syncInhibitor.bind(this));
this._isModal = false;
@ -202,7 +202,7 @@ export class ScreenShield extends Signals.EventEmitter {
if (this._isModal)
return true;
let grab = Main.pushModal(Main.uiGroup, { actionMode: Shell.ActionMode.LOCK_SCREEN });
let grab = Main.pushModal(Main.uiGroup, {actionMode: Shell.ActionMode.LOCK_SCREEN});
// We expect at least a keyboard grab here
this._isModal = (grab.get_seat_state() & Clutter.GrabState.KEYBOARD) !== 0;
@ -478,12 +478,12 @@ export class ScreenShield extends Signals.EventEmitter {
duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
this._lockScreenShown({ fadeToBlack, animateFade: true });
this._lockScreenShown({fadeToBlack, animateFade: true});
},
});
} else {
this._lockDialogGroup.translation_y = 0;
this._lockScreenShown({ fadeToBlack, animateFade: false });
this._lockScreenShown({fadeToBlack, animateFade: false});
}
this._dialog.grab_key_focus();

View File

@ -124,7 +124,7 @@ class UIAreaIndicator extends St.Widget {
_init(params) {
super._init(params);
this._topRect = new St.Widget({ style_class: 'screenshot-ui-area-indicator-shade' });
this._topRect = new St.Widget({style_class: 'screenshot-ui-area-indicator-shade'});
this._topRect.add_constraint(new Clutter.BindConstraint({
source: this,
coordinate: Clutter.BindCoordinate.WIDTH,
@ -141,7 +141,7 @@ class UIAreaIndicator extends St.Widget {
}));
this.add_child(this._topRect);
this._bottomRect = new St.Widget({ style_class: 'screenshot-ui-area-indicator-shade' });
this._bottomRect = new St.Widget({style_class: 'screenshot-ui-area-indicator-shade'});
this._bottomRect.add_constraint(new Clutter.BindConstraint({
source: this,
coordinate: Clutter.BindCoordinate.WIDTH,
@ -158,7 +158,7 @@ class UIAreaIndicator extends St.Widget {
}));
this.add_child(this._bottomRect);
this._leftRect = new St.Widget({ style_class: 'screenshot-ui-area-indicator-shade' });
this._leftRect = new St.Widget({style_class: 'screenshot-ui-area-indicator-shade'});
this._leftRect.add_constraint(new Clutter.SnapConstraint({
source: this,
from_edge: Clutter.SnapEdge.LEFT,
@ -176,7 +176,7 @@ class UIAreaIndicator extends St.Widget {
}));
this.add_child(this._leftRect);
this._rightRect = new St.Widget({ style_class: 'screenshot-ui-area-indicator-shade' });
this._rightRect = new St.Widget({style_class: 'screenshot-ui-area-indicator-shade'});
this._rightRect.add_constraint(new Clutter.SnapConstraint({
source: this,
from_edge: Clutter.SnapEdge.RIGHT,
@ -194,7 +194,7 @@ class UIAreaIndicator extends St.Widget {
}));
this.add_child(this._rightRect);
this._selectionRect = new St.Widget({ style_class: 'screenshot-ui-area-indicator-selection' });
this._selectionRect = new St.Widget({style_class: 'screenshot-ui-area-indicator-selection'});
this.add_child(this._selectionRect);
this._topRect.add_constraint(new Clutter.SnapConstraint({
@ -229,7 +229,7 @@ class UIAreaIndicator extends St.Widget {
});
const UIAreaSelector = GObject.registerClass({
Signals: { 'drag-started': {}, 'drag-ended': {} },
Signals: {'drag-started': {}, 'drag-ended': {}},
}, class UIAreaSelector extends St.Widget {
_init(params) {
super._init(params);
@ -247,13 +247,13 @@ const UIAreaSelector = GObject.registerClass({
}));
this.add_child(this._areaIndicator);
this._topLeftHandle = new St.Widget({ style_class: 'screenshot-ui-area-selector-handle' });
this._topLeftHandle = new St.Widget({style_class: 'screenshot-ui-area-selector-handle'});
this.add_child(this._topLeftHandle);
this._topRightHandle = new St.Widget({ style_class: 'screenshot-ui-area-selector-handle' });
this._topRightHandle = new St.Widget({style_class: 'screenshot-ui-area-selector-handle'});
this.add_child(this._topRightHandle);
this._bottomLeftHandle = new St.Widget({ style_class: 'screenshot-ui-area-selector-handle' });
this._bottomLeftHandle = new St.Widget({style_class: 'screenshot-ui-area-selector-handle'});
this.add_child(this._bottomLeftHandle);
this._bottomRightHandle = new St.Widget({ style_class: 'screenshot-ui-area-selector-handle' });
this._bottomRightHandle = new St.Widget({style_class: 'screenshot-ui-area-selector-handle'});
this.add_child(this._bottomRightHandle);
// This will be updated before the first drawn frame.
@ -784,7 +784,7 @@ class UIWindowSelectorWindow extends St.Button {
});
this.add_child(this._actor);
this._border = new St.Bin({ style_class: 'screenshot-ui-window-selector-window-border' });
this._border = new St.Bin({style_class: 'screenshot-ui-window-selector-window-border'});
this._border.connect('style-changed', () => {
this._borderSize =
this._border.get_theme_node().get_border_width(St.Side.TOP);
@ -799,7 +799,7 @@ class UIWindowSelectorWindow extends St.Button {
});
this._cursor = null;
this._cursorPoint = { x: 0, y: 0 };
this._cursorPoint = {x: 0, y: 0};
this._shouldShowCursor = window.has_pointer && window.has_pointer();
this.connect('destroy', this._onDestroy.bind(this));
@ -1063,11 +1063,11 @@ export const ScreenshotUI = GObject.registerClass({
this._screencastFailed();
});
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
this._lockdownSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.lockdown'});
// The full-screen screenshot has a separate container so that we can
// show it without the screenshot UI fade-in for a nicer animation.
this._stageScreenshotContainer = new St.Widget({ visible: false });
this._stageScreenshotContainer = new St.Widget({visible: false});
this._stageScreenshotContainer.add_constraint(new Clutter.BindConstraint({
source: global.stage,
coordinate: Clutter.BindCoordinate.ALL,
@ -1094,7 +1094,7 @@ export const ScreenshotUI = GObject.registerClass({
Main.layoutManager.screenshotUIGroup.add_child(this);
this._stageScreenshot = new St.Widget({ style_class: 'screenshot-ui-screen-screenshot' });
this._stageScreenshot = new St.Widget({style_class: 'screenshot-ui-screen-screenshot'});
this._stageScreenshot.add_constraint(new Clutter.BindConstraint({
source: global.stage,
coordinate: Clutter.BindCoordinate.ALL,
@ -1117,9 +1117,9 @@ export const ScreenshotUI = GObject.registerClass({
});
this.add_child(this._areaSelector);
this._primaryMonitorBin = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this._primaryMonitorBin = new St.Widget({layout_manager: new Clutter.BinLayout()});
this._primaryMonitorBin.add_constraint(
new Layout.MonitorConstraint({ 'primary': true }));
new Layout.MonitorConstraint({'primary': true}));
this.add_child(this._primaryMonitorBin);
this._panel = new St.BoxLayout({
@ -1142,13 +1142,13 @@ export const ScreenshotUI = GObject.registerClass({
this._closeButton.add_constraint(new Clutter.AlignConstraint({
source: this._panel,
align_axis: Clutter.AlignAxis.Y_AXIS,
pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
pivot_point: new Graphene.Point({x: -1, y: 0.5}),
factor: 0,
}));
this._closeButtonXAlignConstraint = new Clutter.AlignConstraint({
source: this._panel,
align_axis: Clutter.AlignAxis.X_AXIS,
pivot_point: new Graphene.Point({ x: 0.5, y: -1 }),
pivot_point: new Graphene.Point({x: 0.5, y: -1}),
});
this._closeButton.add_constraint(this._closeButtonXAlignConstraint);
this._closeButton.connect('clicked', () => this.close());
@ -1233,7 +1233,7 @@ export const ScreenshotUI = GObject.registerClass({
visible: false,
}));
this._bottomRowContainer = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this._bottomRowContainer = new St.Widget({layout_manager: new Clutter.BinLayout()});
this._panel.add_child(this._bottomRowContainer);
this._shotCastContainer = new St.BoxLayout({
@ -1340,7 +1340,7 @@ export const ScreenshotUI = GObject.registerClass({
Main.wm.addKeybinding(
'show-screenshot-ui',
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
new Gio.Settings({schema_id: 'org.gnome.shell.keybindings'}),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
uiModes,
showScreenshotUI
@ -1348,7 +1348,7 @@ export const ScreenshotUI = GObject.registerClass({
Main.wm.addKeybinding(
'show-screen-recording-ui',
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
new Gio.Settings({schema_id: 'org.gnome.shell.keybindings'}),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
restrictedModes,
showScreenRecordingUI
@ -1356,7 +1356,7 @@ export const ScreenshotUI = GObject.registerClass({
Main.wm.addKeybinding(
'screenshot-window',
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
new Gio.Settings({schema_id: 'org.gnome.shell.keybindings'}),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT | Meta.KeyBindingFlags.PER_WINDOW,
restrictedModes,
async (_display, window, _binding) => {
@ -1374,7 +1374,7 @@ export const ScreenshotUI = GObject.registerClass({
Main.wm.addKeybinding(
'screenshot',
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
new Gio.Settings({schema_id: 'org.gnome.shell.keybindings'}),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
uiModes,
async () => {
@ -1427,7 +1427,7 @@ export const ScreenshotUI = GObject.registerClass({
const bin = new St.Widget({
layout_manager: new Clutter.BinLayout(),
});
bin.add_constraint(new Layout.MonitorConstraint({ 'index': i }));
bin.add_constraint(new Layout.MonitorConstraint({'index': i}));
this.insert_child_below(bin, this._primaryMonitorBin);
this._monitorBins.push(bin);
@ -1563,7 +1563,7 @@ export const ScreenshotUI = GObject.registerClass({
// pop their grabs.
Main.layoutManager.emit('system-modal-opened');
const { screenshotUIGroup } = Main.layoutManager;
const {screenshotUIGroup} = Main.layoutManager;
screenshotUIGroup.get_parent().set_child_above_sibling(
screenshotUIGroup, null);
@ -2130,7 +2130,7 @@ function _storeScreenshot(bytes, pixbuf) {
}
const lockdownSettings =
new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
new Gio.Settings({schema_id: 'org.gnome.desktop.lockdown'});
const disableSaveToDisk =
lockdownSettings.get_boolean('disable-save-to-disk');
@ -2200,7 +2200,7 @@ function _storeScreenshot(bytes, pixbuf) {
_('Screenshot captured'),
// Translators: notification body when a screenshot was captured.
_('You can paste the image from the clipboard.'),
{ datetime: time, gicon: content }
{datetime: time, gicon: content}
);
if (!disableSaveToDisk) {
@ -2249,7 +2249,7 @@ async function captureScreenshot(texture, geometry, scale, cursor) {
const stream = Gio.MemoryOutputStream.new_resizable();
const [x, y, w, h] = geometry ?? [0, 0, -1, -1];
if (cursor === null)
cursor = { texture: null, x: 0, y: 0, scale: 1 };
cursor = {texture: null, x: 0, y: 0, scale: 1};
global.display.get_sound_player().play_from_theme(
'screen-capture', _('Screenshot taken'), null);
@ -2297,7 +2297,7 @@ export class ScreenshotService {
'org.gnome.Screenshot',
]);
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
this._lockdownSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.lockdown'});
Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
}
@ -2570,7 +2570,7 @@ export class ScreenshotService {
'Invalid params');
return;
}
let flashspot = new Flashspot({ x, y, width, height });
let flashspot = new Flashspot({x, y, width, height});
flashspot.fire();
invocation.return_value(null);
}
@ -2583,7 +2583,7 @@ export class ScreenshotService {
const pickPixel = new PickPixel(screenshot);
try {
const color = await pickPixel.pickAsync();
const { red, green, blue } = color;
const {red, green, blue} = color;
const retval = GLib.Variant.new('(a{sv})', [{
color: GLib.Variant.new('(ddd)', [
red / 255.0,
@ -2640,7 +2640,7 @@ class SelectArea extends St.Widget {
this.show();
try {
await this._grabHelper.grabAsync({ actor: this });
await this._grabHelper.grabAsync({actor: this});
} finally {
global.display.set_cursor(Meta.Cursor.DEFAULT);
@ -2837,7 +2837,7 @@ const RecolorEffect = GObject.registerClass({
export const PickPixel = GObject.registerClass(
class PickPixel extends St.Widget {
_init(screenshot) {
super._init({ visible: false, reactive: true });
super._init({visible: false, reactive: true});
this._screenshot = screenshot;
@ -2889,7 +2889,7 @@ class PickPixel extends St.Widget {
this._pickColor(...global.get_pointer());
try {
await this._grabHelper.grabAsync({ actor: this });
await this._grabHelper.grabAsync({actor: this});
} finally {
global.display.set_cursor(Meta.Cursor.DEFAULT);
this._previewCursor.destroy();
@ -2941,7 +2941,7 @@ class Flashspot extends Lightbox.Lightbox {
}
fire(doneCallback) {
this.set({ visible: true, opacity: 255 });
this.set({visible: true, opacity: 255});
this.ease({
opacity: 0,
duration: FLASHSPOT_ANIMATION_OUT_TIME,

View File

@ -136,7 +136,7 @@ class GridSearchResult extends SearchResult {
this.style_class = 'grid-search-result';
this.icon = new IconGrid.BaseIcon(this.metaInfo['name'],
{ createIcon: this.metaInfo['createIcon'] });
{createIcon: this.metaInfo['createIcon']});
let content = new St.Bin({
child: this.icon,
x_align: Clutter.ActorAlign.START,
@ -158,7 +158,7 @@ const SearchResultsBase = GObject.registerClass({
},
}, class SearchResultsBase extends St.BoxLayout {
_init(provider, resultsView) {
super._init({ style_class: 'search-section', vertical: true });
super._init({style_class: 'search-section', vertical: true});
this.provider = provider;
this._resultsView = resultsView;
@ -169,7 +169,7 @@ const SearchResultsBase = GObject.registerClass({
this._resultDisplayBin = new St.Bin();
this.add_child(this._resultDisplayBin);
let separator = new St.Widget({ style_class: 'search-section-separator' });
let separator = new St.Widget({style_class: 'search-section-separator'});
this.add(separator);
this._resultDisplays = {};
@ -285,7 +285,7 @@ class ListSearchResults extends SearchResultsBase {
_init(provider, resultsView) {
super._init(provider, resultsView);
this._container = new St.BoxLayout({ style_class: 'search-section-content' });
this._container = new St.BoxLayout({style_class: 'search-section-content'});
this.providerInfo = new ProviderInfo(provider);
this.providerInfo.connect('key-focus-in', this._keyFocusIn.bind(this));
this.providerInfo.connect('clicked', () => {
@ -459,7 +459,7 @@ class GridSearchResults extends SearchResultsBase {
_init(provider, resultsView) {
super._init(provider, resultsView);
this._grid = new St.Widget({ style_class: 'grid-search-results' });
this._grid = new St.Widget({style_class: 'grid-search-results'});
this._grid.layout_manager = new GridSearchResultsLayout();
this._grid.connect('style-changed', () => {
@ -567,7 +567,7 @@ export const SearchResultsView = GObject.registerClass({
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
this._scrollView.add_actor(this._content);
let action = new Clutter.PanAction({ interpolate: true });
let action = new Clutter.PanAction({interpolate: true});
action.connect('pan', this._onPan.bind(this));
this._scrollView.add_action(action);
@ -578,7 +578,7 @@ export const SearchResultsView = GObject.registerClass({
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
});
this._statusBin = new St.Bin({ y_expand: true });
this._statusBin = new St.Bin({y_expand: true});
this.add_child(this._statusBin);
this._statusBin.add_actor(this._statusText);
@ -593,7 +593,7 @@ export const SearchResultsView = GObject.registerClass({
this._highlighter = new Highlighter();
this._searchSettings = new Gio.Settings({ schema_id: SEARCH_PROVIDERS_SCHEMA });
this._searchSettings = new Gio.Settings({schema_id: SEARCH_PROVIDERS_SCHEMA});
this._searchSettings.connect('changed::disabled', this._reloadRemoteProviders.bind(this));
this._searchSettings.connect('changed::enabled', this._reloadRemoteProviders.bind(this));
this._searchSettings.connect('changed::disable-external', this._reloadRemoteProviders.bind(this));
@ -925,7 +925,7 @@ class ProviderInfo extends St.Button {
x_align: Clutter.ActorAlign.START,
});
this._moreLabel = new St.Label({ x_align: Clutter.ActorAlign.START });
this._moreLabel = new St.Label({x_align: Clutter.ActorAlign.START});
detailsBox.add_actor(nameLabel);
detailsBox.add_actor(this._moreLabel);

View File

@ -91,7 +91,7 @@ export const SearchController = GObject.registerClass({
// Since the entry isn't inside the results container we install this
// dummy widget as the last results container child so that we can
// include the entry in the keynav tab path
this._focusTrap = new FocusTrap({ can_focus: true });
this._focusTrap = new FocusTrap({can_focus: true});
this._focusTrap.connect('key-focus-in', () => {
this._entry.grab_key_focus();
});

View File

@ -138,11 +138,11 @@ export function addContextMenu(entry, params) {
if (entry.menu)
return;
params = Params.parse(params, { actionMode: Shell.ActionMode.POPUP });
params = Params.parse(params, {actionMode: Shell.ActionMode.POPUP});
entry.menu = new EntryMenu(entry);
entry._menuManager = new PopupMenu.PopupMenuManager(entry,
{ actionMode: params.actionMode });
{actionMode: params.actionMode});
entry._menuManager.addMenu(entry.menu);
// Add an event handler to both the entry and its clutter_text; the former
@ -167,7 +167,7 @@ export function addContextMenu(entry, params) {
export const CapsLockWarning = GObject.registerClass(
class CapsLockWarning extends St.Label {
_init(params) {
let defaultParams = { style_class: 'caps-lock-warning-label' };
let defaultParams = {style_class: 'caps-lock-warning-label'};
super._init(Object.assign(defaultParams, params));
this.text = _('Caps lock is on.');
@ -195,7 +195,7 @@ class CapsLockWarning extends St.Label {
this.remove_all_transitions();
const { naturalHeightSet } = this;
const {naturalHeightSet} = this;
this.natural_height_set = false;
let [, height] = this.get_preferred_height(-1);
this.natural_height_set = naturalHeightSet;

View File

@ -56,7 +56,7 @@ function _setLabelsForMessage(content, message) {
export class ShellMountOperation {
constructor(source, params) {
params = Params.parse(params, { existingDialog: null });
params = Params.parse(params, {existingDialog: null});
this._dialog = null;
this._existingDialog = params.existingDialog;
@ -226,10 +226,10 @@ class ShellUnmountNotifier extends MessageTray.Source {
});
const ShellMountQuestionDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_INT] } },
Signals: {'response': {param_types: [GObject.TYPE_INT]}},
}, class ShellMountQuestionDialog extends ModalDialog.ModalDialog {
_init() {
super._init({ styleClass: 'mount-question-dialog' });
super._init({styleClass: 'mount-question-dialog'});
this._oldChoices = [];
@ -271,13 +271,13 @@ const ShellMountPasswordDialog = GObject.registerClass({
let strings = message.split('\n');
let title = strings.shift() || null;
let description = strings.shift() || null;
super._init({ styleClass: 'prompt-dialog' });
super._init({styleClass: 'prompt-dialog'});
let disksApp = Shell.AppSystem.get_default().lookup_app('org.gnome.DiskUtility.desktop');
let content = new Dialog.MessageDialogContent({ title, description });
let content = new Dialog.MessageDialogContent({title, description});
let passwordGridLayout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
let passwordGridLayout = new Clutter.GridLayout({orientation: Clutter.Orientation.VERTICAL});
let passwordGrid = new St.Widget({
style_class: 'prompt-dialog-password-grid',
layout_manager: passwordGridLayout,
@ -355,7 +355,7 @@ const ShellMountPasswordDialog = GObject.registerClass({
}
curGridRow += 1;
let warningBox = new St.BoxLayout({ vertical: true });
let warningBox = new St.BoxLayout({vertical: true});
let capsLockWarning = new ShellEntry.CapsLockWarning();
warningBox.add_child(capsLockWarning);
@ -475,10 +475,10 @@ const ShellMountPasswordDialog = GObject.registerClass({
});
const ShellProcessesDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_INT] } },
Signals: {'response': {param_types: [GObject.TYPE_INT]}},
}, class ShellProcessesDialog extends ModalDialog.ModalDialog {
_init() {
super._init({ styleClass: 'processes-dialog' });
super._init({styleClass: 'processes-dialog'});
this._oldChoices = [];

View File

@ -40,7 +40,7 @@ class ATIndicator extends PanelMenu.Button {
icon_name: 'org.gnome.Settings-accessibility-symbolic',
}));
this._a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
this._a11ySettings = new Gio.Settings({schema_id: A11Y_SCHEMA});
this._a11ySettings.connect(`changed::${KEY_ALWAYS_SHOW}`, this._queueSyncMenuVisibility.bind(this));
let highContrast = this._buildItem(_('High Contrast'), A11Y_INTERFACE_SCHEMA, KEY_HIGH_CONTRAST);
@ -115,7 +115,7 @@ class ATIndicator extends PanelMenu.Button {
}
_buildItem(string, schema, key) {
let settings = new Gio.Settings({ schema_id: schema });
let settings = new Gio.Settings({schema_id: schema});
let widget = this._buildItemExtended(string,
settings.get_boolean(key),
settings.is_writable(key),
@ -131,7 +131,7 @@ class ATIndicator extends PanelMenu.Button {
}
_buildFontItem() {
let settings = new Gio.Settings({ schema_id: DESKTOP_INTERFACE_SCHEMA });
let settings = new Gio.Settings({schema_id: DESKTOP_INTERFACE_SCHEMA});
let factor = settings.get_double(KEY_TEXT_SCALING_FACTOR);
let initialSetting = factor > 1.0;
let widget = this._buildItemExtended(_('Large Text'),

View File

@ -44,7 +44,7 @@ class DwellClickIndicator extends PanelMenu.Button {
});
this.add_child(this._icon);
this._a11ySettings = new Gio.Settings({ schema_id: MOUSE_A11Y_SCHEMA });
this._a11ySettings = new Gio.Settings({schema_id: MOUSE_A11Y_SCHEMA});
this._a11ySettings.connect(`changed::${KEY_DWELL_CLICK_ENABLED}`, this._syncMenuVisibility.bind(this));
this._a11ySettings.connect(`changed::${KEY_DWELL_MODE}`, this._syncMenuVisibility.bind(this));

View File

@ -33,7 +33,7 @@ class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
text: displayName,
x_expand: true,
});
this.indicator = new St.Label({ text: shortName });
this.indicator = new St.Label({text: shortName});
this.add_child(this.label);
this.add(this.indicator);
this.label_actor = this.label;
@ -123,9 +123,9 @@ class InputSourceSwitcher extends SwitcherPopup.SwitcherList {
}
_addIcon(item) {
let box = new St.BoxLayout({ vertical: true });
let box = new St.BoxLayout({vertical: true});
let bin = new St.Bin({ style_class: 'input-source-switcher-symbol' });
let bin = new St.Bin({style_class: 'input-source-switcher-symbol'});
let symbol = new St.Label({
text: item.shortName,
x_align: Clutter.ActorAlign.CENTER,
@ -250,7 +250,7 @@ class InputSourceSystemSettings extends InputSourceSettings {
let id = layouts[i];
if (variants[i])
id += `+${variants[i]}`;
sourcesList.push({ type: INPUT_SOURCE_TYPE_XKB, id });
sourcesList.push({type: INPUT_SOURCE_TYPE_XKB, id});
}
return sourcesList;
}
@ -270,7 +270,7 @@ class InputSourceSessionSettings extends InputSourceSettings {
this._KEY_KEYBOARD_OPTIONS = 'xkb-options';
this._KEY_PER_WINDOW = 'per-window';
this._settings = new Gio.Settings({ schema_id: this._DESKTOP_INPUT_SOURCES_SCHEMA });
this._settings = new Gio.Settings({schema_id: this._DESKTOP_INPUT_SOURCES_SCHEMA});
this._settings.connect(`changed::${this._KEY_INPUT_SOURCES}`, this._emitInputSourcesChanged.bind(this));
this._settings.connect(`changed::${this._KEY_KEYBOARD_OPTIONS}`, this._emitKeyboardOptionsChanged.bind(this));
this._settings.connect(`changed::${this._KEY_PER_WINDOW}`, this._emitPerWindowChanged.bind(this));
@ -283,7 +283,7 @@ class InputSourceSessionSettings extends InputSourceSettings {
for (let i = 0; i < nSources; i++) {
let [type, id] = sources.get_child_value(i).deepUnpack();
sourcesList.push({ type, id });
sourcesList.push({type, id});
}
return sourcesList;
}
@ -330,13 +330,13 @@ export class InputSourceManager extends Signals.EventEmitter {
this._mruSourcesBackup = null;
this._keybindingAction =
Main.wm.addKeybinding('switch-input-source',
new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.keybindings' }),
new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
Meta.KeyBindingFlags.NONE,
Shell.ActionMode.ALL,
this._switchInputSource.bind(this));
this._keybindingActionBackward =
Main.wm.addKeybinding('switch-input-source-backward',
new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.keybindings' }),
new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
Meta.KeyBindingFlags.IS_REVERSED,
Shell.ActionMode.ALL,
this._switchInputSource.bind(this));
@ -588,14 +588,14 @@ export class InputSourceManager extends Signals.EventEmitter {
}
if (exists)
infosList.push({ type, id, displayName, shortName });
infosList.push({type, id, displayName, shortName});
}
if (infosList.length == 0) {
let type = INPUT_SOURCE_TYPE_XKB;
let id = KeyboardManager.DEFAULT_LAYOUT;
let [, displayName, shortName] = this._xkbInfo.get_layout_info(id);
infosList.push({ type, id, displayName, shortName });
infosList.push({type, id, displayName, shortName});
}
let inputSourcesByShortName = {};
@ -857,7 +857,7 @@ class InputSourceIndicator extends PanelMenu.Button {
this._menuItems = {};
this._indicatorLabels = {};
this._container = new InputSourceIndicatorContainer({ style_class: 'system-status-icon' });
this._container = new InputSourceIndicatorContainer({style_class: 'system-status-icon'});
this.add_child(this._container);
this._propSeparator = new PopupMenu.PopupSeparatorMenuItem();

View File

@ -75,7 +75,7 @@ const GeoclueAgent = GObject.registerClass({
_init() {
super._init();
this._settings = new Gio.Settings({ schema_id: LOCATION_SCHEMA });
this._settings = new Gio.Settings({schema_id: LOCATION_SCHEMA});
this._settings.connectObject(
`changed::${ENABLED}`, () => this.notify('enabled'),
`changed::${MAX_ACCURACY_LEVEL}`, () => this._onMaxAccuracyLevelChanged(),
@ -329,10 +329,10 @@ class AppAuthorizer {
}
export const GeolocationDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_UINT] } },
Signals: {'response': {param_types: [GObject.TYPE_UINT]}},
}, class GeolocationDialog extends ModalDialog.ModalDialog {
_init(name, reason, reqAccuracyLevel) {
super._init({ styleClass: 'geolocation-dialog' });
super._init({styleClass: 'geolocation-dialog'});
this.reqAccuracyLevel = reqAccuracyLevel;
let content = new Dialog.MessageDialogContent({

View File

@ -66,7 +66,7 @@ class RemoteAccessApplet extends SystemIndicator {
});
export const ScreenRecordingIndicator = GObject.registerClass({
Signals: { 'menu-set': {} },
Signals: {'menu-set': {}},
}, class ScreenRecordingIndicator extends PanelMenu.ButtonBox {
_init() {
super._init({

View File

@ -25,7 +25,7 @@ export function getMixerControl() {
if (_mixerControl)
return _mixerControl;
_mixerControl = new Gvc.MixerControl({ name: 'GNOME Shell Volume Control' });
_mixerControl = new Gvc.MixerControl({name: 'GNOME Shell Volume Control'});
_mixerControl.open();
return _mixerControl;

View File

@ -68,7 +68,7 @@ const EventHistory = class {
append(time, delta) {
this.trim(time);
this._data.push({ time, delta });
this._data.push({time, delta});
}
calculateVelocity() {
@ -100,9 +100,9 @@ const TouchpadSwipeGesture = GObject.registerClass({
Clutter.Orientation, Clutter.Orientation.HORIZONTAL),
},
Signals: {
'begin': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'update': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'end': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE] },
'begin': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE]},
'update': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE]},
'end': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE]},
},
}, class TouchpadSwipeGesture extends GObject.Object {
_init(allowedModes) {
@ -222,10 +222,10 @@ const TouchSwipeGesture = GObject.registerClass({
Clutter.Orientation, Clutter.Orientation.HORIZONTAL),
},
Signals: {
'begin': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'update': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'end': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE] },
'cancel': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE] },
'begin': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE]},
'update': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE]},
'end': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE]},
'cancel': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE]},
},
}, class TouchSwipeGesture extends Clutter.GestureAction {
_init(allowedModes, nTouchPoints, thresholdTriggerEdge) {
@ -317,9 +317,9 @@ const ScrollGesture = GObject.registerClass({
Clutter.ModifierType, 0),
},
Signals: {
'begin': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'update': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'end': { param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE] },
'begin': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE]},
'update': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE]},
'end': {param_types: [GObject.TYPE_UINT, GObject.TYPE_DOUBLE]},
},
}, class ScrollGesture extends GObject.Object {
_init(actor, allowedModes) {
@ -453,14 +453,14 @@ export const SwipeTracker = GObject.registerClass({
Clutter.ModifierType, 0),
},
Signals: {
'begin': { param_types: [GObject.TYPE_UINT] },
'update': { param_types: [GObject.TYPE_DOUBLE] },
'end': { param_types: [GObject.TYPE_UINT64, GObject.TYPE_DOUBLE] },
'begin': {param_types: [GObject.TYPE_UINT]},
'update': {param_types: [GObject.TYPE_DOUBLE]},
'end': {param_types: [GObject.TYPE_UINT64, GObject.TYPE_DOUBLE]},
},
}, class SwipeTracker extends GObject.Object {
_init(actor, orientation, allowedModes, params) {
super._init();
params = Params.parse(params, { allowDrag: true, allowScroll: true });
params = Params.parse(params, {allowDrag: true, allowScroll: true});
this.orientation = orientation;
this._allowedModes = allowedModes;
@ -595,7 +595,7 @@ export const SwipeTracker = GObject.registerClass({
this._history.append(time, 0);
let rect = new Meta.Rectangle({ x, y, width: 1, height: 1 });
let rect = new Meta.Rectangle({x, y, width: 1, height: 1});
let monitor = global.display.get_monitor_index_for_rect(rect);
this.emit('begin', monitor);

View File

@ -384,13 +384,13 @@ class SwitcherButton extends St.Button {
export const SwitcherList = GObject.registerClass({
Signals: {
'item-activated': { param_types: [GObject.TYPE_INT] },
'item-entered': { param_types: [GObject.TYPE_INT] },
'item-removed': { param_types: [GObject.TYPE_INT] },
'item-activated': {param_types: [GObject.TYPE_INT]},
'item-entered': {param_types: [GObject.TYPE_INT]},
'item-removed': {param_types: [GObject.TYPE_INT]},
},
}, class SwitcherList extends St.Widget {
_init(squareItems) {
super._init({ style_class: 'switcher-list' });
super._init({style_class: 'switcher-list'});
this._list = new St.BoxLayout({
style_class: 'switcher-list-item-container',

View File

@ -35,7 +35,7 @@ const BLUR_SIGMA = 45;
const SUMMARY_ICON_SIZE = 32;
const NotificationsBox = GObject.registerClass({
Signals: { 'wake-up-screen': {} },
Signals: {'wake-up-screen': {}},
}, class NotificationsBox extends St.BoxLayout {
_init() {
super._init({
@ -43,7 +43,7 @@ const NotificationsBox = GObject.registerClass({
name: 'unlockDialogNotifications',
});
this._scrollView = new St.ScrollView({ hscrollbar_policy: St.PolicyType.NEVER });
this._scrollView = new St.ScrollView({hscrollbar_policy: St.PolicyType.NEVER});
this._notificationBox = new St.BoxLayout({
vertical: true,
style_class: 'unlock-dialog-notifications-container',
@ -114,10 +114,10 @@ const NotificationsBox = GObject.registerClass({
_makeNotificationDetailedSource(source, box) {
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
let sourceBin = new St.Bin({ child: sourceActor });
let sourceBin = new St.Bin({child: sourceActor});
box.add(sourceBin);
let textBox = new St.BoxLayout({ vertical: true });
let textBox = new St.BoxLayout({vertical: true});
box.add_child(textBox);
let title = new St.Label({
@ -141,7 +141,7 @@ const NotificationsBox = GObject.registerClass({
: GLib.markup_escape_text(bodyText, -1);
}
let label = new St.Label({ style_class: 'unlock-dialog-notification-count-text' });
let label = new St.Label({style_class: 'unlock-dialog-notification-count-text'});
label.clutter_text.set_markup(`<b>${n.title}</b> ${body}`);
textBox.add(label);
@ -314,7 +314,7 @@ const NotificationsBox = GObject.registerClass({
const Clock = GObject.registerClass(
class UnlockDialogClock extends St.BoxLayout {
_init() {
super._init({ style_class: 'unlock-dialog-clock', vertical: true });
super._init({style_class: 'unlock-dialog-clock', vertical: true});
this._time = new St.Label({
style_class: 'unlock-dialog-clock-time',
@ -334,7 +334,7 @@ class UnlockDialogClock extends St.BoxLayout {
this.add_child(this._date);
this.add_child(this._hint);
this._wallClock = new GnomeDesktop.WallClock({ time_only: true });
this._wallClock = new GnomeDesktop.WallClock({time_only: true});
this._wallClock.connect('notify::clock', this._updateClock.bind(this));
this._seat = Clutter.get_default_backend().get_default_seat();
@ -543,7 +543,7 @@ export const UnlockDialog = GObject.registerClass({
// Authentication & Clock stack
this._stack = new Shell.Stack();
this._promptBox = new St.BoxLayout({ vertical: true });
this._promptBox = new St.BoxLayout({vertical: true});
this._promptBox.set_pivot_point(0.5, 0.5);
this._promptBox.hide();
this._stack.add_child(this._promptBox);
@ -575,12 +575,12 @@ export const UnlockDialog = GObject.registerClass({
this._otherUserButton.set_pivot_point(0.5, 0.5);
this._otherUserButton.connect('clicked', this._otherUserClicked.bind(this));
this._screenSaverSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.screensaver' });
this._screenSaverSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.screensaver'});
this._screenSaverSettings.connectObject('changed::user-switch-enabled',
this._updateUserSwitchVisibility.bind(this), this);
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
this._lockdownSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.lockdown'});
this._lockdownSettings.connect('changed::disable-user-switching',
this._updateUserSwitchVisibility.bind(this));
@ -591,7 +591,7 @@ export const UnlockDialog = GObject.registerClass({
// Main Box
let mainBox = new St.Widget();
mainBox.add_constraint(new Layout.MonitorConstraint({ primary: true }));
mainBox.add_constraint(new Layout.MonitorConstraint({primary: true}));
mainBox.add_child(this._stack);
mainBox.add_child(this._notificationsBox);
mainBox.add_child(this._otherUserButton);
@ -644,7 +644,7 @@ export const UnlockDialog = GObject.registerClass({
y: monitor.y,
width: monitor.width,
height: monitor.height,
effect: new Shell.BlurEffect({ name: 'blur' }),
effect: new Shell.BlurEffect({name: 'blur'}),
});
let bgManager = new Background.BackgroundManager({
@ -748,7 +748,7 @@ export const UnlockDialog = GObject.registerClass({
can_focus: progress > 0,
});
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
this._promptBox.set({
opacity: 255 * progress,
@ -785,7 +785,7 @@ export const UnlockDialog = GObject.registerClass({
userName = null;
}
this._authPrompt.begin({ userName });
this._authPrompt.begin({userName});
}
_escape() {

View File

@ -74,7 +74,7 @@ class Avatar extends St.Bin {
iconFile = null;
}
let { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
let {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
this.set_size(
this._iconSize * scaleFactor,
this._iconSize * scaleFactor);
@ -98,7 +98,7 @@ class Avatar extends St.Bin {
export const UserWidgetLabel = GObject.registerClass(
class UserWidgetLabel extends St.Widget {
_init(user) {
super._init({ layout_manager: new Clutter.BinLayout() });
super._init({layout_manager: new Clutter.BinLayout()});
this._user = user;

View File

@ -19,7 +19,7 @@ const DialogResponse = {
export const WelcomeDialog = GObject.registerClass(
class WelcomeDialog extends ModalDialog.ModalDialog {
_init() {
super._init({ styleClass: 'welcome-dialog' });
super._init({styleClass: 'welcome-dialog'});
const appSystem = Shell.AppSystem.get_default();
this._tourAppInfo = appSystem.lookup_app('org.gnome.Tour.desktop');
@ -38,9 +38,9 @@ class WelcomeDialog extends ModalDialog.ModalDialog {
const [majorVersion] = Config.PACKAGE_VERSION.split('.');
const title = _('Welcome to GNOME %s').format(majorVersion);
const description = _('If you want to learn your way around, check out the tour.');
const content = new Dialog.MessageDialogContent({ title, description });
const content = new Dialog.MessageDialogContent({title, description});
const icon = new St.Widget({ style_class: 'welcome-dialog-image' });
const icon = new St.Widget({style_class: 'welcome-dialog-image'});
content.insert_child_at_index(icon, 0);
this.contentLayout.add_child(content);

View File

@ -69,7 +69,7 @@ class DisplayChangeDialog extends ModalDialog.ModalDialog {
let title = _('Keep these display settings?');
let description = this._formatCountDown();
this._content = new Dialog.MessageDialogContent({ title, description });
this._content = new Dialog.MessageDialogContent({title, description});
this.contentLayout.add_child(this._content);
/* Translators: this and the following message should be limited in length,
@ -208,7 +208,7 @@ class WorkspaceTracker {
global.display.connect('window-left-monitor',
this._windowLeftMonitor.bind(this));
this._workspaceSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
this._workspaceSettings = new Gio.Settings({schema_id: 'org.gnome.mutter'});
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
this._nWorkspacesChanged();
@ -476,7 +476,7 @@ class TilePreview extends St.Widget {
});
const AppSwitchAction = GObject.registerClass({
Signals: { 'activated': {} },
Signals: {'activated': {}},
}, class AppSwitchAction extends Clutter.GestureAction {
_init() {
super._init();
@ -535,7 +535,7 @@ const AppSwitchAction = GObject.registerClass({
const ResizePopup = GObject.registerClass(
class ResizePopup extends St.Widget {
_init() {
super._init({ layout_manager: new Clutter.BinLayout() });
super._init({layout_manager: new Clutter.BinLayout()});
this._label = new St.Label({
style_class: 'resize-popup',
x_align: Clutter.ActorAlign.CENTER,
@ -1302,7 +1302,7 @@ export class WindowManager {
// Position a clone of the window on top of the old position,
// while actor updates are frozen.
let actorContent = actor.paint_to_content(oldFrameRect);
let actorClone = new St.Widget({ content: actorContent });
let actorClone = new St.Widget({content: actorContent});
actorClone.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
actorClone.set_position(oldFrameRect.x, oldFrameRect.y);
actorClone.set_size(oldFrameRect.width, oldFrameRect.height);

View File

@ -217,7 +217,7 @@ export class WindowMenuManager {
constructor() {
this._manager = new PopupMenu.PopupMenuManager(Main.layoutManager.dummyCursor);
this._sourceActor = new St.Widget({ reactive: true, visible: false });
this._sourceActor = new St.Widget({reactive: true, visible: false});
this._sourceActor.connect('button-press-event', () => {
this._manager.activeMenu.toggle();
});

View File

@ -39,7 +39,7 @@ export const WindowPreview = GObject.registerClass({
'drag-begin': {},
'drag-cancelled': {},
'drag-end': {},
'selected': { param_types: [GObject.TYPE_UINT] },
'selected': {param_types: [GObject.TYPE_UINT]},
'show-chrome': {},
'size-changed': {},
},
@ -59,7 +59,7 @@ export const WindowPreview = GObject.registerClass({
});
const windowContainer = new Clutter.Actor({
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
});
this.window_container = windowContainer;
@ -136,7 +136,7 @@ export const WindowPreview = GObject.registerClass({
this._icon.add_style_class_name('icon-dropshadow');
this._icon.set({
reactive: true,
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
});
this._icon.add_constraint(new Clutter.BindConstraint({
source: windowContainer,
@ -150,11 +150,11 @@ export const WindowPreview = GObject.registerClass({
this._icon.add_constraint(new Clutter.AlignConstraint({
source: windowContainer,
align_axis: Clutter.AlignAxis.Y_AXIS,
pivot_point: new Graphene.Point({ x: -1, y: ICON_OVERLAP }),
pivot_point: new Graphene.Point({x: -1, y: ICON_OVERLAP}),
factor: 1,
}));
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
this._title = new St.Label({
visible: false,
style_class: 'window-caption',
@ -180,7 +180,7 @@ export const WindowPreview = GObject.registerClass({
this._title.add_constraint(new Clutter.AlignConstraint({
source: windowContainer,
align_axis: Clutter.AlignAxis.Y_AXIS,
pivot_point: new Graphene.Point({ x: -1, y: 0 }),
pivot_point: new Graphene.Point({x: -1, y: 0}),
factor: 1,
}));
this._title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
@ -206,13 +206,13 @@ export const WindowPreview = GObject.registerClass({
this._closeButton.add_constraint(new Clutter.AlignConstraint({
source: windowContainer,
align_axis: Clutter.AlignAxis.X_AXIS,
pivot_point: new Graphene.Point({ x: 0.5, y: -1 }),
pivot_point: new Graphene.Point({x: 0.5, y: -1}),
factor: this._closeButtonSide === St.Side.LEFT ? 0 : 1,
}));
this._closeButton.add_constraint(new Clutter.AlignConstraint({
source: windowContainer,
align_axis: Clutter.AlignAxis.Y_AXIS,
pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
pivot_point: new Graphene.Point({x: -1, y: 0.5}),
factor: 0,
}));
this._closeButton.connect('clicked', () => this._deleteAll());
@ -235,8 +235,8 @@ export const WindowPreview = GObject.registerClass({
}
_updateIconScale() {
const { ControlsState } = OverviewControls;
const { currentState, initialState, finalState } =
const {ControlsState} = OverviewControls;
const {currentState, initialState, finalState} =
this._overviewAdjustment.getStateTransitionParams();
const visible =
initialState === ControlsState.WINDOW_PICKER ||
@ -276,7 +276,7 @@ export const WindowPreview = GObject.registerClass({
chromeHeights() {
const [, closeButtonHeight] = this._closeButton.get_preferred_height(-1);
const [, iconHeight] = this._icon.get_preferred_height(-1);
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
const activeExtraSize = WINDOW_ACTIVE_SIZE_INC * scaleFactor;
const topOversize = closeButtonHeight / 2;
@ -290,7 +290,7 @@ export const WindowPreview = GObject.registerClass({
chromeWidths() {
const [, closeButtonWidth] = this._closeButton.get_preferred_width(-1);
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
const activeExtraSize = WINDOW_ACTIVE_SIZE_INC * scaleFactor;
const leftOversize = this._closeButtonSide === St.Side.LEFT
@ -339,7 +339,7 @@ export const WindowPreview = GObject.registerClass({
});
const [width, height] = this.window_container.get_size();
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
const activeExtraSize = WINDOW_ACTIVE_SIZE_INC * 2 * scaleFactor;
const origSize = Math.max(width, height);
const scale = (origSize + activeExtraSize) / origSize;
@ -475,7 +475,7 @@ export const WindowPreview = GObject.registerClass({
}
get boundingBox() {
return { ...this._cachedBoundingBox };
return {...this._cachedBoundingBox};
}
get windowCenter() {

View File

@ -184,7 +184,7 @@ class UnalignedLayoutStrategy extends LayoutStrategy {
}
_computeRowSizes(layout) {
let { rows, scale } = layout;
let {rows, scale} = layout;
for (let i = 0; i < rows.length; i++) {
let row = rows[i];
row.width = row.fullWidth * scale + (row.windows.length - 1) * this._columnSpacing;
@ -304,7 +304,7 @@ class UnalignedLayoutStrategy extends LayoutStrategy {
computeWindowSlots(layout, area) {
this._computeRowSizes(layout);
let { rows, scale } = layout;
let {rows, scale} = layout;
let slots = [];
@ -453,7 +453,7 @@ export const WorkspaceLayout = GObject.registerClass({
}
_syncOpacities() {
this._windows.forEach(({ metaWindow }, actor) => {
this._windows.forEach(({metaWindow}, actor) => {
this._syncOpacity(actor, metaWindow);
});
}
@ -499,7 +499,7 @@ export const WorkspaceLayout = GObject.registerClass({
if (containerBox) {
const monitor = Main.layoutManager.monitors[this._monitorIndex];
const bottomPoint = new Graphene.Point3D({ y: containerBox.y2 });
const bottomPoint = new Graphene.Point3D({y: containerBox.y2});
const transformedBottomPoint =
this._container.apply_transform_to_point(bottomPoint);
const bottomFreeSpace =
@ -646,8 +646,8 @@ export const WorkspaceLayout = GObject.registerClass({
this.notify('layout-frozen');
}
const { ControlsState } = OverviewControls;
const { currentState } =
const {ControlsState} = OverviewControls;
const {currentState} =
this._overviewAdjustment.getStateTransitionParams();
const inSessionTransition = currentState <= ControlsState.WINDOW_PICKER;
@ -1005,7 +1005,7 @@ class WorkspaceBackground extends Shell.WorkspaceBackground {
}
_updateBorderRadius() {
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
const cornerRadius = scaleFactor * BACKGROUND_CORNER_RADIUS_PIXELS;
const backgroundContent = this._bgManager.backgroundActor.content;
@ -1041,7 +1041,7 @@ class Workspace extends St.Widget {
_init(metaWorkspace, monitorIndex, overviewAdjustment) {
super._init({
style_class: 'window-picker',
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
layout_manager: new Clutter.BinLayout(),
});

View File

@ -101,7 +101,7 @@ class WorkspaceGroup extends Clutter.Actor {
this.add_child(clone);
const record = { windowActor, clone };
const record = {windowActor, clone};
windowActor.connectObject('destroy', () => {
clone.destroy();
@ -143,7 +143,7 @@ const MonitorGroup = GObject.registerClass({
this._monitor = monitor;
const constraint = new Layout.MonitorConstraint({ index: monitor.index });
const constraint = new Layout.MonitorConstraint({index: monitor.index});
this.add_constraint(constraint);
this._container = new Clutter.Actor();
@ -289,7 +289,7 @@ export class WorkspaceAnimationController {
const swipeTracker = new SwipeTracker.SwipeTracker(global.stage,
Clutter.Orientation.HORIZONTAL,
Shell.ActionMode.NORMAL,
{ allowDrag: false });
{allowDrag: false});
swipeTracker.connect('begin', this._switchWorkspaceBegin.bind(this));
swipeTracker.connect('update', this._switchWorkspaceUpdate.bind(this));
swipeTracker.connect('end', this._switchWorkspaceEnd.bind(this));

View File

@ -23,7 +23,7 @@ class WorkspaceSwitcherPopup extends Clutter.Actor {
y_align: Clutter.ActorAlign.END,
});
const constraint = new Layout.MonitorConstraint({ primary: true });
const constraint = new Layout.MonitorConstraint({primary: true});
this.add_constraint(constraint);
Main.uiGroup.add_actor(this);

View File

@ -56,11 +56,11 @@ export const WindowClone = GObject.registerClass({
'drag-begin': {},
'drag-cancelled': {},
'drag-end': {},
'selected': { param_types: [GObject.TYPE_UINT] },
'selected': {param_types: [GObject.TYPE_UINT]},
},
}, class WindowClone extends Clutter.Actor {
_init(realWindow) {
let clone = new Clutter.Clone({ source: realWindow });
let clone = new Clutter.Clone({source: realWindow});
super._init({
layout_manager: new PrimaryActorLayout(clone),
reactive: true,
@ -151,7 +151,7 @@ export const WindowClone = GObject.registerClass({
}
_doAddAttachedDialog(metaDialog, realDialog) {
let clone = new Clutter.Clone({ source: realDialog });
let clone = new Clutter.Clone({source: realDialog});
this._updateDialogPosition(realDialog, clone);
realDialog.connectObject(
@ -242,7 +242,7 @@ export const WorkspaceThumbnail = GObject.registerClass({
super._init({
clip_to_allocation: true,
style_class: 'workspace-thumbnail',
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
});
this._delegate = this;
@ -593,12 +593,12 @@ export const ThumbnailsBox = GObject.registerClass({
style_class: 'workspace-thumbnails',
reactive: true,
x_align: Clutter.ActorAlign.CENTER,
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
});
this._delegate = this;
let indicator = new St.Bin({ style_class: 'workspace-thumbnail-indicator' });
let indicator = new St.Bin({style_class: 'workspace-thumbnail-indicator'});
// We don't want the indicator to affect drag-and-drop
Shell.util_set_hidden_from_pick(indicator, true);
@ -610,7 +610,7 @@ export const ThumbnailsBox = GObject.registerClass({
this._dropWorkspace = -1;
this._dropPlaceholderPos = -1;
this._dropPlaceholder = new St.Bin({ style_class: 'placeholder' });
this._dropPlaceholder = new St.Bin({style_class: 'placeholder'});
this.add_actor(this._dropPlaceholder);
this._spliceIndex = -1;
@ -647,7 +647,7 @@ export const ThumbnailsBox = GObject.registerClass({
'window-drag-end', () => this._onDragEnd(),
'window-drag-cancelled', () => this._onDragCancelled(), this);
this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
this._settings = new Gio.Settings({schema_id: MUTTER_SCHEMA});
this._settings.connect('changed::dynamic-workspaces',
() => this._updateShouldShow());
this._updateShouldShow();
@ -688,7 +688,7 @@ export const ThumbnailsBox = GObject.registerClass({
}
_updateShouldShow() {
const { nWorkspaces } = global.workspace_manager;
const {nWorkspaces} = global.workspace_manager;
const shouldShow = this._settings.get_boolean('dynamic-workspaces')
? nWorkspaces > NUM_WORKSPACES_THRESHOLD
: nWorkspaces > 1;
@ -701,8 +701,8 @@ export const ThumbnailsBox = GObject.registerClass({
}
_updateIndicator() {
const { value } = this._scrollAdjustment;
const { workspaceManager } = global;
const {value} = this._scrollAdjustment;
const {workspaceManager} = global;
const activeIndex = workspaceManager.get_active_workspace_index();
this._animatingIndicator = value !== activeIndex;
@ -926,7 +926,7 @@ export const ThumbnailsBox = GObject.registerClass({
if (this._thumbnails.length > 0)
return;
const { workspaceManager } = global;
const {workspaceManager} = global;
this._transientSignalHolder = new TransientSignalHolder(this);
workspaceManager.connectObject(
'notify::n-workspaces', this._workspacesChanged.bind(this),
@ -1230,8 +1230,8 @@ export const ThumbnailsBox = GObject.registerClass({
_updatePorthole() {
if (!Main.layoutManager.monitors[this._monitorIndex]) {
const { x, y, width, height } = global.stage;
this._porthole = { x, y, width, height };
const {x, y, width, height} = global.stage;
this._porthole = {x, y, width, height};
} else {
this._porthole =
Main.layoutManager.getWorkAreaForMonitor(this._monitorIndex);

View File

@ -127,7 +127,7 @@ class WorkspacesView extends WorkspacesViewBase {
}
_getFirstFitAllWorkspaceBox(box, spacing, vertical) {
const { nWorkspaces } = global.workspaceManager;
const {nWorkspaces} = global.workspaceManager;
const [width, height] = box.get_size();
const [workspace] = this._workspaces;
@ -192,7 +192,7 @@ class WorkspacesView extends WorkspacesViewBase {
x1 -= currentWorkspace * (workspaceWidth + spacing);
}
const fitSingleBox = new Clutter.ActorBox({ x1, y1 });
const fitSingleBox = new Clutter.ActorBox({x1, y1});
if (vertical) {
const [, workspaceHeight] = workspace.get_preferred_height(width);
@ -220,14 +220,14 @@ class WorkspacesView extends WorkspacesViewBase {
}
const spacing = (availableSpace - workspaceSize * 0.4) * (1 - fitMode);
const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage);
return Math.clamp(spacing, WORKSPACE_MIN_SPACING * scaleFactor,
WORKSPACE_MAX_SPACING * scaleFactor);
}
_getWorkspaceModeForOverviewState(state) {
const { ControlsState } = OverviewControls;
const {ControlsState} = OverviewControls;
switch (state) {
case ControlsState.HIDDEN:
@ -245,7 +245,7 @@ class WorkspacesView extends WorkspacesViewBase {
const adj = this._scrollAdjustment;
const fitMode = this._fitModeAdjustment.value;
const { initialState, finalState, progress } =
const {initialState, finalState, progress} =
this._overviewAdjustment.getStateTransitionParams();
const workspaceMode = (1 - fitMode) * Util.lerp(
@ -267,7 +267,7 @@ class WorkspacesView extends WorkspacesViewBase {
}
_getFitModeForState(state) {
const { ControlsState } = OverviewControls;
const {ControlsState} = OverviewControls;
switch (state) {
case ControlsState.HIDDEN:
@ -287,7 +287,7 @@ class WorkspacesView extends WorkspacesViewBase {
let fitSingleBox = offsetBox;
let fitAllBox = offsetBox;
const { transitioning, initialState, finalState } =
const {transitioning, initialState, finalState} =
this._overviewAdjustment.getStateTransitionParams();
const isPrimary = Main.layoutManager.primaryIndex === this._monitorIndex;
@ -405,7 +405,7 @@ class WorkspacesView extends WorkspacesViewBase {
}
_scrollToActive() {
const { workspaceManager } = global;
const {workspaceManager} = global;
const active = workspaceManager.get_active_workspace_index();
this._animating = true;
@ -612,14 +612,14 @@ class SecondaryMonitorDisplay extends St.Widget {
this.queue_relayout();
}, this);
this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
this._settings = new Gio.Settings({schema_id: MUTTER_SCHEMA});
this._settings.connect('changed::workspaces-only-on-primary',
() => this._workspacesOnPrimaryChanged());
this._workspacesOnPrimaryChanged();
}
_getThumbnailParamsForState(state) {
const { ControlsState } = OverviewControls;
const {ControlsState} = OverviewControls;
let opacity, scale;
switch (state) {
@ -638,7 +638,7 @@ class SecondaryMonitorDisplay extends St.Widget {
break;
}
return { opacity, scale };
return {opacity, scale};
}
_getThumbnailsHeight(box) {
@ -646,7 +646,7 @@ class SecondaryMonitorDisplay extends St.Widget {
return 0;
const [width, height] = box.get_size();
const { expandFraction } = this._thumbnails;
const {expandFraction} = this._thumbnails;
const [thumbnailsHeight] = this._thumbnails.get_preferred_height(width);
return Math.min(
thumbnailsHeight * expandFraction,
@ -654,7 +654,7 @@ class SecondaryMonitorDisplay extends St.Widget {
}
_getWorkspacesBoxForState(state, box, padding, thumbnailsHeight, spacing) {
const { ControlsState } = OverviewControls;
const {ControlsState} = OverviewControls;
const workspaceBox = box.copy();
const [width, height] = workspaceBox.get_size();
@ -684,7 +684,7 @@ class SecondaryMonitorDisplay extends St.Widget {
const themeNode = this.get_theme_node();
const contentBox = themeNode.get_content_box(box);
const [width, height] = contentBox.get_size();
const { expandFraction } = this._thumbnails;
const {expandFraction} = this._thumbnails;
const spacing = themeNode.get_length('spacing') * expandFraction;
const padding =
Math.round((1 - SECONDARY_WORKSPACE_SCALE) * height / 2);
@ -768,7 +768,7 @@ class SecondaryMonitorDisplay extends St.Widget {
if (!this._thumbnails.visible)
return;
const { initialState, finalState, progress } =
const {initialState, finalState, progress} =
this._overviewAdjustment.getStateTransitionParams();
const initialParams = this._getThumbnailParamsForState(initialState);
@ -834,7 +834,7 @@ class WorkspacesDisplay extends St.Widget {
Main.layoutManager.overviewGroup,
Clutter.Orientation.HORIZONTAL,
Shell.ActionMode.OVERVIEW,
{ allowDrag: false });
{allowDrag: false});
this._swipeTracker.allowLongSwipes = true;
this._swipeTracker.connect('begin', this._switchWorkspaceBegin.bind(this));
this._swipeTracker.connect('update', this._switchWorkspaceUpdate.bind(this));
@ -854,7 +854,7 @@ class WorkspacesDisplay extends St.Widget {
this._primaryIndex = Main.layoutManager.primaryIndex;
this._workspacesViews = [];
this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
this._settings = new Gio.Settings({schema_id: MUTTER_SCHEMA});
this._inWindowDrag = false;
this._leavingOverview = false;
@ -897,7 +897,7 @@ class WorkspacesDisplay extends St.Widget {
}
_updateTrackerOrientation() {
const { layoutRows } = global.workspace_manager;
const {layoutRows} = global.workspace_manager;
this._swipeTracker.orientation = layoutRows !== -1
? Clutter.Orientation.HORIZONTAL
: Clutter.Orientation.VERTICAL;
@ -936,7 +936,7 @@ class WorkspacesDisplay extends St.Widget {
let progress = adjustment.value / adjustment.page_size;
let points = Array.from(
{ length: workspaceManager.n_workspaces }, (v, i) => i);
{length: workspaceManager.n_workspaces}, (v, i) => i);
tracker.confirmSwipe(distance, points, progress, Math.round(progress));
@ -1052,7 +1052,7 @@ class WorkspacesDisplay extends St.Widget {
_getMonitorIndexForEvent(event) {
let [x, y] = event.get_coords();
let rect = new Meta.Rectangle({ x, y, width: 1, height: 1 });
let rect = new Meta.Rectangle({x, y, width: 1, height: 1});
return global.display.get_monitor_index_for_rect(rect);
}
@ -1089,14 +1089,14 @@ class WorkspacesDisplay extends St.Widget {
}
_onKeyPressEvent(actor, event) {
const { ControlsState } = OverviewControls;
const {ControlsState} = OverviewControls;
if (this._overviewAdjustment.value !== ControlsState.WINDOW_PICKER)
return Clutter.EVENT_PROPAGATE;
if (!this.reactive)
return Clutter.EVENT_PROPAGATE;
const { workspaceManager } = global;
const {workspaceManager} = global;
const vertical = workspaceManager.layout_rows === -1;
const rtl = this.get_text_direction() === Clutter.TextDirection.RTL;

View File

@ -15,7 +15,7 @@ export class XdndHandler extends Signals.EventEmitter {
this._cursorWindowClone = null;
// Used as a drag actor in case we don't have a cursor window clone
this._dummy = new Clutter.Actor({ width: 1, height: 1, opacity: 0 });
this._dummy = new Clutter.Actor({width: 1, height: 1, opacity: 0});
Main.uiGroup.add_actor(this._dummy);
this._dummy.hide();
@ -60,7 +60,7 @@ export class XdndHandler extends Signals.EventEmitter {
source: cursorWindow,
});
this._cursorWindowClone = new Clutter.Clone({ source: cursorWindow });
this._cursorWindowClone = new Clutter.Clone({source: cursorWindow});
Main.uiGroup.add_actor(this._cursorWindowClone);
// Make sure that the clone has the same position as the source

View File

@ -18,6 +18,3 @@ rules:
jsdoc/require-param-description: off
jsdoc/require-param-name: off
jsdoc/require-param-type: off
object-curly-spacing:
- error
- always

View File

@ -44,7 +44,7 @@ var Application = GObject.registerClass(
class Application extends Adw.Application {
_init() {
GLib.set_prgname('gnome-extensions-app');
super._init({ application_id: Package.name });
super._init({application_id: Package.name});
this.connect('window-removed', (a, window) => window.run_dispose());
}
@ -72,7 +72,7 @@ class Application extends Adw.Application {
this._shellProxy = new GnomeShellProxy(Gio.DBus.session,
'org.gnome.Shell.Extensions', '/org/gnome/Shell/Extensions');
this._window = new ExtensionsWindow({ application: this });
this._window = new ExtensionsWindow({application: this});
}
});
@ -100,7 +100,7 @@ var ExtensionsWindow = GObject.registerClass({
this._updatesCheckId = 0;
this._exporter = new Shew.WindowExporter({ window: this });
this._exporter = new Shew.WindowExporter({window: this});
this._exportedHandle = '';
this.add_action_entries(
@ -120,7 +120,7 @@ var ExtensionsWindow = GObject.registerClass({
this._searchTerms = [];
this._searchEntry.connect('search-changed', () => {
const { text } = this._searchEntry;
const {text} = this._searchEntry;
if (text === '')
this._searchTerms = [];
else
@ -458,7 +458,7 @@ var ExtensionRow = GObject.registerClass({
}
get hasError() {
const { state } = this._extension;
const {state} = this._extension;
return state === ExtensionState.OUT_OF_DATE ||
state === ExtensionState.ERROR;
}