cleanup: Require "dangling" commas

Since ES5, trailing commas in arrays and object literals are valid.
We generally haven't used them so far, but they are actually a good
idea, as they make additions and removals in diffs much cleaner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
This commit is contained in:
Florian Müllner 2019-08-20 23:43:54 +02:00 committed by Georges Basile Stavracas Neto
parent 07cc84f632
commit ebf77748a8
81 changed files with 452 additions and 445 deletions

View File

@ -29,7 +29,7 @@ class Application extends Gtk.Application {
GLib.set_prgname('gnome-shell-extension-prefs'); GLib.set_prgname('gnome-shell-extension-prefs');
super._init({ super._init({
application_id: 'org.gnome.shell.ExtensionPrefs', application_id: 'org.gnome.shell.ExtensionPrefs',
flags: Gio.ApplicationFlags.HANDLES_COMMAND_LINE flags: Gio.ApplicationFlags.HANDLES_COMMAND_LINE,
}); });
this._startupUuid = null; this._startupUuid = null;
@ -60,12 +60,12 @@ class Application extends Gtk.Application {
let dialog = new Gtk.Window({ let dialog = new Gtk.Window({
modal: !this._skipMainWindow, modal: !this._skipMainWindow,
type_hint: Gdk.WindowTypeHint.DIALOG type_hint: Gdk.WindowTypeHint.DIALOG,
}); });
dialog.set_titlebar(new Gtk.HeaderBar({ dialog.set_titlebar(new Gtk.HeaderBar({
show_close_button: true, show_close_button: true,
title: row.name, title: row.name,
visible: true visible: true,
})); }));
if (this._skipMainWindow) { if (this._skipMainWindow) {
@ -88,20 +88,20 @@ class Application extends Gtk.Application {
_buildErrorUI(row, exc) { _buildErrorUI(row, exc) {
let scroll = new Gtk.ScrolledWindow({ let scroll = new Gtk.ScrolledWindow({
hscrollbar_policy: Gtk.PolicyType.NEVER, hscrollbar_policy: Gtk.PolicyType.NEVER,
propagate_natural_height: true propagate_natural_height: true,
}); });
let box = new Gtk.Box({ let box = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL, orientation: Gtk.Orientation.VERTICAL,
spacing: 12, spacing: 12,
margin: 100, margin: 100,
margin_bottom: 60 margin_bottom: 60,
}); });
scroll.add(box); scroll.add(box);
let label = new Gtk.Label({ let label = new Gtk.Label({
label: '<span size="x-large">%s</span>'.format(_("Somethings gone wrong")), label: '<span size="x-large">%s</span>'.format(_("Somethings gone wrong")),
use_markup: true use_markup: true,
}); });
label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL); label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
box.add(label); box.add(label);
@ -109,13 +109,13 @@ class Application extends Gtk.Application {
label = new Gtk.Label({ label = new Gtk.Label({
label: _("Were very sorry, but theres been a problem: the settings for this extension cant be displayed. We recommend that you report the issue to the extension authors."), label: _("Were very sorry, but theres been a problem: the settings for this extension cant be displayed. We recommend that you report the issue to the extension authors."),
justify: Gtk.Justification.CENTER, justify: Gtk.Justification.CENTER,
wrap: true wrap: true,
}); });
box.add(label); box.add(label);
let expander = new Expander({ let expander = new Expander({
label: _("Technical Details"), label: _("Technical Details"),
margin_top: 12 margin_top: 12,
}); });
box.add(expander); box.add(expander);
@ -133,7 +133,7 @@ class Application extends Gtk.Application {
top_margin: 12, top_margin: 12,
bottom_margin: 12, bottom_margin: 12,
left_margin: 12, left_margin: 12,
right_margin: 12 right_margin: 12,
}); });
let toolbar = new Gtk.Toolbar(); let toolbar = new Gtk.Toolbar();
@ -149,7 +149,7 @@ class Application extends Gtk.Application {
let copyButton = new Gtk.ToolButton({ let copyButton = new Gtk.ToolButton({
icon_name: 'edit-copy-symbolic', icon_name: 'edit-copy-symbolic',
tooltip_text: _("Copy Error") tooltip_text: _("Copy Error"),
}); });
toolbar.add(copyButton); toolbar.add(copyButton);
@ -166,7 +166,7 @@ class Application extends Gtk.Application {
'```', // '`' '```', // '`'
exc.stack.replace(/\n$/, ''), // stack without trailing newline exc.stack.replace(/\n$/, ''), // stack without trailing newline
'```', // '`' '```', // '`'
'' '',
]; ];
clipboard.set_text(lines.join('\n'), -1); clipboard.set_text(lines.join('\n'), -1);
}); });
@ -179,7 +179,7 @@ class Application extends Gtk.Application {
label: _("Homepage"), label: _("Homepage"),
tooltip_text: _("Visit extension homepage"), tooltip_text: _("Visit extension homepage"),
no_show_all: true, no_show_all: true,
visible: row.url != null visible: row.url != null,
}); });
toolbar.add(urlButton); toolbar.add(urlButton);
@ -189,7 +189,7 @@ class Application extends Gtk.Application {
}); });
let expandedBox = new Gtk.Box({ let expandedBox = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL orientation: Gtk.Orientation.VERTICAL,
}); });
expandedBox.add(textview); expandedBox.add(textview);
expandedBox.add(toolbar); expandedBox.add(toolbar);
@ -219,7 +219,7 @@ class Application extends Gtk.Application {
Gio.SettingsBindFlags.INVERT_BOOLEAN); Gio.SettingsBindFlags.INVERT_BOOLEAN);
this._mainStack = new Gtk.Stack({ this._mainStack = new Gtk.Stack({
transition_type: Gtk.StackTransitionType.CROSSFADE transition_type: Gtk.StackTransitionType.CROSSFADE,
}); });
this._window.add(this._mainStack); this._window.add(this._mainStack);
@ -360,20 +360,20 @@ var Expander = GObject.registerClass({
'label', 'label', 'label', 'label', 'label', 'label',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
null null
) ),
} },
}, class Expander extends Gtk.Box { }, class Expander extends Gtk.Box {
_init(params = {}) { _init(params = {}) {
this._labelText = null; this._labelText = null;
super._init(Object.assign(params, { super._init(Object.assign(params, {
orientation: Gtk.Orientation.VERTICAL, orientation: Gtk.Orientation.VERTICAL,
spacing: 0 spacing: 0,
})); }));
this._frame = new Gtk.Frame({ this._frame = new Gtk.Frame({
shadow_type: Gtk.ShadowType.IN, shadow_type: Gtk.ShadowType.IN,
hexpand: true hexpand: true,
}); });
let eventBox = new Gtk.EventBox(); let eventBox = new Gtk.EventBox();
@ -381,12 +381,12 @@ var Expander = GObject.registerClass({
let hbox = new Gtk.Box({ let hbox = new Gtk.Box({
spacing: 6, spacing: 6,
margin: 12 margin: 12,
}); });
eventBox.add(hbox); eventBox.add(hbox);
this._arrow = new Gtk.Image({ this._arrow = new Gtk.Image({
icon_name: 'pan-end-symbolic' icon_name: 'pan-end-symbolic',
}); });
hbox.add(this._arrow); hbox.add(this._arrow);
@ -396,7 +396,7 @@ var Expander = GObject.registerClass({
this._revealer = new Gtk.Revealer(); this._revealer = new Gtk.Revealer();
this._childBin = new Gtk.Frame({ this._childBin = new Gtk.Frame({
shadow_type: Gtk.ShadowType.IN shadow_type: Gtk.ShadowType.IN,
}); });
this._revealer.add(this._childBin); this._revealer.add(this._childBin);
@ -414,7 +414,7 @@ var Expander = GObject.registerClass({
this._gesture = new Gtk.GestureMultiPress({ this._gesture = new Gtk.GestureMultiPress({
widget: this._frame, widget: this._frame,
button: 0, button: 0,
exclusive: true exclusive: true,
}); });
this._gesture.connect('released', (gesture, nPress) => { this._gesture.connect('released', (gesture, nPress) => {
if (nPress == 1) if (nPress == 1)
@ -459,7 +459,7 @@ class EmptyPlaceholder extends Gtk.Box {
super._init({ super._init({
orientation: Gtk.Orientation.VERTICAL, orientation: Gtk.Orientation.VERTICAL,
spacing: 6, spacing: 6,
margin: 32 margin: 32,
}); });
let image = new Gtk.Image({ let image = new Gtk.Image({
@ -467,7 +467,7 @@ class EmptyPlaceholder extends Gtk.Box {
pixel_size: 96, pixel_size: 96,
visible: true, visible: true,
vexpand: true, vexpand: true,
valign: Gtk.Align.END valign: Gtk.Align.END,
}); });
image.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL); image.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
this.add(image); this.add(image);
@ -475,7 +475,7 @@ class EmptyPlaceholder extends Gtk.Box {
let label = new Gtk.Label({ let label = new Gtk.Label({
label: `<b><span size="x-large">${_("No Extensions Installed")}</span></b>`, label: `<b><span size="x-large">${_("No Extensions Installed")}</span></b>`,
use_markup: true, use_markup: true,
visible: true visible: true,
}); });
label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL); label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
this.add(label); this.add(label);
@ -492,7 +492,7 @@ class EmptyPlaceholder extends Gtk.Box {
hexpand: true, hexpand: true,
vexpand: (appInfo == null), vexpand: (appInfo == null),
halign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER,
valign: Gtk.Align.START valign: Gtk.Align.START,
}); });
this.add(desc); this.add(desc);
@ -500,14 +500,14 @@ class EmptyPlaceholder extends Gtk.Box {
let button = new Gtk.Button({ let button = new Gtk.Button({
label: _("Browse in Software"), label: _("Browse in Software"),
image: new Gtk.Image({ image: new Gtk.Image({
icon_name: "org.gnome.Software-symbolic" icon_name: "org.gnome.Software-symbolic",
}), }),
always_show_image: true, always_show_image: true,
margin_top: 12, margin_top: 12,
visible: true, visible: true,
halign: Gtk.Align.CENTER, halign: Gtk.Align.CENTER,
valign: Gtk.Align.START, valign: Gtk.Align.START,
vexpand: true vexpand: true,
}); });
this.add(button); this.add(button);
@ -526,13 +526,13 @@ class NoShellPlaceholder extends Gtk.Box {
orientation: Gtk.Orientation.VERTICAL, orientation: Gtk.Orientation.VERTICAL,
spacing: 12, spacing: 12,
margin: 100, margin: 100,
margin_bottom: 60 margin_bottom: 60,
}); });
let label = new Gtk.Label({ let label = new Gtk.Label({
label: '<span size="x-large">%s</span>'.format( label: '<span size="x-large">%s</span>'.format(
_("Somethings gone wrong")), _("Somethings gone wrong")),
use_markup: true use_markup: true,
}); });
label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL); label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
this.add(label); this.add(label);
@ -540,7 +540,7 @@ class NoShellPlaceholder extends Gtk.Box {
label = new Gtk.Label({ label = new Gtk.Label({
label: _("Were very sorry, but it was not possible to get the list of installed extensions. Make sure you are logged into GNOME and try again."), label: _("Were very sorry, but it was not possible to get the list of installed extensions. Make sure you are logged into GNOME and try again."),
justify: Gtk.Justification.CENTER, justify: Gtk.Justification.CENTER,
wrap: true wrap: true,
}); });
this.add(label); this.add(label);
@ -648,7 +648,7 @@ class ExtensionRow extends Gtk.ListBoxRow {
this._switch = new Gtk.Switch({ this._switch = new Gtk.Switch({
valign: Gtk.Align.CENTER, valign: Gtk.Align.CENTER,
sensitive: this._canToggle(), sensitive: this._canToggle(),
state: this._extension.state === ExtensionState.ENABLED state: this._extension.state === ExtensionState.ENABLED,
}); });
this._notifyActiveId = this._switch.connect('notify::active', () => { this._notifyActiveId = this._switch.connect('notify::active', () => {
if (this._switch.active) if (this._switch.active)
@ -691,7 +691,7 @@ function initEnvironment() {
log(`ERROR: ${s}`); log(`ERROR: ${s}`);
}, },
userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']) userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']),
}; };
String.prototype.format = Format.format; String.prototype.format = Format.format;

View File

@ -23,19 +23,19 @@ const N_WIGGLES = 3;
var AuthPromptMode = { var AuthPromptMode = {
UNLOCK_ONLY: 0, UNLOCK_ONLY: 0,
UNLOCK_OR_LOG_IN: 1 UNLOCK_OR_LOG_IN: 1,
}; };
var AuthPromptStatus = { var AuthPromptStatus = {
NOT_VERIFYING: 0, NOT_VERIFYING: 0,
VERIFYING: 1, VERIFYING: 1,
VERIFICATION_FAILED: 2, VERIFICATION_FAILED: 2,
VERIFICATION_SUCCEEDED: 3 VERIFICATION_SUCCEEDED: 3,
}; };
var BeginRequestType = { var BeginRequestType = {
PROVIDE_USERNAME: 0, PROVIDE_USERNAME: 0,
DONT_PROVIDE_USERNAME: 1 DONT_PROVIDE_USERNAME: 1,
}; };
var AuthPrompt = GObject.registerClass({ var AuthPrompt = GObject.registerClass({
@ -45,12 +45,12 @@ var AuthPrompt = GObject.registerClass({
'next': {}, 'next': {},
'prompted': {}, 'prompted': {},
'reset': { param_types: [GObject.TYPE_UINT] }, 'reset': { param_types: [GObject.TYPE_UINT] },
} },
}, class AuthPrompt extends St.BoxLayout { }, class AuthPrompt extends St.BoxLayout {
_init(gdmClient, mode) { _init(gdmClient, mode) {
super._init({ super._init({
style_class: 'login-dialog-prompt-layout', style_class: 'login-dialog-prompt-layout',
vertical: true vertical: true,
}); });
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING; this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
@ -321,7 +321,7 @@ var AuthPrompt = GObject.registerClass({
if (this._spinner) if (this._spinner)
this._spinner.stop(); this._spinner.stop();
} }
} },
}); });
} }
} }
@ -337,7 +337,7 @@ var AuthPrompt = GObject.registerClass({
opacity: 255, opacity: 255,
duration: DEFAULT_BUTTON_WELL_ANIMATION_TIME, duration: DEFAULT_BUTTON_WELL_ANIMATION_TIME,
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY, delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY,
mode: Clutter.AnimationMode.LINEAR mode: Clutter.AnimationMode.LINEAR,
}); });
} }
} }
@ -392,7 +392,7 @@ var AuthPrompt = GObject.registerClass({
this._message.ease({ this._message.ease({
opacity: 0, opacity: 0,
duration: MESSAGE_FADE_OUT_ANIMATION_TIME, duration: MESSAGE_FADE_OUT_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }

View File

@ -39,7 +39,7 @@ const _LOGO_ICON_HEIGHT = 48;
const _MAX_BOTTOM_MENU_ITEMS = 5; const _MAX_BOTTOM_MENU_ITEMS = 5;
var UserListItem = GObject.registerClass({ var UserListItem = GObject.registerClass({
Signals: { 'activate': {} } Signals: { 'activate': {} },
}, class UserListItem extends St.Button { }, class UserListItem extends St.Button {
_init(user) { _init(user) {
let layout = new St.BoxLayout({ let layout = new St.BoxLayout({
@ -159,7 +159,7 @@ var UserList = GObject.registerClass({
Signals: { Signals: {
'activate': { param_types: [UserListItem.$gtype] }, 'activate': { param_types: [UserListItem.$gtype] },
'item-added': { param_types: [UserListItem.$gtype] }, 'item-added': { param_types: [UserListItem.$gtype] },
} },
}, class UserList extends St.ScrollView { }, class UserList extends St.ScrollView {
_init() { _init() {
super._init({ super._init({
@ -224,7 +224,7 @@ var UserList = GObject.registerClass({
let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0); let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
adjustment.ease(value, { adjustment.ease(value, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: _SCROLL_ANIMATION_TIME duration: _SCROLL_ANIMATION_TIME,
}); });
} }
@ -307,7 +307,7 @@ var UserList = GObject.registerClass({
}); });
var SessionMenuButton = GObject.registerClass({ var SessionMenuButton = GObject.registerClass({
Signals: { 'session-activated': { param_types: [GObject.TYPE_STRING] } } Signals: { 'session-activated': { param_types: [GObject.TYPE_STRING] } },
}, class SessionMenuButton extends St.Bin { }, class SessionMenuButton extends St.Bin {
_init() { _init() {
let gearIcon = new St.Icon({ icon_name: 'emblem-system-symbolic' }); let gearIcon = new St.Icon({ icon_name: 'emblem-system-symbolic' });
@ -318,7 +318,7 @@ var SessionMenuButton = GObject.registerClass({
can_focus: true, can_focus: true,
accessible_name: _("Choose Session"), accessible_name: _("Choose Session"),
accessible_role: Atk.Role.MENU, accessible_role: Atk.Role.MENU,
child: gearIcon child: gearIcon,
}); });
super._init({ child: button }); super._init({ child: button });
@ -776,7 +776,7 @@ var LoginDialog = GObject.registerClass({
this._bannerView.ease({ this._bannerView.ease({
opacity: 255, opacity: 255,
duration: _FADE_ANIMATION_TIME, duration: _FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -877,7 +877,7 @@ var LoginDialog = GObject.registerClass({
this._authPrompt.ease({ this._authPrompt.ease({
opacity: 255, opacity: 255,
duration: _FADE_ANIMATION_TIME, duration: _FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
this._fadeInBannerView(); this._fadeInBannerView();
} }
@ -945,7 +945,7 @@ var LoginDialog = GObject.registerClass({
if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.NOT_VERIFYING) if (this._authPrompt.verificationStatus != AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
this._authPrompt.reset(); this._authPrompt.reset();
this._unbindOpacity(); this._unbindOpacity();
} },
}); });
} }
@ -967,7 +967,7 @@ var LoginDialog = GObject.registerClass({
onComplete: () => { onComplete: () => {
this._greeter.call_start_session_when_ready_sync(serviceName, true, null); this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
this._unbindOpacity(); this._unbindOpacity();
} },
}); });
} }
@ -1240,7 +1240,7 @@ var LoginDialog = GObject.registerClass({
this.ease({ this.ease({
opacity: 255, opacity: 255,
duration: 1000, duration: 1000,
mode: Clutter.AnimationMode.EASE_IN_QUAD mode: Clutter.AnimationMode.EASE_IN_QUAD,
}); });
return true; return true;

View File

@ -37,7 +37,7 @@ var MessageType = {
NONE: 0, NONE: 0,
ERROR: 1, ERROR: 1,
INFO: 2, INFO: 2,
HINT: 3 HINT: 3,
}; };
function fadeInActor(actor) { function fadeInActor(actor) {
@ -58,7 +58,7 @@ function fadeInActor(actor) {
onComplete: () => { onComplete: () => {
this.set_height(-1); this.set_height(-1);
hold.release(); hold.release();
} },
}); });
return hold; return hold;
@ -81,7 +81,7 @@ function fadeOutActor(actor) {
this.hide(); this.hide();
this.set_height(-1); this.set_height(-1);
hold.release(); hold.release();
} },
}); });
return hold; return hold;
} }
@ -109,7 +109,7 @@ function cloneAndFadeOutActor(actor) {
onComplete: () => { onComplete: () => {
clone.destroy(); clone.destroy();
hold.release(); hold.release();
} },
}); });
return hold; return hold;
} }

View File

@ -15,7 +15,7 @@ const Config = imports.misc.config;
var ExtensionType = { var ExtensionType = {
SYSTEM: 1, SYSTEM: 1,
PER_USER: 2 PER_USER: 2,
}; };
var ExtensionState = { var ExtensionState = {
@ -28,7 +28,7 @@ var ExtensionState = {
// Used as an error state for operations on unknown extensions, // Used as an error state for operations on unknown extensions,
// should never be in a real extensionMeta object. // should never be in a real extensionMeta object.
UNINSTALLED: 99 UNINSTALLED: 99,
}; };
const SERIALIZED_PROPERTIES = ['type', 'state', 'path', 'error', 'hasPrefs', 'canChange']; const SERIALIZED_PROPERTIES = ['type', 'state', 'path', 'error', 'hasPrefs', 'canChange'];

View File

@ -11,7 +11,7 @@ var PresenceStatus = {
AVAILABLE: 0, AVAILABLE: 0,
INVISIBLE: 1, INVISIBLE: 1,
BUSY: 2, BUSY: 2,
IDLE: 3 IDLE: 3,
}; };
var PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface); var PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface);

View File

@ -154,7 +154,7 @@ var IntrospectService = class {
'is-hidden': GLib.Variant.new('b', window.is_hidden()), 'is-hidden': GLib.Variant.new('b', window.is_hidden()),
'has-focus': GLib.Variant.new('b', (window == focusWindow)), 'has-focus': GLib.Variant.new('b', (window == focusWindow)),
'width': GLib.Variant.new('u', frameRect.width), 'width': GLib.Variant.new('u', frameRect.width),
'height': GLib.Variant.new('u', frameRect.height) 'height': GLib.Variant.new('u', frameRect.height),
}; };
// These properties may not be available for all windows: // These properties may not be available for all windows:

View File

@ -218,7 +218,7 @@ var BroadbandModem = GObject.registerClass({
'capabilities', 'capabilities', 'capabilities', 'capabilities', 'capabilities', 'capabilities',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
NM.DeviceModemCapabilities.$gtype, NM.DeviceModemCapabilities.$gtype,
NM.DeviceModemCapabilities.NONE) NM.DeviceModemCapabilities.NONE),
}, },
}, class BroadbandModem extends ModemBase { }, class BroadbandModem extends ModemBase {
_init(path, capabilities) { _init(path, capabilities) {

View File

@ -74,8 +74,8 @@ const SystemActions = GObject.registerClass({
'orientation-lock-icon', 'orientation-lock-icon',
'orientation-lock-icon', 'orientation-lock-icon',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
null) null),
} },
}, class SystemActions extends GObject.Object { }, class SystemActions extends GObject.Object {
_init() { _init() {
super._init(); super._init();
@ -90,7 +90,7 @@ const SystemActions = GObject.registerClass({
iconName: 'system-shutdown-symbolic', iconName: 'system-shutdown-symbolic',
// Translators: A list of keywords that match the power-off action, separated by semicolons // Translators: A list of keywords that match the power-off action, separated by semicolons
keywords: _("power off;shutdown;reboot;restart").split(/[; ]/), keywords: _("power off;shutdown;reboot;restart").split(/[; ]/),
available: false available: false,
}); });
this._actions.set(LOCK_SCREEN_ACTION_ID, { this._actions.set(LOCK_SCREEN_ACTION_ID, {
// Translators: The name of the lock screen action in search // Translators: The name of the lock screen action in search
@ -98,7 +98,7 @@ const SystemActions = GObject.registerClass({
iconName: 'system-lock-screen-symbolic', iconName: 'system-lock-screen-symbolic',
// Translators: A list of keywords that match the lock screen action, separated by semicolons // Translators: A list of keywords that match the lock screen action, separated by semicolons
keywords: _("lock screen").split(/[; ]/), keywords: _("lock screen").split(/[; ]/),
available: false available: false,
}); });
this._actions.set(LOGOUT_ACTION_ID, { this._actions.set(LOGOUT_ACTION_ID, {
// Translators: The name of the logout action in search // Translators: The name of the logout action in search
@ -106,7 +106,7 @@ const SystemActions = GObject.registerClass({
iconName: 'application-exit-symbolic', iconName: 'application-exit-symbolic',
// Translators: A list of keywords that match the logout action, separated by semicolons // Translators: A list of keywords that match the logout action, separated by semicolons
keywords: _("logout;log out;sign off").split(/[; ]/), keywords: _("logout;log out;sign off").split(/[; ]/),
available: false available: false,
}); });
this._actions.set(SUSPEND_ACTION_ID, { this._actions.set(SUSPEND_ACTION_ID, {
// Translators: The name of the suspend action in search // Translators: The name of the suspend action in search
@ -114,7 +114,7 @@ const SystemActions = GObject.registerClass({
iconName: 'media-playback-pause-symbolic', iconName: 'media-playback-pause-symbolic',
// Translators: A list of keywords that match the suspend action, separated by semicolons // Translators: A list of keywords that match the suspend action, separated by semicolons
keywords: _("suspend;sleep").split(/[; ]/), keywords: _("suspend;sleep").split(/[; ]/),
available: false available: false,
}); });
this._actions.set(SWITCH_USER_ACTION_ID, { this._actions.set(SWITCH_USER_ACTION_ID, {
// Translators: The name of the switch user action in search // Translators: The name of the switch user action in search
@ -122,7 +122,7 @@ const SystemActions = GObject.registerClass({
iconName: 'system-switch-user-symbolic', iconName: 'system-switch-user-symbolic',
// Translators: A list of keywords that match the switch user action, separated by semicolons // Translators: A list of keywords that match the switch user action, separated by semicolons
keywords: _("switch user").split(/[; ]/), keywords: _("switch user").split(/[; ]/),
available: false available: false,
}); });
this._actions.set(LOCK_ORIENTATION_ACTION_ID, { this._actions.set(LOCK_ORIENTATION_ACTION_ID, {
// Translators: The name of the lock orientation action in search // Translators: The name of the lock orientation action in search
@ -130,7 +130,7 @@ const SystemActions = GObject.registerClass({
iconName: '', iconName: '',
// Translators: A list of keywords that match the lock orientation action, separated by semicolons // Translators: A list of keywords that match the lock orientation action, separated by semicolons
keywords: _("lock orientation;screen;rotation").split(/[; ]/), keywords: _("lock orientation;screen;rotation").split(/[; ]/),
available: false available: false,
}); });
this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA }); this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });

View File

@ -424,7 +424,7 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
adjustment.ease(value, { adjustment.ease(value, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: SCROLL_TIME duration: SCROLL_TIME,
}); });
} }
@ -456,8 +456,8 @@ function wiggle(actor, params) {
duration: params.duration, duration: params.duration,
mode: Clutter.AnimationMode.EASE_IN_QUAD, mode: Clutter.AnimationMode.EASE_IN_QUAD,
}); });
} },
}); });
} },
}); });
} }

View File

@ -90,7 +90,7 @@ var WeatherClient = class {
this._onWeatherProxyReady.bind(this)); this._onWeatherProxyReady.bind(this));
this._settings = new Gio.Settings({ this._settings = new Gio.Settings({
schema_id: 'org.gnome.shell.weather' schema_id: 'org.gnome.shell.weather',
}); });
this._settings.connect('changed::automatic-location', this._settings.connect('changed::automatic-location',
this._onAutomaticLocationChanged.bind(this)); this._onAutomaticLocationChanged.bind(this));

View File

@ -57,7 +57,7 @@ var METRICS = {
units: "us" }, units: "us" },
applicationsShowTimeSubsequent: applicationsShowTimeSubsequent:
{ description: "Time to switch to applications view, second time", { description: "Time to switch to applications view, second time",
units: "us" } units: "us" },
}; };
let WINDOW_CONFIGS = [ let WINDOW_CONFIGS = [
@ -67,7 +67,7 @@ let WINDOW_CONFIGS = [
{ width: 640, height: 480, alpha: false, maximized: true, count: 5, metric: 'overviewFps5Maximized' }, { width: 640, height: 480, alpha: false, maximized: true, count: 5, metric: 'overviewFps5Maximized' },
{ width: 640, height: 480, alpha: false, maximized: true, count: 10, metric: 'overviewFps10Maximized' }, { width: 640, height: 480, alpha: false, maximized: true, count: 10, metric: 'overviewFps10Maximized' },
{ width: 640, height: 480, alpha: true, maximized: false, count: 5, metric: 'overviewFps5Alpha' }, { width: 640, height: 480, alpha: true, maximized: false, count: 5, metric: 'overviewFps5Alpha' },
{ width: 640, height: 480, alpha: true, maximized: false, count: 10, metric: 'overviewFps10Alpha' } { width: 640, height: 480, alpha: true, maximized: false, count: 10, metric: 'overviewFps10Alpha' },
]; ];
function *run() { function *run() {

View File

@ -114,7 +114,7 @@ function *run() {
Scripting.scriptEvent('desktopShown'); Scripting.scriptEvent('desktopShown');
let interfaceSettings = new Gio.Settings({ let interfaceSettings = new Gio.Settings({
schema_id: 'org.gnome.desktop.interface' schema_id: 'org.gnome.desktop.interface',
}); });
interfaceSettings.set_boolean('enable-animations', false); interfaceSettings.set_boolean('enable-animations', false);

View File

@ -11,13 +11,13 @@ const { loadInterfaceXML } = imports.misc.fileUtils;
const PortalHelperResult = { const PortalHelperResult = {
CANCELLED: 0, CANCELLED: 0,
COMPLETED: 1, COMPLETED: 1,
RECHECK: 2 RECHECK: 2,
}; };
const PortalHelperSecurityLevel = { const PortalHelperSecurityLevel = {
NOT_YET_DETERMINED: 0, NOT_YET_DETERMINED: 0,
SECURE: 1, SECURE: 1,
INSECURE: 2 INSECURE: 2,
}; };
const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org'; const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';

View File

@ -13,7 +13,7 @@ const AccessIface = loadInterfaceXML('org.freedesktop.impl.portal.Access');
var DialogResponse = { var DialogResponse = {
OK: 0, OK: 0,
CANCEL: 1, CANCEL: 1,
CLOSED: 2 CLOSED: 2,
}; };
var AccessDialog = GObject.registerClass( var AccessDialog = GObject.registerClass(

View File

@ -365,7 +365,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
onComplete: () => { onComplete: () => {
thumbnailsActor.destroy(); thumbnailsActor.destroy();
this.thumbnailsVisible = false; this.thumbnailsVisible = false;
} },
}); });
this._thumbnails = null; this._thumbnails = null;
if (this._switcherList._items[this._selectedIndex]) if (this._switcherList._items[this._selectedIndex])
@ -395,7 +395,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this.thumbnailsVisible = true; this.thumbnailsVisible = true;
} },
}); });
this._switcherList._items[this._selectedIndex].add_accessible_state(Atk.StateType.EXPANDED); this._switcherList._items[this._selectedIndex].add_accessible_state(Atk.StateType.EXPANDED);
@ -474,7 +474,7 @@ var CyclerList = GObject.registerClass({
}); });
var CyclerPopup = GObject.registerClass({ var CyclerPopup = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT GTypeFlags: GObject.TypeFlags.ABSTRACT,
}, class CyclerPopup extends SwitcherPopup.SwitcherPopup { }, class CyclerPopup extends SwitcherPopup.SwitcherPopup {
_init() { _init() {
super._init(); super._init();

View File

@ -158,7 +158,7 @@ class Spinner extends AnimatedIcon {
opacity: 255, opacity: 255,
delay: SPINNER_ANIMATION_DELAY, delay: SPINNER_ANIMATION_DELAY,
duration: SPINNER_ANIMATION_TIME, duration: SPINNER_ANIMATION_TIME,
mode: Clutter.AnimationMode.LINEAR mode: Clutter.AnimationMode.LINEAR,
}); });
} else { } else {
this.opacity = 255; this.opacity = 255;
@ -174,7 +174,7 @@ class Spinner extends AnimatedIcon {
opacity: 0, opacity: 0,
duration: SPINNER_ANIMATION_TIME, duration: SPINNER_ANIMATION_TIME,
mode: Clutter.AnimationMode.LINEAR, mode: Clutter.AnimationMode.LINEAR,
onComplete: () => super.stop() onComplete: () => super.stop(),
}); });
} else { } else {
this.opacity = 0; this.opacity = 0;

View File

@ -138,11 +138,11 @@ var BaseAppView = GObject.registerClass({
'use-pagination': GObject.ParamSpec.boolean( 'use-pagination': GObject.ParamSpec.boolean(
'use-pagination', 'use-pagination', 'use-pagination', 'use-pagination', 'use-pagination', 'use-pagination',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
false) false),
}, },
Signals: { Signals: {
'view-loaded': {}, 'view-loaded': {},
} },
}, class BaseAppView extends St.Widget { }, class BaseAppView extends St.Widget {
_init(params = {}, gridParams) { _init(params = {}, gridParams) {
super._init(params); super._init(params);
@ -151,7 +151,7 @@ var BaseAppView = GObject.registerClass({
columnLimit: MAX_COLUMNS, columnLimit: MAX_COLUMNS,
minRows: MIN_ROWS, minRows: MIN_ROWS,
minColumns: MIN_COLUMNS, minColumns: MIN_COLUMNS,
padWithSpacing: true padWithSpacing: true,
}, true); }, true);
if (this.use_pagination) if (this.use_pagination)
@ -271,7 +271,7 @@ var BaseAppView = GObject.registerClass({
let params = { let params = {
duration: VIEWS_SWITCH_TIME, duration: VIEWS_SWITCH_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}; };
if (animationDirection == IconGrid.AnimationDirection.IN) { if (animationDirection == IconGrid.AnimationDirection.IN) {
this.show(); this.show();
@ -292,20 +292,22 @@ var BaseAppView = GObject.registerClass({
}); });
var AllView = GObject.registerClass({ var AllView = GObject.registerClass({
Signals: { 'space-ready': {} } Signals: { 'space-ready': {} },
}, class AllView extends BaseAppView { }, class AllView extends BaseAppView {
_init() { _init() {
super._init({ super._init({
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
use_pagination: true use_pagination: true,
}); });
this._scrollView = new St.ScrollView({ style_class: 'all-apps', this._scrollView = new St.ScrollView({
x_expand: true, style_class: 'all-apps',
y_expand: true, x_expand: true,
reactive: true, }); y_expand: true,
reactive: true,
});
this.add_actor(this._scrollView); this.add_actor(this._scrollView);
this._grid._delegate = this; this._grid._delegate = this;
@ -531,7 +533,7 @@ var AllView = GObject.registerClass({
opacity: 0, opacity: 0,
duration: VIEWS_SWITCH_TIME, duration: VIEWS_SWITCH_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => (this.opacity = 255) onComplete: () => (this.opacity = 255),
}); });
} }
@ -587,7 +589,7 @@ var AllView = GObject.registerClass({
this._grid.currentPage = pageNumber; this._grid.currentPage = pageNumber;
this._adjustment.ease(this._grid.getPageY(pageNumber), { this._adjustment.ease(this._grid.getPageY(pageNumber), {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: time duration: time,
}); });
this._pageIndicators.setCurrentPage(pageNumber); this._pageIndicators.setCurrentPage(pageNumber);
@ -714,7 +716,7 @@ var AllView = GObject.registerClass({
this._items[id].ease({ this._items[id].ease({
opacity, opacity,
duration: INACTIVE_GRID_OPACITY_ANIMATION_TIME, duration: INACTIVE_GRID_OPACITY_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }
@ -783,7 +785,7 @@ var AllView = GObject.registerClass({
_onDragBegin() { _onDragBegin() {
this._dragMonitor = { this._dragMonitor = {
dragMotion: this._onDragMotion.bind(this) dragMotion: this._onDragMotion.bind(this),
}; };
DND.addDragMonitor(this._dragMonitor); DND.addDragMonitor(this._dragMonitor);
} }
@ -865,7 +867,7 @@ var AllView = GObject.registerClass({
let newFolderPath = this._folderSettings.path.concat('folders/', newFolderId, '/'); let newFolderPath = this._folderSettings.path.concat('folders/', newFolderId, '/');
let newFolderSettings = new Gio.Settings({ let newFolderSettings = new Gio.Settings({
schema_id: 'org.gnome.desktop.app-folders.folder', schema_id: 'org.gnome.desktop.app-folders.folder',
path: newFolderPath path: newFolderPath,
}); });
if (!newFolderSettings) { if (!newFolderSettings) {
log('Error creating new folder'); log('Error creating new folder');
@ -893,7 +895,7 @@ class FrequentView extends BaseAppView {
style_class: 'frequent-apps', style_class: 'frequent-apps',
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
x_expand: true, x_expand: true,
y_expand: true y_expand: true,
}, { fillParent: true }); }, { fillParent: true });
this._noFrequentAppsLabel = new St.Label({ text: _("Frequently used applications will appear here"), this._noFrequentAppsLabel = new St.Label({ text: _("Frequently used applications will appear here"),
@ -969,7 +971,7 @@ class FrequentView extends BaseAppView {
var Views = { var Views = {
FREQUENT: 0, FREQUENT: 0,
ALL: 1 ALL: 1,
}; };
var ControlsBoxLayout = GObject.registerClass( var ControlsBoxLayout = GObject.registerClass(
@ -1016,7 +1018,7 @@ class AppDisplay extends St.BoxLayout {
style_class: 'app-display', style_class: 'app-display',
vertical: true, vertical: true,
x_expand: true, x_expand: true,
y_expand: true y_expand: true,
}); });
this._privacySettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.privacy' }); this._privacySettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.privacy' });
@ -1128,7 +1130,7 @@ class AppDisplay extends St.BoxLayout {
this._controls.ease({ this._controls.ease({
opacity: finalOpacity, opacity: finalOpacity,
duration: IconGrid.ANIMATION_TIME_IN, duration: IconGrid.ANIMATION_TIME_IN,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
}); });
currentView.animate(animationDirection, onComplete); currentView.animate(animationDirection, onComplete);
@ -1256,7 +1258,7 @@ class FolderView extends BaseAppView {
super._init({ super._init({
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
x_expand: true, x_expand: true,
y_expand: true y_expand: true,
}); });
// If it not expand, the parent doesn't take into account its preferred_width when allocating // If it not expand, the parent doesn't take into account its preferred_width when allocating
@ -1270,7 +1272,7 @@ class FolderView extends BaseAppView {
this._scrollView = new St.ScrollView({ this._scrollView = new St.ScrollView({
overlay_scrollbars: true, overlay_scrollbars: true,
x_expand: true, x_expand: true,
y_expand: true y_expand: true,
}); });
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC); this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
this.add_actor(this._scrollView); this.add_actor(this._scrollView);
@ -1460,7 +1462,7 @@ var FolderIcon = GObject.registerClass({
Signals: { Signals: {
'apps-changed': {}, 'apps-changed': {},
'name-changed': {}, 'name-changed': {},
} },
}, class FolderIcon extends St.Button { }, class FolderIcon extends St.Button {
_init(id, path, parentView) { _init(id, path, parentView) {
super._init({ super._init({
@ -1481,7 +1483,7 @@ var FolderIcon = GObject.registerClass({
this.icon = new IconGrid.BaseIcon('', { this.icon = new IconGrid.BaseIcon('', {
createIcon: this._createIcon.bind(this), createIcon: this._createIcon.bind(this),
setSizeManually: true setSizeManually: true,
}); });
this.set_child(this.icon); this.set_child(this.icon);
this.label_actor = this.icon.label; this.label_actor = this.icon.label;
@ -1880,7 +1882,7 @@ Signals.addSignalMethods(RenameFolderMenu.prototype);
var AppFolderPopup = GObject.registerClass({ var AppFolderPopup = GObject.registerClass({
Signals: { Signals: {
'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] }, 'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
} },
}, class AppFolderPopup extends St.Widget { }, class AppFolderPopup extends St.Widget {
_init(source, side) { _init(source, side) {
super._init({ super._init({
@ -1895,7 +1897,7 @@ var AppFolderPopup = GObject.registerClass({
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
x_align: Clutter.ActorAlign.CENTER, x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.START y_align: Clutter.ActorAlign.START,
}); });
this._source = source; this._source = source;
this._view = source.view; this._view = source.view;
@ -1904,9 +1906,10 @@ var AppFolderPopup = GObject.registerClass({
this._isOpen = false; this._isOpen = false;
this.parentOffset = 0; this.parentOffset = 0;
this._boxPointer = new BoxPointer.BoxPointer(this._arrowSide, this._boxPointer = new BoxPointer.BoxPointer(this._arrowSide, {
{ style_class: 'app-folder-popup-bin', style_class: 'app-folder-popup-bin',
x_expand: true, }); x_expand: true,
});
this._boxPointer.style_class = 'app-folder-popup'; this._boxPointer.style_class = 'app-folder-popup';
this.add_actor(this._boxPointer); this.add_actor(this._boxPointer);
@ -1922,7 +1925,7 @@ var AppFolderPopup = GObject.registerClass({
global.focus_manager.add_group(this); global.focus_manager.add_group(this);
this._grabHelper = new GrabHelper.GrabHelper(this, { this._grabHelper = new GrabHelper.GrabHelper(this, {
actionMode: Shell.ActionMode.POPUP actionMode: Shell.ActionMode.POPUP,
}); });
this._grabHelper.addActor(Main.layoutManager.overviewGroup); this._grabHelper.addActor(Main.layoutManager.overviewGroup);
this.connect('destroy', this._onDestroy.bind(this)); this.connect('destroy', this._onDestroy.bind(this));
@ -2049,7 +2052,7 @@ var AppIcon = GObject.registerClass({
Signals: { Signals: {
'menu-state-changed': { param_types: [GObject.TYPE_BOOLEAN] }, 'menu-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
'sync-tooltip': {}, 'sync-tooltip': {},
} },
}, class AppIcon extends St.Button { }, class AppIcon extends St.Button {
_init(app, iconParams = {}) { _init(app, iconParams = {}) {
super._init({ super._init({
@ -2304,7 +2307,7 @@ var AppIcon = GObject.registerClass({
scale_y: 1, scale_y: 1,
duration: APP_ICON_SCALE_IN_TIME, duration: APP_ICON_SCALE_IN_TIME,
delay: APP_ICON_SCALE_IN_DELAY, delay: APP_ICON_SCALE_IN_DELAY,
mode: Clutter.AnimationMode.EASE_OUT_QUINT mode: Clutter.AnimationMode.EASE_OUT_QUINT,
}); });
} }
@ -2337,7 +2340,7 @@ var AppIcon = GObject.registerClass({
this.ease({ this.ease({
scale_x: 0.75, scale_x: 0.75,
scale_y: 0.75, scale_y: 0.75,
opacity: 128 opacity: 128,
}); });
} }
@ -2346,7 +2349,7 @@ var AppIcon = GObject.registerClass({
this.ease({ this.ease({
scale_x: 1.0, scale_x: 1.0,
scale_y: 1.0, scale_y: 1.0,
opacity: 255 opacity: 255,
}); });
} }
@ -2354,7 +2357,7 @@ var AppIcon = GObject.registerClass({
this.icon.label.opacity = 0; this.icon.label.opacity = 0;
this.icon.icon.ease({ this.icon.icon.ease({
scale_x: FOLDER_SUBICON_FRACTION, scale_x: FOLDER_SUBICON_FRACTION,
scale_y: FOLDER_SUBICON_FRACTION scale_y: FOLDER_SUBICON_FRACTION,
}); });
} }
@ -2362,7 +2365,7 @@ var AppIcon = GObject.registerClass({
this.icon.label.opacity = 255; this.icon.label.opacity = 255;
this.icon.icon.ease({ this.icon.icon.ease({
scale_x: 1.0, scale_x: 1.0,
scale_y: 1.0 scale_y: 1.0,
}); });
} }

View File

@ -9,13 +9,13 @@ const { loadInterfaceXML } = imports.misc.fileUtils;
var AudioDevice = { var AudioDevice = {
HEADPHONES: 1 << 0, HEADPHONES: 1 << 0,
HEADSET: 1 << 1, HEADSET: 1 << 1,
MICROPHONE: 1 << 2 MICROPHONE: 1 << 2,
}; };
const AudioDeviceSelectionIface = loadInterfaceXML('org.gnome.Shell.AudioDeviceSelection'); const AudioDeviceSelectionIface = loadInterfaceXML('org.gnome.Shell.AudioDeviceSelection');
var AudioDeviceSelectionDialog = GObject.registerClass({ var AudioDeviceSelectionDialog = GObject.registerClass({
Signals: { 'device-selected': { param_types: [GObject.TYPE_UINT] } } Signals: { 'device-selected': { param_types: [GObject.TYPE_UINT] } },
}, class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog { }, class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog {
_init(devices) { _init(devices) {
super._init({ styleClass: 'audio-device-selection-dialog' }); super._init({ styleClass: 'audio-device-selection-dialog' });

View File

@ -222,7 +222,7 @@ function getBackgroundCache() {
} }
var Background = GObject.registerClass({ var Background = GObject.registerClass({
Signals: { 'loaded': {}, 'bg-changed': {} } Signals: { 'loaded': {}, 'bg-changed': {} },
}, class Background extends Meta.Background { }, class Background extends Meta.Background {
_init(params) { _init(params) {
params = Params.parse(params, { monitorIndex: 0, params = Params.parse(params, { monitorIndex: 0,
@ -456,7 +456,7 @@ var Background = GObject.registerClass({
this._updateAnimation(); this._updateAnimation();
this._watchFile(file); this._watchFile(file);
} },
}); });
} }
@ -500,7 +500,7 @@ var Background = GObject.registerClass({
let _systemBackground; let _systemBackground;
var SystemBackground = GObject.registerClass({ var SystemBackground = GObject.registerClass({
Signals: { 'loaded': {} } Signals: { 'loaded': {} },
}, class SystemBackground extends Meta.BackgroundActor { }, class SystemBackground extends Meta.BackgroundActor {
_init() { _init() {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png'); let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/noise-texture.png');
@ -514,7 +514,7 @@ var SystemBackground = GObject.registerClass({
super._init({ super._init({
meta_display: global.display, meta_display: global.display,
monitor: 0, monitor: 0,
background: _systemBackground background: _systemBackground,
}); });
let cache = Meta.BackgroundImageCache.get_default(); let cache = Meta.BackgroundImageCache.get_default();
@ -596,7 +596,7 @@ var BackgroundSource = class BackgroundSource {
layoutManager: this._layoutManager, layoutManager: this._layoutManager,
settings: this._settings, settings: this._settings,
file, file,
style style,
}); });
background._changedId = background.connect('bg-changed', () => { background._changedId = background.connect('bg-changed', () => {
@ -713,7 +713,7 @@ var BackgroundManager = class BackgroundManager {
opacity: 0, opacity: 0,
duration: FADE_ANIMATION_TIME, duration: FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => oldBackgroundActor.destroy() onComplete: () => oldBackgroundActor.destroy(),
}); });
} }

View File

@ -16,8 +16,8 @@ var BarLevel = GObject.registerClass({
'overdrive-start': GObject.ParamSpec.double( 'overdrive-start': GObject.ParamSpec.double(
'overdrive-start', 'overdrive-start', 'overdrive-start', 'overdrive-start', 'overdrive-start', 'overdrive-start',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
1, 2, 1) 1, 2, 1),
} },
}, class BarLevel extends St.DrawingArea { }, class BarLevel extends St.DrawingArea {
_init(params) { _init(params) {
this._maxValue = 1; this._maxValue = 1;
@ -27,7 +27,7 @@ var BarLevel = GObject.registerClass({
let defaultParams = { let defaultParams = {
style_class: 'barlevel', style_class: 'barlevel',
accessible_role: Atk.Role.LEVEL_BAR accessible_role: Atk.Role.LEVEL_BAR,
}; };
super._init(Object.assign(defaultParams, params)); super._init(Object.assign(defaultParams, params));
this.connect('allocation-changed', (actor, box) => { this.connect('allocation-changed', (actor, box) => {

View File

@ -108,7 +108,7 @@ var BoxPointer = GObject.registerClass({
this._muteInput = false; this._muteInput = false;
if (onComplete) if (onComplete)
onComplete(); onComplete();
} },
}); });
} }
@ -156,7 +156,7 @@ var BoxPointer = GObject.registerClass({
this.translation_y = 0; this.translation_y = 0;
if (onComplete) if (onComplete)
onComplete(); onComplete();
} },
}); });
} }

View File

@ -78,7 +78,7 @@ function _getCalendarDayAbbreviation(dayNumber) {
/* Translators: Calendar grid abbreviation for Friday */ /* Translators: Calendar grid abbreviation for Friday */
NC_("grid friday", "F"), NC_("grid friday", "F"),
/* Translators: Calendar grid abbreviation for Saturday */ /* Translators: Calendar grid abbreviation for Saturday */
NC_("grid saturday", "S") NC_("grid saturday", "S"),
]; ];
return Shell.util_translate_time_string(abbreviations[dayNumber]); return Shell.util_translate_time_string(abbreviations[dayNumber]);
} }
@ -110,7 +110,7 @@ var EventSourceBase = GObject.registerClass({
GObject.ParamFlags.READABLE, GObject.ParamFlags.READABLE,
false), false),
}, },
Signals: { 'changed': {} } Signals: { 'changed': {} },
}, class EventSourceBase extends GObject.Object { }, class EventSourceBase extends GObject.Object {
get isLoading() { get isLoading() {
throw new GObject.NotImplementedError(`isLoading in ${this.constructor.name}`); throw new GObject.NotImplementedError(`isLoading in ${this.constructor.name}`);
@ -352,7 +352,7 @@ class DBusEventSource extends EventSourceBase {
}); });
var Calendar = GObject.registerClass({ var 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 { }, class Calendar extends St.Widget {
_init() { _init() {
this._weekStart = Shell.util_get_week_start(); this._weekStart = Shell.util_get_week_start();
@ -387,7 +387,7 @@ var Calendar = GObject.registerClass({
super._init({ super._init({
style_class: 'calendar', style_class: 'calendar',
layout_manager: new Clutter.GridLayout(), layout_manager: new Clutter.GridLayout(),
reactive: true reactive: true,
}); });
this._buildHeader(); this._buildHeader();
@ -962,7 +962,7 @@ class NotificationTimeLabel extends St.Label {
super._init({ super._init({
style_class: 'event-time', style_class: 'event-time',
x_align: Clutter.ActorAlign.START, x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.END y_align: Clutter.ActorAlign.END,
}); });
this._datetime = datetime; this._datetime = datetime;
} }
@ -1109,7 +1109,7 @@ class CalendarMessageList extends St.Widget {
style_class: 'message-list', style_class: 'message-list',
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
x_expand: true, x_expand: true,
y_expand: true y_expand: true,
}); });
this._placeholder = new Placeholder(); this._placeholder = new Placeholder();
@ -1119,9 +1119,11 @@ class CalendarMessageList extends St.Widget {
x_expand: true, y_expand: true }); x_expand: true, y_expand: true });
this.add_actor(box); this.add_actor(box);
this._scrollView = new St.ScrollView({ style_class: 'vfade', this._scrollView = new St.ScrollView({
overlay_scrollbars: true, style_class: 'vfade',
x_expand: true, y_expand: true, }); overlay_scrollbars: true,
x_expand: true, y_expand: true,
});
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC); this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
box.add_actor(this._scrollView); box.add_actor(this._scrollView);

View File

@ -13,7 +13,7 @@ var ALIVE_TIMEOUT = 5000;
var CloseDialog = GObject.registerClass({ var CloseDialog = GObject.registerClass({
Implements: [Meta.CloseDialog], Implements: [Meta.CloseDialog],
Properties: { Properties: {
'window': GObject.ParamSpec.override('window', Meta.CloseDialog) 'window': GObject.ParamSpec.override('window', Meta.CloseDialog),
}, },
}, class CloseDialog extends GObject.Object { }, class CloseDialog extends GObject.Object {
_init(window) { _init(window) {
@ -170,7 +170,7 @@ var CloseDialog = GObject.registerClass({
scale_y: 1, scale_y: 1,
mode: Clutter.AnimationMode.LINEAR, mode: Clutter.AnimationMode.LINEAR,
duration: DIALOG_TRANSITION_TIME, duration: DIALOG_TRANSITION_TIME,
onComplete: this._onFocusChanged.bind(this) onComplete: this._onFocusChanged.bind(this),
}); });
} }
@ -197,7 +197,7 @@ var CloseDialog = GObject.registerClass({
scale_y: 0, scale_y: 0,
mode: Clutter.AnimationMode.LINEAR, mode: Clutter.AnimationMode.LINEAR,
duration: DIALOG_TRANSITION_TIME, duration: DIALOG_TRANSITION_TIME,
onComplete: () => dialog.destroy() onComplete: () => dialog.destroy(),
}); });
} }

View File

@ -20,7 +20,7 @@ var AutorunSetting = {
RUN: 0, RUN: 0,
IGNORE: 1, IGNORE: 1,
FILES: 2, FILES: 2,
ASK: 3 ASK: 3,
}; };
// misc utils // misc utils

View File

@ -18,7 +18,7 @@ var WORK_SPINNER_ICON_SIZE = 16;
const DELAYED_RESET_TIMEOUT = 200; const DELAYED_RESET_TIMEOUT = 200;
var AuthenticationDialog = GObject.registerClass({ var AuthenticationDialog = GObject.registerClass({
Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } } Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } },
}, class AuthenticationDialog extends ModalDialog.ModalDialog { }, class AuthenticationDialog extends ModalDialog.ModalDialog {
_init(actionId, body, cookie, userNames) { _init(actionId, body, cookie, userNames) {
super._init({ styleClass: 'prompt-dialog' }); super._init({ styleClass: 'prompt-dialog' });

View File

@ -37,7 +37,7 @@ var CHAT_EXPAND_LINES = 12;
var NotificationDirection = { var NotificationDirection = {
SENT: 'chat-sent', SENT: 'chat-sent',
RECEIVED: 'chat-received' RECEIVED: 'chat-received',
}; };
function makeMessageFromTpMessage(tpMessage, direction) { function makeMessageFromTpMessage(tpMessage, direction) {
@ -52,7 +52,7 @@ function makeMessageFromTpMessage(tpMessage, direction) {
text, text,
sender: tpMessage.sender.alias, sender: tpMessage.sender.alias,
timestamp, timestamp,
direction direction,
}; };
} }
@ -66,7 +66,7 @@ function makeMessageFromTplEvent(event) {
text: event.get_message(), text: event.get_message(),
sender: event.get_sender().get_alias(), sender: event.get_sender().get_alias(),
timestamp: event.get_timestamp(), timestamp: event.get_timestamp(),
direction direction,
}; };
} }
@ -635,7 +635,7 @@ var ChatNotification = HAVE_TP ? GObject.registerClass({
'message-removed': { param_types: [Tp.Message.$gtype] }, 'message-removed': { param_types: [Tp.Message.$gtype] },
'message-added': { param_types: [Tp.Message.$gtype] }, 'message-added': { param_types: [Tp.Message.$gtype] },
'timestamp-changed': { param_types: [Tp.Message.$gtype] }, 'timestamp-changed': { param_types: [Tp.Message.$gtype] },
} },
}, class ChatNotification extends MessageTray.Notification { }, class ChatNotification extends MessageTray.Notification {
_init(source) { _init(source) {
super._init(source, source.title, null, super._init(source, source.title, null,

View File

@ -12,7 +12,7 @@ var POPUP_APPICON_SIZE = 96;
var SortGroup = { var SortGroup = {
TOP: 0, TOP: 0,
MIDDLE: 1, MIDDLE: 1,
BOTTOM: 2 BOTTOM: 2,
}; };
var CtrlAltTabManager = class CtrlAltTabManager { var CtrlAltTabManager = class CtrlAltTabManager {

View File

@ -27,7 +27,7 @@ class DashIcon extends AppDisplay.AppIcon {
_init(app) { _init(app) {
super._init(app, { super._init(app, {
setSizeManually: true, setSizeManually: true,
showLabel: false showLabel: false,
}); });
} }
@ -125,7 +125,7 @@ class DashItemContainer extends St.Widget {
this.label.ease({ this.label.ease({
opacity: 255, opacity: 255,
duration: DASH_ITEM_LABEL_SHOW_TIME, duration: DASH_ITEM_LABEL_SHOW_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -139,7 +139,7 @@ class DashItemContainer extends St.Widget {
opacity: 0, opacity: 0,
duration: DASH_ITEM_LABEL_HIDE_TIME, duration: DASH_ITEM_LABEL_HIDE_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this.label.hide() onComplete: () => this.label.hide(),
}); });
} }
@ -163,7 +163,7 @@ class DashItemContainer extends St.Widget {
scale_y: 1, scale_y: 1,
opacity: 255, opacity: 255,
duration: time, duration: time,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -182,7 +182,7 @@ class DashItemContainer extends St.Widget {
opacity: 0, opacity: 0,
duration: DASH_ANIMATION_TIME, duration: DASH_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this.destroy() onComplete: () => this.destroy(),
}); });
} }
}); });
@ -334,7 +334,7 @@ class DashActor extends St.Widget {
const baseIconSizes = [16, 22, 24, 32, 48, 64]; const baseIconSizes = [16, 22, 24, 32, 48, 64];
var Dash = GObject.registerClass({ var Dash = GObject.registerClass({
Signals: { 'icon-size-changed': {} } Signals: { 'icon-size-changed': {} },
}, class Dash extends St.Bin { }, class Dash extends St.Bin {
_init() { _init() {
this._maxHeight = -1; this._maxHeight = -1;
@ -397,7 +397,7 @@ var Dash = GObject.registerClass({
_onDragBegin() { _onDragBegin() {
this._dragCancelled = false; this._dragCancelled = false;
this._dragMonitor = { this._dragMonitor = {
dragMotion: this._onDragMotion.bind(this) dragMotion: this._onDragMotion.bind(this),
}; };
DND.addDragMonitor(this._dragMonitor); DND.addDragMonitor(this._dragMonitor);
@ -629,7 +629,7 @@ var Dash = GObject.registerClass({
width: targetWidth, width: targetWidth,
height: targetHeight, height: targetHeight,
duration: DASH_ANIMATION_TIME, duration: DASH_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }

View File

@ -39,7 +39,7 @@ class TodayButton extends St.Button {
style_class: 'datemenu-today-button', style_class: 'datemenu-today-button',
x_expand: true, x_expand: true,
can_focus: true, can_focus: true,
reactive: false reactive: false,
}); });
let hbox = new St.BoxLayout({ vertical: true }); let hbox = new St.BoxLayout({ vertical: true });
@ -115,7 +115,7 @@ class WorldClocksSection extends St.Button {
Gio.DBusProxyFlags.DO_NOT_AUTO_START | Gio.DBusProxyFlags.GET_INVALIDATED_PROPERTIES); Gio.DBusProxyFlags.DO_NOT_AUTO_START | Gio.DBusProxyFlags.GET_INVALIDATED_PROPERTIES);
this._settings = new Gio.Settings({ this._settings = new Gio.Settings({
schema_id: 'org.gnome.shell.world-clocks' schema_id: 'org.gnome.shell.world-clocks',
}); });
this._settings.connect('changed', this._clocksChanged.bind(this)); this._settings.connect('changed', this._clocksChanged.bind(this));
this._clocksChanged(); this._clocksChanged();
@ -335,7 +335,7 @@ class WeatherSection extends St.Button {
infos.forEach(fc => { infos.forEach(fc => {
let [ok_, timestamp] = fc.get_value_update(); let [ok_, timestamp] = fc.get_value_update();
let timeStr = Util.formatTime(new Date(timestamp * 1000), { let timeStr = Util.formatTime(new Date(timestamp * 1000), {
timeOnly: true timeOnly: true,
}); });
let icon = new St.Icon({ style_class: 'weather-forecast-icon', let icon = new St.Icon({ style_class: 'weather-forecast-icon',
@ -409,7 +409,7 @@ class MessagesIndicator extends St.Icon {
icon_size: 16, icon_size: 16,
visible: false, visible: false,
y_expand: true, y_expand: true,
y_align: Clutter.ActorAlign.CENTER y_align: Clutter.ActorAlign.CENTER,
}); });
this._sources = []; this._sources = [];

View File

@ -159,8 +159,8 @@ var MessageDialogContent = GObject.registerClass({
'body': GObject.ParamSpec.string('body', 'body', 'body', 'body': GObject.ParamSpec.string('body', 'body', 'body',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT, GObject.ParamFlags.CONSTRUCT,
null) null),
} },
}, class MessageDialogContent extends St.BoxLayout { }, class MessageDialogContent extends St.BoxLayout {
_init(params) { _init(params) {
this._icon = new St.Icon({ y_align: Clutter.ActorAlign.START }); this._icon = new St.Icon({ y_align: Clutter.ActorAlign.START });
@ -211,7 +211,7 @@ var MessageDialogContent = GObject.registerClass({
set icon(icon) { set icon(icon) {
this._icon.set({ this._icon.set({
gicon: icon, gicon: icon,
visible: icon != null visible: icon != null,
}); });
this.notify('icon'); this.notify('icon');
} }
@ -231,7 +231,7 @@ var MessageDialogContent = GObject.registerClass({
_setLabel(label, prop, value) { _setLabel(label, prop, value) {
label.set({ label.set({
text: value || '', text: value || '',
visible: value != null visible: value != null,
}); });
this.notify(prop); this.notify(prop);
} }

View File

@ -18,7 +18,7 @@ var DragMotionResult = {
NO_DROP: 0, NO_DROP: 0,
COPY_DROP: 1, COPY_DROP: 1,
MOVE_DROP: 2, MOVE_DROP: 2,
CONTINUE: 3 CONTINUE: 3,
}; };
var DragState = { var DragState = {
@ -30,13 +30,13 @@ var DragState = {
var DRAG_CURSOR_MAP = { var DRAG_CURSOR_MAP = {
0: Meta.Cursor.DND_UNSUPPORTED_TARGET, 0: Meta.Cursor.DND_UNSUPPORTED_TARGET,
1: Meta.Cursor.DND_COPY, 1: Meta.Cursor.DND_COPY,
2: Meta.Cursor.DND_MOVE 2: Meta.Cursor.DND_MOVE,
}; };
var DragDropResult = { var DragDropResult = {
FAILURE: 0, FAILURE: 0,
SUCCESS: 1, SUCCESS: 1,
CONTINUE: 2 CONTINUE: 2,
}; };
var dragMonitors = []; var dragMonitors = [];
@ -428,7 +428,7 @@ var _Draggable = class _Draggable {
scale_x: scale * origScale, scale_x: scale * origScale,
scale_y: scale * origScale, scale_y: scale * origScale,
duration: SCALE_ANIMATION_TIME, duration: SCALE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
this._dragActor.get_transition('scale-x').connect('new-frame', () => { this._dragActor.get_transition('scale-x').connect('new-frame', () => {
@ -473,7 +473,7 @@ var _Draggable = class _Draggable {
y: this._dragY, y: this._dragY,
dragActor: this._dragActor, dragActor: this._dragActor,
source: this.actor._delegate, source: this.actor._delegate,
targetActor: target targetActor: target,
}; };
let targetActorDestroyHandlerId; let targetActorDestroyHandlerId;
@ -552,7 +552,7 @@ var _Draggable = class _Draggable {
let dropEvent = { let dropEvent = {
dropActor: this._dragActor, dropActor: this._dragActor,
targetActor: target, targetActor: target,
clutterEvent: event clutterEvent: event,
}; };
for (let i = 0; i < dragMonitors.length; i++) { for (let i = 0; i < dragMonitors.length; i++) {
let dropFunc = dragMonitors[i].dragDrop; let dropFunc = dragMonitors[i].dragDrop;
@ -665,7 +665,7 @@ var _Draggable = class _Draggable {
y: snapBackY, y: snapBackY,
scale_x: snapBackScale, scale_x: snapBackScale,
scale_y: snapBackScale, scale_y: snapBackScale,
duration: SNAP_BACK_ANIMATION_TIME duration: SNAP_BACK_ANIMATION_TIME,
}); });
} }
@ -679,7 +679,7 @@ var _Draggable = class _Draggable {
this._dragActor.opacity = 0; this._dragActor.opacity = 0;
this._animateDragEnd(eventTime, { this._animateDragEnd(eventTime, {
duration: REVERT_ANIMATION_TIME duration: REVERT_ANIMATION_TIME,
}); });
} }
@ -692,7 +692,7 @@ var _Draggable = class _Draggable {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this._onAnimationComplete(this._dragActor, eventTime); this._onAnimationComplete(this._dragActor, eventTime);
} },
})); }));
} }

View File

@ -128,7 +128,7 @@ const DialogType = {
SHUTDOWN: 1 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_SHUTDOWN */, SHUTDOWN: 1 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_SHUTDOWN */,
RESTART: 2 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_RESTART */, RESTART: 2 /* GSM_SHELL_END_SESSION_DIALOG_TYPE_RESTART */,
UPDATE_RESTART: 3, UPDATE_RESTART: 3,
UPGRADE_RESTART: 4 UPGRADE_RESTART: 4,
}; };
const DialogContent = { const DialogContent = {
@ -136,7 +136,7 @@ const DialogContent = {
1 /* DialogType.SHUTDOWN */: shutdownDialogContent, 1 /* DialogType.SHUTDOWN */: shutdownDialogContent,
2 /* DialogType.RESTART */: restartDialogContent, 2 /* DialogType.RESTART */: restartDialogContent,
3 /* DialogType.UPDATE_RESTART */: restartUpdateDialogContent, 3 /* DialogType.UPDATE_RESTART */: restartUpdateDialogContent,
4 /* DialogType.UPGRADE_RESTART */: restartUpgradeDialogContent 4 /* DialogType.UPGRADE_RESTART */: restartUpgradeDialogContent,
}; };
var MAX_USERS_IN_SESSION_DIALOG = 5; var MAX_USERS_IN_SESSION_DIALOG = 5;

View File

@ -269,7 +269,7 @@ function init() {
let { stack } = new Error(); let { stack } = new Error();
log(`Usage of object.actor is deprecated for ${klass}\n${stack}`); log(`Usage of object.actor is deprecated for ${klass}\n${stack}`);
return this; return this;
} },
}); });
St.set_slow_down_factor = function (factor) { St.set_slow_down_factor = function (factor) {

View File

@ -199,8 +199,8 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog {
let content = new Dialog.MessageDialogContent({ let content = new Dialog.MessageDialogContent({
title: _("Download and install “%s” from extensions.gnome.org?").format(info.name), title: _("Download and install “%s” from extensions.gnome.org?").format(info.name),
icon: new Gio.FileIcon({ icon: new Gio.FileIcon({
file: Gio.File.new_for_uri(`${REPOSITORY_URL_BASE}${info.icon}`) file: Gio.File.new_for_uri(`${REPOSITORY_URL_BASE}${info.icon}`),
}) }),
}); });
this.contentLayout.add(content); this.contentLayout.add(content);

View File

@ -236,7 +236,7 @@ var ExtensionManager = class {
path: dir.get_path(), path: dir.get_path(),
error: '', error: '',
hasPrefs: dir.get_child('prefs.js').query_exists(null), hasPrefs: dir.get_child('prefs.js').query_exists(null),
canChange: false canChange: false,
}; };
this._extensions.set(uuid, extension); this._extensions.set(uuid, extension);

View File

@ -20,13 +20,13 @@ var CandidateArea = GObject.registerClass({
'cursor-up': {}, 'cursor-up': {},
'next-page': {}, 'next-page': {},
'previous-page': {}, 'previous-page': {},
} },
}, class CandidateArea extends St.BoxLayout { }, class CandidateArea extends St.BoxLayout {
_init() { _init() {
super._init({ super._init({
vertical: true, vertical: true,
reactive: true, reactive: true,
visible: false visible: false,
}); });
this._candidateBoxes = []; this._candidateBoxes = [];
for (let i = 0; i < MAX_CANDIDATES_PER_PAGE; ++i) { for (let i = 0; i < MAX_CANDIDATES_PER_PAGE; ++i) {

View File

@ -22,7 +22,7 @@ var ANIMATION_BOUNCE_ICON_SCALE = 1.1;
var AnimationDirection = { var AnimationDirection = {
IN: 0, IN: 0,
OUT: 1 OUT: 1,
}; };
var APPICON_ANIMATION_OUT_SCALE = 3; var APPICON_ANIMATION_OUT_SCALE = 3;
@ -59,7 +59,7 @@ class BaseIcon extends St.Bin {
this.label = new St.Label({ text: label }); this.label = new St.Label({ text: label });
this.label.clutter_text.set({ this.label.clutter_text.set({
x_align: Clutter.ActorAlign.CENTER, x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER y_align: Clutter.ActorAlign.CENTER,
}); });
this._box.add_actor(this.label); this._box.add_actor(this.label);
} else { } else {
@ -190,7 +190,7 @@ function zoomOutActorAtPos(actor, x, y) {
opacity: 0, opacity: 0,
duration: APPICON_ANIMATION_OUT_TIME, duration: APPICON_ANIMATION_OUT_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => actorClone.destroy() onComplete: () => actorClone.destroy(),
}); });
} }
@ -500,9 +500,9 @@ var IconGrid = GObject.registerClass({
if (isLastItem) if (isLastItem)
this._animationDone(); this._animationDone();
actor.reactive = true; actor.reactive = true;
} },
}); });
} },
}); });
} }
} }
@ -569,7 +569,7 @@ var IconGrid = GObject.registerClass({
scale_y: 1, scale_y: 1,
duration: ANIMATION_TIME_IN, duration: ANIMATION_TIME_IN,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD, mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
delay delay,
}; };
if (isLastItem) if (isLastItem)
@ -579,7 +579,7 @@ var IconGrid = GObject.registerClass({
opacity: 255, opacity: 255,
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM, duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD, mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
delay delay,
}; };
} else { } else {
let isLastItem = actor._distance == maxDist; let isLastItem = actor._distance == maxDist;
@ -595,7 +595,7 @@ var IconGrid = GObject.registerClass({
scale_y: scaleY, scale_y: scaleY,
duration: ANIMATION_TIME_OUT, duration: ANIMATION_TIME_OUT,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD, mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
delay delay,
}; };
if (isLastItem) if (isLastItem)
@ -605,7 +605,7 @@ var IconGrid = GObject.registerClass({
opacity: 0, opacity: 0,
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM, duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD, mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM,
}; };
} }
@ -1019,7 +1019,7 @@ var PaginatedIconGrid = GObject.registerClass({
let params = { let params = {
translation_y: translationY, translation_y: translationY,
duration: EXTRA_SPACE_ANIMATION_TIME, duration: EXTRA_SPACE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
}; };
if (i == (children.length - 1)) if (i == (children.length - 1))
params.onComplete = () => this.emit('space-opened'); params.onComplete = () => this.emit('space-opened');
@ -1040,7 +1040,7 @@ var PaginatedIconGrid = GObject.registerClass({
translation_y: 0, translation_y: 0,
duration: EXTRA_SPACE_ANIMATION_TIME, duration: EXTRA_SPACE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD, mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
onComplete: () => this.emit('space-closed') onComplete: () => this.emit('space-closed'),
}); });
} }
} }

View File

@ -18,8 +18,8 @@ var DialogResponse = Meta.InhibitShortcutsDialogResponse;
var InhibitShortcutsDialog = GObject.registerClass({ var InhibitShortcutsDialog = GObject.registerClass({
Implements: [Meta.InhibitShortcutsDialog], Implements: [Meta.InhibitShortcutsDialog],
Properties: { Properties: {
'window': GObject.ParamSpec.override('window', Meta.InhibitShortcutsDialog) 'window': GObject.ParamSpec.override('window', Meta.InhibitShortcutsDialog),
} },
}, class InhibitShortcutsDialog extends GObject.Object { }, class InhibitShortcutsDialog extends GObject.Object {
_init(window) { _init(window) {
super._init(); super._init();

View File

@ -92,7 +92,7 @@ class KeyContainer extends St.Widget {
super._init({ super._init({
layout_manager: gridLayout, layout_manager: gridLayout,
x_expand: true, x_expand: true,
y_expand: true y_expand: true,
}); });
this._gridLayout = gridLayout; this._gridLayout = gridLayout;
this._currentRow = 0; this._currentRow = 0;
@ -120,7 +120,7 @@ class KeyContainer extends St.Widget {
left: this._currentCol, left: this._currentCol,
top: this._currentRow, top: this._currentRow,
width, width,
height height,
}; };
let row = this._rows[this._rows.length - 1]; let row = this._rows[this._rows.length - 1];
@ -255,7 +255,7 @@ var Key = GObject.registerClass({
'long-press': {}, 'long-press': {},
'pressed': { param_types: [GObject.TYPE_UINT, GObject.TYPE_STRING] }, 'pressed': { param_types: [GObject.TYPE_UINT, GObject.TYPE_STRING] },
'released': { param_types: [GObject.TYPE_UINT, GObject.TYPE_STRING] }, 'released': { param_types: [GObject.TYPE_UINT, GObject.TYPE_STRING] },
} },
}, class Key extends St.BoxLayout { }, class Key extends St.BoxLayout {
_init(key, extendedKeys) { _init(key, extendedKeys) {
super._init({ style_class: 'key-container' }); super._init({ style_class: 'key-container' });
@ -587,20 +587,20 @@ var EmojiPager = GObject.registerClass({
'delta': GObject.ParamSpec.int( 'delta': GObject.ParamSpec.int(
'delta', 'delta', 'delta', 'delta', 'delta', 'delta',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
GLib.MININT32, GLib.MAXINT32, 0) GLib.MININT32, GLib.MAXINT32, 0),
}, },
Signals: { Signals: {
'emoji': { param_types: [GObject.TYPE_STRING] }, 'emoji': { param_types: [GObject.TYPE_STRING] },
'page-changed': { 'page-changed': {
param_types: [GObject.TYPE_INT, GObject.TYPE_INT, GObject.TYPE_INT] param_types: [GObject.TYPE_INT, GObject.TYPE_INT, GObject.TYPE_INT],
} },
} },
}, class EmojiPager extends St.Widget { }, class EmojiPager extends St.Widget {
_init(sections, nCols, nRows) { _init(sections, nCols, nRows) {
super._init({ super._init({
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
reactive: true, reactive: true,
clip_to_allocation: true clip_to_allocation: true,
}); });
this._sections = sections; this._sections = sections;
this._nCols = nCols; this._nCols = nCols;
@ -728,7 +728,7 @@ var EmojiPager = GObject.registerClass({
duration: time, duration: time,
onComplete: () => { onComplete: () => {
this.setCurrentPage(this.getFollowingPage()); this.setCurrentPage(this.getFollowingPage());
} },
}); });
} }
} }
@ -874,14 +874,14 @@ var EmojiSelection = GObject.registerClass({
'emoji-selected': { param_types: [GObject.TYPE_STRING] }, 'emoji-selected': { param_types: [GObject.TYPE_STRING] },
'close-request': {}, 'close-request': {},
'toggle': {}, 'toggle': {},
} },
}, class EmojiSelection extends St.BoxLayout { }, class EmojiSelection extends St.BoxLayout {
_init() { _init() {
super._init({ super._init({
style_class: 'emoji-panel', style_class: 'emoji-panel',
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
vertical: true vertical: true,
}); });
this._sections = [ this._sections = [
@ -1028,7 +1028,7 @@ var EmojiSelection = GObject.registerClass({
var Keypad = GObject.registerClass({ var Keypad = GObject.registerClass({
Signals: { Signals: {
'keyval': { param_types: [GObject.TYPE_UINT] }, 'keyval': { param_types: [GObject.TYPE_UINT] },
} },
}, class Keypad extends AspectContainer { }, class Keypad extends AspectContainer {
_init() { _init() {
let keys = [ let keys = [
@ -1049,7 +1049,7 @@ var Keypad = GObject.registerClass({
super._init({ super._init({
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
x_expand: true, x_expand: true,
y_expand: true y_expand: true,
}); });
let gridLayout = new Clutter.GridLayout({ orientation: Clutter.Orientation.HORIZONTAL, let gridLayout = new Clutter.GridLayout({ orientation: Clutter.Orientation.HORIZONTAL,
@ -1754,7 +1754,7 @@ class Keyboard extends St.BoxLayout {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this._windowSlideAnimationComplete(window, -deltaY); this._windowSlideAnimationComplete(window, -deltaY);
} },
}); });
} else { } else {
windowActor.ease({ windowActor.ease({
@ -1763,7 +1763,7 @@ class Keyboard extends St.BoxLayout {
mode: Clutter.AnimationMode.EASE_IN_QUAD, mode: Clutter.AnimationMode.EASE_IN_QUAD,
onComplete: () => { onComplete: () => {
this._windowSlideAnimationComplete(window, deltaY); this._windowSlideAnimationComplete(window, deltaY);
} },
}); });
} }
} }

View File

@ -44,7 +44,7 @@ var MonitorConstraint = GObject.registerClass({
'work-area': GObject.ParamSpec.boolean('work-area', 'work-area': GObject.ParamSpec.boolean('work-area',
'Work-area', 'Track monitor\'s work-area', 'Work-area', 'Track monitor\'s work-area',
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
false) false),
}, },
}, class MonitorConstraint extends Clutter.Constraint { }, class MonitorConstraint extends Clutter.Constraint {
_init(props) { _init(props) {
@ -181,7 +181,7 @@ class UiActor extends St.Widget {
const defaultParams = { const defaultParams = {
trackFullscreen: false, trackFullscreen: false,
affectsStruts: false, affectsStruts: false,
affectsInputRegion: true affectsInputRegion: true,
}; };
var LayoutManager = GObject.registerClass({ var LayoutManager = GObject.registerClass({
@ -273,7 +273,7 @@ var LayoutManager = GObject.registerClass({
this._bgManagers = []; this._bgManagers = [];
this._interfaceSettings = new Gio.Settings({ this._interfaceSettings = new Gio.Settings({
schema_id: 'org.gnome.desktop.interface' schema_id: 'org.gnome.desktop.interface',
}); });
this._interfaceSettings.connect('changed::enable-hot-corners', this._interfaceSettings.connect('changed::enable-hot-corners',
@ -463,7 +463,7 @@ var LayoutManager = GObject.registerClass({
backgroundActor.ease({ backgroundActor.ease({
opacity: 255, opacity: 255,
duration: BACKGROUND_FADE_ANIMATION_TIME, duration: BACKGROUND_FADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }
@ -698,7 +698,7 @@ var LayoutManager = GObject.registerClass({
translation_y: 0, translation_y: 0,
duration: STARTUP_ANIMATION_TIME, duration: STARTUP_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._startupAnimationComplete() onComplete: () => this._startupAnimationComplete(),
}); });
} }
@ -709,7 +709,7 @@ var LayoutManager = GObject.registerClass({
opacity: 255, opacity: 255,
duration: STARTUP_ANIMATION_TIME, duration: STARTUP_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._startupAnimationComplete() onComplete: () => this._startupAnimationComplete(),
}); });
} }
@ -743,7 +743,7 @@ var LayoutManager = GObject.registerClass({
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this._showKeyboardComplete(); this._showKeyboardComplete();
} },
}); });
this.emit('keyboard-visible-changed', true); this.emit('keyboard-visible-changed', true);
} }
@ -770,7 +770,7 @@ var LayoutManager = GObject.registerClass({
mode: Clutter.AnimationMode.EASE_IN_QUAD, mode: Clutter.AnimationMode.EASE_IN_QUAD,
onComplete: () => { onComplete: () => {
this._hideKeyboardComplete(); this._hideKeyboardComplete();
} },
}); });
this.emit('keyboard-visible-changed', false); this.emit('keyboard-visible-changed', false);
@ -1188,7 +1188,7 @@ class HotCorner extends Clutter.Actor {
y: this._y, y: this._y,
width: 3, width: 3,
height: 3, height: 3,
reactive: true reactive: true,
}); });
this._corner = new Clutter.Actor({ name: 'hot-corner', this._corner = new Clutter.Actor({ name: 'hot-corner',

View File

@ -33,8 +33,8 @@ var RadialShaderEffect = GObject.registerClass({
'sharpness', 'sharpness', 'sharpness', 'sharpness', 'sharpness', 'sharpness',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
0, 1, 0 0, 1, 0
) ),
} },
}, class RadialShaderEffect extends Shell.GLSLEffect { }, class RadialShaderEffect extends Shell.GLSLEffect {
_init(params) { _init(params) {
this._brightness = undefined; this._brightness = undefined;
@ -109,7 +109,7 @@ var Lightbox = GObject.registerClass({
Properties: { Properties: {
'active': GObject.ParamSpec.boolean( 'active': GObject.ParamSpec.boolean(
'active', 'active', 'active', GObject.ParamFlags.READABLE, false), 'active', 'active', 'active', GObject.ParamFlags.READABLE, false),
} },
}, class Lightbox extends St.Bin { }, class Lightbox extends St.Bin {
_init(container, params) { _init(container, params) {
params = Params.parse(params, { params = Params.parse(params, {
@ -124,7 +124,7 @@ var Lightbox = GObject.registerClass({
reactive: params.inhibitEvents, reactive: params.inhibitEvents,
width: params.width, width: params.width,
height: params.height, height: params.height,
visible: false visible: false,
}); });
this._active = false; this._active = false;
@ -146,7 +146,7 @@ var Lightbox = GObject.registerClass({
if (!params.width || !params.height) { if (!params.width || !params.height) {
this.add_constraint(new Clutter.BindConstraint({ this.add_constraint(new Clutter.BindConstraint({
source: container, source: container,
coordinate: Clutter.BindCoordinate.ALL coordinate: Clutter.BindCoordinate.ALL,
})); }));
} }
@ -187,7 +187,7 @@ var Lightbox = GObject.registerClass({
let easeProps = { let easeProps = {
duration: fadeInTime || 0, duration: fadeInTime || 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}; };
let onComplete = () => { let onComplete = () => {
@ -206,7 +206,7 @@ var Lightbox = GObject.registerClass({
} else { } else {
this.ease(Object.assign(easeProps, { this.ease(Object.assign(easeProps, {
opacity: 255 * this._fadeFactor, opacity: 255 * this._fadeFactor,
onComplete onComplete,
})); }));
} }
} }
@ -219,7 +219,7 @@ var Lightbox = GObject.registerClass({
let easeProps = { let easeProps = {
duration: fadeOutTime || 0, duration: fadeOutTime || 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}; };
let onComplete = () => this.hide(); let onComplete = () => this.hide();

View File

@ -443,7 +443,7 @@ class ObjInspector extends St.ScrollView {
scale_x: 1, scale_x: 1,
scale_y: 1, scale_y: 1,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: 200 duration: 200,
}); });
} else { } else {
this.set_scale(1, 1); this.set_scale(1, 1);
@ -790,7 +790,7 @@ class LookingGlass extends St.BoxLayout {
style_class: 'lg-dialog', style_class: 'lg-dialog',
vertical: true, vertical: true,
visible: false, visible: false,
reactive: true reactive: true,
}); });
this._borderPaintTarget = null; this._borderPaintTarget = null;
@ -994,7 +994,7 @@ class LookingGlass extends St.BoxLayout {
height: naturalHeight, height: naturalHeight,
opacity: 255, opacity: 255,
duration, duration,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }
@ -1011,7 +1011,7 @@ class LookingGlass extends St.BoxLayout {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this._completionActor.hide(); this._completionActor.hide();
} },
}); });
} }
} }
@ -1130,7 +1130,7 @@ class LookingGlass extends St.BoxLayout {
this.ease({ this.ease({
y: this._targetY, y: this._targetY,
duration, duration,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
this._windowList.update(); this._windowList.update();
@ -1156,7 +1156,7 @@ class LookingGlass extends St.BoxLayout {
y: this._hiddenY, y: this._hiddenY,
duration, duration,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this.hide() onComplete: () => this.hide(),
}); });
} }

View File

@ -776,7 +776,7 @@ var ZoomRegion = class ZoomRegion {
x: this._viewPortX, x: this._viewPortX,
y: this._viewPortY, y: this._viewPortY,
width: this._viewPortWidth, width: this._viewPortWidth,
height: this._viewPortHeight height: this._viewPortHeight,
}); });
} else { } else {
this.setScreenPosition(this._screenPosition); this.setScreenPosition(this._screenPosition);
@ -1599,7 +1599,7 @@ class Crosshairs extends Clutter.Actor {
super._init({ super._init({
clip_to_allocation: false, clip_to_allocation: false,
width: groupWidth, width: groupWidth,
height: groupHeight height: groupHeight,
}); });
this._horizLeftHair = new Clutter.Actor(); this._horizLeftHair = new Clutter.Actor();
this._horizRightHair = new Clutter.Actor(); this._horizRightHair = new Clutter.Actor();

View File

@ -258,7 +258,7 @@ function _initializeUI() {
sessionMode.currentMode != 'initial-setup') { sessionMode.currentMode != 'initial-setup') {
GLib.log_structured(LOG_DOMAIN, GLib.LogLevelFlags.LEVEL_MESSAGE, { GLib.log_structured(LOG_DOMAIN, GLib.LogLevelFlags.LEVEL_MESSAGE, {
'MESSAGE': `GNOME Shell started at ${_startDate}`, 'MESSAGE': `GNOME Shell started at ${_startDate}`,
'MESSAGE_ID': GNOMESHELL_STARTED_MESSAGE_ID 'MESSAGE_ID': GNOMESHELL_STARTED_MESSAGE_ID,
}); });
} }
@ -379,7 +379,7 @@ function loadTheme() {
let theme = new St.Theme({ let theme = new St.Theme({
application_stylesheet: _cssStylesheet, application_stylesheet: _cssStylesheet,
default_stylesheet: _defaultCssStylesheet default_stylesheet: _defaultCssStylesheet,
}); });
if (theme.default_stylesheet == null) if (theme.default_stylesheet == null)

View File

@ -39,7 +39,7 @@ class URLHighlighter extends St.Label {
reactive: true, reactive: true,
style_class: 'url-highlighter', style_class: 'url-highlighter',
x_expand: true, x_expand: true,
x_align: Clutter.ActorAlign.START x_align: Clutter.ActorAlign.START,
}); });
this._linkColor = '#ccccff'; this._linkColor = '#ccccff';
this.connect('style-changed', () => { this.connect('style-changed', () => {
@ -213,7 +213,7 @@ var LabelExpanderLayout = GObject.registerClass({
'Expansion of the layout, between 0 (collapsed) ' + 'Expansion of the layout, between 0 (collapsed) ' +
'and 1 (fully expanded', 'and 1 (fully expanded',
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
0, 1, 0) 0, 1, 0),
}, },
}, class LabelExpanderLayout extends Clutter.LayoutManager { }, class LabelExpanderLayout extends Clutter.LayoutManager {
_init(params) { _init(params) {
@ -302,7 +302,7 @@ var Message = GObject.registerClass({
'close': {}, 'close': {},
'expanded': {}, 'expanded': {},
'unexpanded': {}, 'unexpanded': {},
} },
}, class Message extends St.Button { }, class Message extends St.Button {
_init(title, body) { _init(title, body) {
super._init({ super._init({
@ -349,8 +349,10 @@ var Message = GObject.registerClass({
this.setTitle(title); this.setTitle(title);
titleBox.add_actor(this.titleLabel); titleBox.add_actor(this.titleLabel);
this._secondaryBin = new St.Bin({ style_class: 'message-secondary-bin', this._secondaryBin = new St.Bin({
x_expand: true, y_expand: true, }); style_class: 'message-secondary-bin',
x_expand: true, y_expand: true,
});
titleBox.add_actor(this._secondaryBin); titleBox.add_actor(this._secondaryBin);
let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic', let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic',
@ -469,7 +471,7 @@ var Message = GObject.registerClass({
this._actionBin.ease({ this._actionBin.ease({
scale_y: 1, scale_y: 1,
duration: MessageTray.ANIMATION_TIME, duration: MessageTray.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} else { } else {
this._bodyStack.layout_manager.expansion = 1; this._bodyStack.layout_manager.expansion = 1;
@ -493,7 +495,7 @@ var Message = GObject.registerClass({
onComplete: () => { onComplete: () => {
this._actionBin.hide(); this._actionBin.hide();
this.expanded = false; this.expanded = false;
} },
}); });
} else { } else {
this._bodyStack.layout_manager.expansion = 0; this._bodyStack.layout_manager.expansion = 0;
@ -544,14 +546,14 @@ var MessageListSection = GObject.registerClass({
'can-clear-changed': {}, 'can-clear-changed': {},
'empty-changed': {}, 'empty-changed': {},
'message-focused': { param_types: [Message.$gtype] }, 'message-focused': { param_types: [Message.$gtype] },
} },
}, class MessageListSection extends St.BoxLayout { }, class MessageListSection extends St.BoxLayout {
_init() { _init() {
super._init({ super._init({
style_class: 'message-list-section', style_class: 'message-list-section',
clip_to_allocation: true, clip_to_allocation: true,
vertical: true, vertical: true,
x_expand: true x_expand: true,
}); });
this._list = new St.BoxLayout({ style_class: 'message-list-section-list', this._list = new St.BoxLayout({ style_class: 'message-list-section-list',
@ -633,7 +635,7 @@ var MessageListSection = GObject.registerClass({
scale_x: 1, scale_x: 1,
scale_y: 1, scale_y: 1,
duration: MESSAGE_ANIMATION_TIME, duration: MESSAGE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }
@ -655,7 +657,7 @@ var MessageListSection = GObject.registerClass({
scale_x: 1, scale_x: 1,
scale_y: 1, scale_y: 1,
duration: MESSAGE_ANIMATION_TIME, duration: MESSAGE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
}; };
listItem.ease({ listItem.ease({
@ -663,7 +665,7 @@ var MessageListSection = GObject.registerClass({
scale_y: 0, scale_y: 0,
duration: MESSAGE_ANIMATION_TIME, duration: MESSAGE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete onComplete,
}); });
} }
@ -683,7 +685,7 @@ var MessageListSection = GObject.registerClass({
onComplete: () => { onComplete: () => {
listItem.destroy(); listItem.destroy();
global.sync_pointer(); global.sync_pointer();
} },
}); });
} else { } else {
listItem.destroy(); listItem.destroy();
@ -711,7 +713,7 @@ var MessageListSection = GObject.registerClass({
duration: MESSAGE_ANIMATION_TIME, duration: MESSAGE_ANIMATION_TIME,
delay: i * delay, delay: i * delay,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => message.close() onComplete: () => message.close(),
}); });
} }
} }

View File

@ -33,7 +33,7 @@ var State = {
HIDDEN: 0, HIDDEN: 0,
SHOWING: 1, SHOWING: 1,
SHOWN: 2, SHOWN: 2,
HIDING: 3 HIDING: 3,
}; };
// These reasons are useful when we destroy the notifications received through // These reasons are useful when we destroy the notifications received through
@ -47,7 +47,7 @@ var NotificationDestroyedReason = {
EXPIRED: 1, EXPIRED: 1,
DISMISSED: 2, DISMISSED: 2,
SOURCE_CLOSED: 3, SOURCE_CLOSED: 3,
REPLACED: 4 REPLACED: 4,
}; };
// Message tray has its custom Urgency enumeration. LOW, NORMAL and CRITICAL // Message tray has its custom Urgency enumeration. LOW, NORMAL and CRITICAL
@ -58,7 +58,7 @@ var Urgency = {
LOW: 0, LOW: 0,
NORMAL: 1, NORMAL: 1,
HIGH: 2, HIGH: 2,
CRITICAL: 3 CRITICAL: 3,
}; };
// The privacy of the details of a notification. USER is for notifications which // The privacy of the details of a notification. USER is for notifications which
@ -159,7 +159,7 @@ var NotificationPolicy = GObject.registerClass({
'details-in-lock-screen', 'details-in-lock-screen', 'details-in-lock-screen', 'details-in-lock-screen', 'details-in-lock-screen', 'details-in-lock-screen',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
false), false),
} },
}, class NotificationPolicy extends GObject.Object { }, class NotificationPolicy extends GObject.Object {
// Do nothing for the default policy. These methods are only useful for the // Do nothing for the default policy. These methods are only useful for the
// GSettings policy. // GSettings policy.
@ -357,7 +357,7 @@ var Notification = GObject.registerClass({
'activated': {}, 'activated': {},
'destroy': { param_types: [GObject.TYPE_UINT] }, 'destroy': { param_types: [GObject.TYPE_UINT] },
'updated': { param_types: [GObject.TYPE_BOOLEAN] }, 'updated': { param_types: [GObject.TYPE_BOOLEAN] },
} },
}, class Notification extends GObject.Object { }, class Notification extends GObject.Object {
_init(source, title, banner, params) { _init(source, title, banner, params) {
super._init(); super._init();
@ -522,7 +522,7 @@ var NotificationBanner = GObject.registerClass({
Signals: { Signals: {
'done-displaying': {}, 'done-displaying': {},
'unfocused': {}, 'unfocused': {},
} },
}, class NotificationBanner extends Calendar.NotificationMessage { }, class NotificationBanner extends Calendar.NotificationMessage {
_init(notification) { _init(notification) {
super._init(notification); super._init(notification);
@ -747,7 +747,7 @@ var Source = GObject.registerClass({
'icon-updated': {}, 'icon-updated': {},
'notification-added': { param_types: [Notification.$gtype] }, 'notification-added': { param_types: [Notification.$gtype] },
'notification-show': { param_types: [Notification.$gtype] }, 'notification-show': { param_types: [Notification.$gtype] },
} },
}, class Source extends GObject.Object { }, class Source extends GObject.Object {
_init(title, iconName) { _init(title, iconName) {
super._init({ title }); super._init({ title });
@ -912,13 +912,13 @@ var MessageTray = GObject.registerClass({
'queue-changed': {}, 'queue-changed': {},
'source-added': { param_types: [Source.$gtype] }, 'source-added': { param_types: [Source.$gtype] },
'source-removed': { param_types: [Source.$gtype] }, 'source-removed': { param_types: [Source.$gtype] },
} },
}, class MessageTray extends St.Widget { }, class MessageTray extends St.Widget {
_init() { _init() {
super._init({ super._init({
visible: false, visible: false,
clip_to_allocation: true, clip_to_allocation: true,
layout_manager: new Clutter.BinLayout() layout_manager: new Clutter.BinLayout(),
}); });
this._presence = new GnomeSession.Presence((proxy, _error) => { this._presence = new GnomeSession.Presence((proxy, _error) => {
@ -1414,7 +1414,7 @@ var MessageTray = GObject.registerClass({
this._bannerBin.ease({ this._bannerBin.ease({
opacity: 255, opacity: 255,
duration: ANIMATION_TIME, duration: ANIMATION_TIME,
mode: Clutter.AnimationMode.LINEAR mode: Clutter.AnimationMode.LINEAR,
}); });
this._bannerBin.ease({ this._bannerBin.ease({
y: 0, y: 0,
@ -1424,7 +1424,7 @@ var MessageTray = GObject.registerClass({
this._notificationState = State.SHOWN; this._notificationState = State.SHOWN;
this._showNotificationCompleted(); this._showNotificationCompleted();
this._updateState(); this._updateState();
} },
}); });
} }
@ -1490,7 +1490,7 @@ var MessageTray = GObject.registerClass({
this._bannerBin.ease({ this._bannerBin.ease({
opacity: 0, opacity: 0,
duration: ANIMATION_TIME, duration: ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_BACK mode: Clutter.AnimationMode.EASE_OUT_BACK,
}); });
this._bannerBin.ease({ this._bannerBin.ease({
y: -this._bannerBin.height, y: -this._bannerBin.height,
@ -1500,7 +1500,7 @@ var MessageTray = GObject.registerClass({
this._notificationState = State.HIDDEN; this._notificationState = State.HIDDEN;
this._hideNotificationCompleted(); this._hideNotificationCompleted();
this._updateState(); this._updateState();
} },
}); });
} else { } else {
this._bannerBin.y = -this._bannerBin.height; this._bannerBin.y = -this._bannerBin.height;

View File

@ -17,7 +17,7 @@ var State = {
CLOSED: 1, CLOSED: 1,
OPENING: 2, OPENING: 2,
CLOSING: 3, CLOSING: 3,
FADED_OUT: 4 FADED_OUT: 4,
}; };
var ModalDialog = GObject.registerClass({ var ModalDialog = GObject.registerClass({
@ -26,9 +26,9 @@ var ModalDialog = GObject.registerClass({
GObject.ParamFlags.READABLE, GObject.ParamFlags.READABLE,
Math.min(...Object.values(State)), Math.min(...Object.values(State)),
Math.max(...Object.values(State)), Math.max(...Object.values(State)),
State.CLOSED) State.CLOSED),
}, },
Signals: { 'opened': {}, 'closed': {} } Signals: { 'opened': {}, 'closed': {} },
}, class ModalDialog extends St.Widget { }, class ModalDialog extends St.Widget {
_init(params) { _init(params) {
super._init({ visible: false, super._init({ visible: false,
@ -134,7 +134,7 @@ var ModalDialog = GObject.registerClass({
onComplete: () => { onComplete: () => {
this._setState(State.OPENED); this._setState(State.OPENED);
this.emit('opened'); this.emit('opened');
} },
}); });
} }
@ -183,7 +183,7 @@ var ModalDialog = GObject.registerClass({
opacity: 0, opacity: 0,
duration: OPEN_AND_CLOSE_TIME, duration: OPEN_AND_CLOSE_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._closeComplete() onComplete: () => this._closeComplete(),
}); });
} else { } else {
this._closeComplete(); this._closeComplete();
@ -256,7 +256,7 @@ var ModalDialog = GObject.registerClass({
opacity: 0, opacity: 0,
duration: FADE_OUT_DIALOG_TIME, duration: FADE_OUT_DIALOG_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => (this.state = State.FADED_OUT) onComplete: () => (this.state = State.FADED_OUT),
}); });
} }
}); });

View File

@ -23,13 +23,13 @@ var NotificationClosedReason = {
EXPIRED: 1, EXPIRED: 1,
DISMISSED: 2, DISMISSED: 2,
APP_CLOSED: 3, APP_CLOSED: 3,
UNDEFINED: 4 UNDEFINED: 4,
}; };
var Urgency = { var Urgency = {
LOW: 0, LOW: 0,
NORMAL: 1, NORMAL: 1,
CRITICAL: 2 CRITICAL: 2,
}; };
const rewriteRules = { const rewriteRules = {
@ -39,8 +39,8 @@ const rewriteRules = {
{ pattern: /^XChat: New public message from: (\S*) \((.*)\)$/, { pattern: /^XChat: New public message from: (\S*) \((.*)\)$/,
replacement: '$2 <$1>' }, replacement: '$2 <$1>' },
{ pattern: /^XChat: Highlighted message from: (\S*) \((.*)\)$/, { pattern: /^XChat: Highlighted message from: (\S*) \((.*)\)$/,
replacement: '$2 <$1>' } replacement: '$2 <$1>' },
] ],
}; };
var FdoNotificationDaemon = class FdoNotificationDaemon { var FdoNotificationDaemon = class FdoNotificationDaemon {
@ -384,7 +384,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
Config.PACKAGE_NAME, Config.PACKAGE_NAME,
'GNOME', 'GNOME',
Config.PACKAGE_VERSION, Config.PACKAGE_VERSION,
'1.2' '1.2',
]; ];
} }
@ -534,7 +534,7 @@ const PRIORITY_URGENCY_MAP = {
low: MessageTray.Urgency.LOW, low: MessageTray.Urgency.LOW,
normal: MessageTray.Urgency.NORMAL, normal: MessageTray.Urgency.NORMAL,
high: MessageTray.Urgency.HIGH, high: MessageTray.Urgency.HIGH,
urgent: MessageTray.Urgency.CRITICAL urgent: MessageTray.Urgency.CRITICAL,
}; };
var GtkNotificationDaemonNotification = GObject.registerClass( var GtkNotificationDaemonNotification = GObject.registerClass(

View File

@ -48,7 +48,7 @@ class OsdWindow extends St.Widget {
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
x_align: Clutter.ActorAlign.CENTER, x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER y_align: Clutter.ActorAlign.CENTER,
}); });
this._monitorIndex = monitorIndex; this._monitorIndex = monitorIndex;
@ -69,7 +69,7 @@ class OsdWindow extends St.Widget {
this._level = new BarLevel.BarLevel({ this._level = new BarLevel.BarLevel({
style_class: 'level', style_class: 'level',
value: 0 value: 0,
}); });
this._box.add(this._level); this._box.add(this._level);
@ -116,7 +116,7 @@ class OsdWindow extends St.Widget {
if (this.visible) { if (this.visible) {
this._level.ease_property('value', value, { this._level.ease_property('value', value, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: LEVEL_ANIMATION_TIME duration: LEVEL_ANIMATION_TIME,
}); });
} else { } else {
this._level.value = value; this._level.value = value;
@ -141,7 +141,7 @@ class OsdWindow extends St.Widget {
this.ease({ this.ease({
opacity: 255, opacity: 255,
duration: FADE_TIME, duration: FADE_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -169,7 +169,7 @@ class OsdWindow extends St.Widget {
onComplete: () => { onComplete: () => {
this._reset(); this._reset();
Meta.enable_unredirect_for_display(global.display); Meta.enable_unredirect_for_display(global.display);
} },
}); });
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
} }

View File

@ -84,7 +84,7 @@ class OverviewActor extends St.BoxLayout {
/* Translators: This is the main view to select /* Translators: This is the main view to select
activities. See also note for "Activities" string. */ activities. See also note for "Activities" string. */
accessible_name: _("Overview"), accessible_name: _("Overview"),
vertical: true vertical: true,
}); });
this.add_constraint(new LayoutManager.MonitorConstraint({ primary: true })); this.add_constraint(new LayoutManager.MonitorConstraint({ primary: true }));
@ -94,7 +94,7 @@ class OverviewActor extends St.BoxLayout {
let panelGhost = new St.Bin({ let panelGhost = new St.Bin({
child: new Clutter.Clone({ source: Main.panel }), child: new Clutter.Clone({ source: Main.panel }),
reactive: false, reactive: false,
opacity: 0 opacity: 0,
}); });
this.add_actor(panelGhost); this.add_actor(panelGhost);
@ -106,7 +106,7 @@ class OverviewActor extends St.BoxLayout {
characters. */ characters. */
hint_text: _("Type to search…"), hint_text: _("Type to search…"),
track_hover: true, track_hover: true,
can_focus: true can_focus: true,
}); });
this._searchEntry.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS); this._searchEntry.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
let searchEntryBin = new St.Bin({ let searchEntryBin = new St.Bin({
@ -206,7 +206,7 @@ var Overview = class {
// XDND // XDND
this._dragMonitor = { this._dragMonitor = {
dragMotion: this._onDragMotion.bind(this) dragMotion: this._onDragMotion.bind(this),
}; };
@ -245,11 +245,11 @@ var Overview = class {
for (let i = 0; i < backgrounds.length; i++) { for (let i = 0; i < backgrounds.length; i++) {
backgrounds[i].ease_property('brightness', 1.0, { backgrounds[i].ease_property('brightness', 1.0, {
duration: SHADE_ANIMATION_TIME, duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
backgrounds[i].ease_property('vignette-sharpness', 0.0, { backgrounds[i].ease_property('vignette-sharpness', 0.0, {
duration: SHADE_ANIMATION_TIME, duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }
@ -259,11 +259,11 @@ var Overview = class {
for (let i = 0; i < backgrounds.length; i++) { for (let i = 0; i < backgrounds.length; i++) {
backgrounds[i].ease_property('brightness', Lightbox.VIGNETTE_BRIGHTNESS, { backgrounds[i].ease_property('brightness', Lightbox.VIGNETTE_BRIGHTNESS, {
duration: SHADE_ANIMATION_TIME, duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
backgrounds[i].ease_property('vignette-sharpness', Lightbox.VIGNETTE_SHARPNESS, { backgrounds[i].ease_property('vignette-sharpness', Lightbox.VIGNETTE_SHARPNESS, {
duration: SHADE_ANIMATION_TIME, duration: SHADE_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }
@ -476,7 +476,7 @@ var Overview = class {
this._desktopFade.ease({ this._desktopFade.ease({
opacity: 255, opacity: 255,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: ANIMATION_TIME duration: ANIMATION_TIME,
}); });
} }
@ -494,7 +494,7 @@ var Overview = class {
this._desktopFade.ease({ this._desktopFade.ease({
opacity: 0, opacity: 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: ANIMATION_TIME duration: ANIMATION_TIME,
}); });
} }
@ -577,7 +577,7 @@ var Overview = class {
opacity: 255, opacity: 255,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: ANIMATION_TIME, duration: ANIMATION_TIME,
onComplete: () => this._showDone() onComplete: () => this._showDone(),
}); });
this._shadeBackgrounds(); this._shadeBackgrounds();
@ -641,7 +641,7 @@ var Overview = class {
opacity: 0, opacity: 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: ANIMATION_TIME, duration: ANIMATION_TIME,
onComplete: () => this._hideDone() onComplete: () => this._hideDone(),
}); });
this._unshadeBackgrounds(); this._unshadeBackgrounds();

View File

@ -22,7 +22,7 @@ function getRtlSlideDirection(direction, actor) {
var SlideDirection = { var SlideDirection = {
LEFT: 0, LEFT: 0,
RIGHT: 1 RIGHT: 1,
}; };
var SlideLayout = GObject.registerClass({ var SlideLayout = GObject.registerClass({
@ -34,8 +34,8 @@ var SlideLayout = GObject.registerClass({
'translation-x': GObject.ParamSpec.double( 'translation-x': GObject.ParamSpec.double(
'translation-x', 'translation-x', 'translation-x', 'translation-x', 'translation-x', 'translation-x',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
-Infinity, Infinity, 0) -Infinity, Infinity, 0),
} },
}, class SlideLayout extends Clutter.FixedLayout { }, class SlideLayout extends Clutter.FixedLayout {
_init(params) { _init(params) {
this._slideX = 1; this._slideX = 1;
@ -128,7 +128,7 @@ class SlidingControl extends St.Widget {
super._init({ super._init({
layout_manager: this.layout, layout_manager: this.layout,
style_class: 'overview-controls', style_class: 'overview-controls',
clip_to_allocation: true clip_to_allocation: true,
}); });
this._visible = true; this._visible = true;
@ -223,7 +223,7 @@ class SlidingControl extends St.Widget {
this.ease({ this.ease({
opacity: 255, opacity: 255,
duration: SIDE_CONTROLS_ANIMATION_TIME / 2, duration: SIDE_CONTROLS_ANIMATION_TIME / 2,
mode: Clutter.AnimationMode.EASE_IN_QUAD mode: Clutter.AnimationMode.EASE_IN_QUAD,
}); });
} }
@ -231,7 +231,7 @@ class SlidingControl extends St.Widget {
this.ease({ this.ease({
opacity: 128, opacity: 128,
duration: SIDE_CONTROLS_ANIMATION_TIME / 2, duration: SIDE_CONTROLS_ANIMATION_TIME / 2,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -428,7 +428,7 @@ class ControlsManager extends St.Widget {
layout_manager: layout, layout_manager: layout,
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
clip_to_allocation: true clip_to_allocation: true,
}); });
this.dash = new Dash.Dash(); this.dash = new Dash.Dash();

View File

@ -23,7 +23,7 @@ const UP = 0;
const DOWN = 1; const DOWN = 1;
var PadChooser = GObject.registerClass({ var PadChooser = GObject.registerClass({
Signals: { 'pad-selected': { param_types: [Clutter.InputDevice.$gtype] } } Signals: { 'pad-selected': { param_types: [Clutter.InputDevice.$gtype] } },
}, class PadChooser extends St.Button { }, class PadChooser extends St.Button {
_init(device, groupDevices) { _init(device, groupDevices) {
super._init({ super._init({
@ -89,7 +89,7 @@ var PadChooser = GObject.registerClass({
}); });
var KeybindingEntry = GObject.registerClass({ var KeybindingEntry = GObject.registerClass({
Signals: { 'keybinding-edited': {} } Signals: { 'keybinding-edited': {} },
}, class KeybindingEntry extends St.Entry { }, class KeybindingEntry extends St.Entry {
_init() { _init() {
super._init({ hint_text: _("New shortcut…"), style: 'width: 10em' }); super._init({ hint_text: _("New shortcut…"), style: 'width: 10em' });
@ -110,7 +110,7 @@ var KeybindingEntry = GObject.registerClass({
}); });
var ActionComboBox = GObject.registerClass({ var ActionComboBox = GObject.registerClass({
Signals: { 'action-selected': { param_types: [GObject.TYPE_INT] } } Signals: { 'action-selected': { param_types: [GObject.TYPE_INT] } },
}, class ActionComboBox extends St.Button { }, class ActionComboBox extends St.Button {
_init() { _init() {
super._init({ style_class: 'button' }); super._init({ style_class: 'button' });
@ -192,7 +192,7 @@ var ActionComboBox = GObject.registerClass({
}); });
var ActionEditor = GObject.registerClass({ var ActionEditor = GObject.registerClass({
Signals: { 'done': {} } Signals: { 'done': {} },
}, class ActionEditor extends St.Widget { }, class ActionEditor extends St.Widget {
_init() { _init() {
let boxLayout = new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL, let boxLayout = new Clutter.BoxLayout({ orientation: Clutter.Orientation.HORIZONTAL,
@ -291,7 +291,7 @@ var PadDiagram = GObject.registerClass({
'Editor actor', 'Editor actor',
GObject.ParamFlags.READWRITE | GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT_ONLY, GObject.ParamFlags.CONSTRUCT_ONLY,
Clutter.Actor.$gtype) Clutter.Actor.$gtype),
}, },
}, class PadDiagram extends St.DrawingArea { }, class PadDiagram extends St.DrawingArea {
_init(params) { _init(params) {
@ -620,8 +620,8 @@ var PadDiagram = GObject.registerClass({
var PadOsd = GObject.registerClass({ var PadOsd = GObject.registerClass({
Signals: { Signals: {
'pad-selected': { param_types: [Clutter.InputDevice.$gtype] }, 'pad-selected': { param_types: [Clutter.InputDevice.$gtype] },
'closed': {} 'closed': {},
} },
}, class PadOsd extends St.BoxLayout { }, class PadOsd extends St.BoxLayout {
_init(padDevice, settings, imagePath, editionMode, monitorIndex) { _init(padDevice, settings, imagePath, editionMode, monitorIndex) {
super._init({ super._init({
@ -629,7 +629,7 @@ var PadOsd = GObject.registerClass({
vertical: true, vertical: true,
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
reactive: true reactive: true,
}); });
this.padDevice = padDevice; this.padDevice = padDevice;

View File

@ -18,7 +18,7 @@ var INDICATORS_ANIMATION_MAX_TIME_OUT =
var ANIMATION_DELAY = 100; var ANIMATION_DELAY = 100;
var PageIndicators = GObject.registerClass({ var PageIndicators = GObject.registerClass({
Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } } Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } },
}, class PageIndicators extends St.BoxLayout { }, class PageIndicators extends St.BoxLayout {
_init(orientation = Clutter.Orientation.VERTICAL) { _init(orientation = Clutter.Orientation.VERTICAL) {
let vertical = orientation == Clutter.Orientation.VERTICAL; let vertical = orientation == Clutter.Orientation.VERTICAL;
@ -29,7 +29,7 @@ var PageIndicators = GObject.registerClass({
x_align: vertical ? Clutter.ActorAlign.END : Clutter.ActorAlign.CENTER, x_align: vertical ? Clutter.ActorAlign.END : Clutter.ActorAlign.CENTER,
y_align: vertical ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.END, y_align: vertical ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.END,
reactive: true, reactive: true,
clip_to_allocation: true clip_to_allocation: true,
}); });
this._nPages = 0; this._nPages = 0;
this._currentPage = undefined; this._currentPage = undefined;
@ -154,7 +154,7 @@ class AnimatedPageIndicators extends PageIndicators {
translation_x: isAnimationIn ? 0 : offset, translation_x: isAnimationIn ? 0 : offset,
duration: baseTime + delay * i, duration: baseTime + delay * i,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD, mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
delay: isAnimationIn ? ANIMATION_DELAY : 0 delay: isAnimationIn ? ANIMATION_DELAY : 0,
}); });
} }
} }

View File

@ -267,7 +267,7 @@ var AppMenuButton = GObject.registerClass({
this.ease({ this.ease({
opacity: 255, opacity: 255,
duration: Overview.ANIMATION_TIME, duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -282,7 +282,7 @@ var AppMenuButton = GObject.registerClass({
opacity: 0, opacity: 0,
mode: Clutter.Animation.EASE_OUT_QUAD, mode: Clutter.Animation.EASE_OUT_QUAD,
duration: Overview.ANIMATION_TIME, duration: Overview.ANIMATION_TIME,
onComplete: () => this.hide() onComplete: () => this.hide(),
}); });
} }
@ -1105,7 +1105,7 @@ class Panel extends St.Widget {
let boxes = { let boxes = {
left: this._leftBox, left: this._leftBox,
center: this._centerBox, center: this._centerBox,
right: this._rightBox right: this._rightBox,
}; };
let boxContainer = boxes[box] || this._rightBox; let boxContainer = boxes[box] || this._rightBox;
this.statusArea[role] = indicator; this.statusArea[role] = indicator;

View File

@ -203,7 +203,7 @@ class SystemIndicator extends St.BoxLayout {
super._init({ super._init({
style_class: 'panel-status-indicators-box', style_class: 'panel-status-indicators-box',
reactive: true, reactive: true,
visible: false visible: false,
}); });
this.menu = new PopupMenu.PopupMenuSection(); this.menu = new PopupMenu.PopupMenuSection();
} }

View File

@ -10,8 +10,8 @@ var PieTimer = GObject.registerClass({
'angle': GObject.ParamSpec.double( 'angle': GObject.ParamSpec.double(
'angle', 'angle', 'angle', 'angle', 'angle', 'angle',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
0, 2 * Math.PI, 0) 0, 2 * Math.PI, 0),
} },
}, class PieTimer extends St.DrawingArea { }, class PieTimer extends St.DrawingArea {
_init() { _init() {
this._angle = 0; this._angle = 0;
@ -20,7 +20,7 @@ var PieTimer = GObject.registerClass({
opacity: 0, opacity: 0,
visible: false, visible: false,
can_focus: false, can_focus: false,
reactive: false reactive: false,
}); });
this.set_pivot_point(0.5, 0.5); this.set_pivot_point(0.5, 0.5);
@ -84,13 +84,13 @@ var PieTimer = GObject.registerClass({
this.ease({ this.ease({
opacity: 255, opacity: 255,
duration: duration / 4, duration: duration / 4,
mode: Clutter.AnimationMode.EASE_IN_QUAD mode: Clutter.AnimationMode.EASE_IN_QUAD,
}); });
this.ease_property('angle', 2 * Math.PI, { this.ease_property('angle', 2 * Math.PI, {
duration, duration,
mode: Clutter.AnimationMode.LINEAR, mode: Clutter.AnimationMode.LINEAR,
onComplete: this._onTransitionComplete.bind(this) onComplete: this._onTransitionComplete.bind(this),
}); });
} }
@ -101,7 +101,7 @@ var PieTimer = GObject.registerClass({
opacity: 0, opacity: 0,
duration: SUCCESS_ZOOM_OUT_DURATION, duration: SUCCESS_ZOOM_OUT_DURATION,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this.destroy() onStopped: () => this.destroy(),
}); });
} }
}); });

View File

@ -66,7 +66,7 @@ var PopupBaseMenuItem = GObject.registerClass({
}, },
Signals: { Signals: {
'activate': { param_types: [Clutter.Event.$gtype] }, 'activate': { param_types: [Clutter.Event.$gtype] },
} },
}, class PopupBaseMenuItem extends St.BoxLayout { }, class PopupBaseMenuItem extends St.BoxLayout {
_init(params) { _init(params) {
params = Params.parse(params, { params = Params.parse(params, {
@ -326,7 +326,7 @@ class Switch extends St.Bin {
}); });
var PopupSwitchMenuItem = GObject.registerClass({ var PopupSwitchMenuItem = GObject.registerClass({
Signals: { 'toggled': { param_types: [GObject.TYPE_BOOLEAN] }, }, Signals: { 'toggled': { param_types: [GObject.TYPE_BOOLEAN] } },
}, class PopupSwitchMenuItem extends PopupBaseMenuItem { }, class PopupSwitchMenuItem extends PopupBaseMenuItem {
_init(text, active, params) { _init(text, active, params) {
super._init(params); super._init(params);
@ -1032,12 +1032,12 @@ var PopupSubMenu = class extends PopupMenuBase {
height: naturalHeight, height: naturalHeight,
duration: 250, duration: 250,
mode: Clutter.AnimationMode.EASE_OUT_EXPO, mode: Clutter.AnimationMode.EASE_OUT_EXPO,
onComplete: () => this.actor.set_height(-1) onComplete: () => this.actor.set_height(-1),
}); });
this._arrow.ease({ this._arrow.ease({
rotation_angle_z: targetAngle, rotation_angle_z: targetAngle,
duration: 250, duration: 250,
mode: Clutter.AnimationMode.EASE_OUT_EXPO mode: Clutter.AnimationMode.EASE_OUT_EXPO,
}); });
} else { } else {
this._arrow.rotation_angle_z = targetAngle; this._arrow.rotation_angle_z = targetAngle;
@ -1065,12 +1065,12 @@ var PopupSubMenu = class extends PopupMenuBase {
onComplete: () => { onComplete: () => {
this.actor.hide(); this.actor.hide();
this.actor.set_height(-1); this.actor.set_height(-1);
} },
}); });
this._arrow.ease({ this._arrow.ease({
rotation_angle_z: 0, rotation_angle_z: 0,
duration: 250, duration: 250,
mode: Clutter.AnimationMode.EASE_OUT_EXPO mode: Clutter.AnimationMode.EASE_OUT_EXPO,
}); });
} else { } else {
this._arrow.rotation_angle_z = 0; this._arrow.rotation_angle_z = 0;
@ -1257,7 +1257,7 @@ var PopupMenuManager = class {
openStateChangeId: menu.connect('open-state-changed', this._onMenuOpenState.bind(this)), openStateChangeId: menu.connect('open-state-changed', this._onMenuOpenState.bind(this)),
destroyId: menu.connect('destroy', this._onMenuDestroy.bind(this)), destroyId: menu.connect('destroy', this._onMenuDestroy.bind(this)),
enterId: 0, enterId: 0,
focusInId: 0 focusInId: 0,
}; };
let source = menu.sourceActor; let source = menu.sourceActor;

View File

@ -59,7 +59,7 @@ var Ripples = class Ripples {
opacity: 0, opacity: 0,
delay, delay,
duration, duration,
mode: Clutter.AnimationMode.EASE_IN_QUAD mode: Clutter.AnimationMode.EASE_IN_QUAD,
}); });
ripple.ease({ ripple.ease({
scale_x: finalScale, scale_x: finalScale,
@ -67,7 +67,7 @@ var Ripples = class Ripples {
delay, delay,
duration, duration,
mode: Clutter.AnimationMode.LINEAR, mode: Clutter.AnimationMode.LINEAR,
onComplete: () => (ripple.visible = false) onComplete: () => (ripple.visible = false),
}); });
} }

View File

@ -249,7 +249,7 @@ class RunDialog extends ModalDialog.ModalDialog {
onComplete: () => { onComplete: () => {
parentActor.set_height(-1); parentActor.set_height(-1);
this._errorBox.show(); this._errorBox.show();
} },
}); });
} }
} }

View File

@ -89,13 +89,13 @@ class ScreenShieldClock extends St.BoxLayout {
}); });
var NotificationsBox = GObject.registerClass({ var NotificationsBox = GObject.registerClass({
Signals: { 'wake-up-screen': {} } Signals: { 'wake-up-screen': {} },
}, class NotificationsBox extends St.BoxLayout { }, class NotificationsBox extends St.BoxLayout {
_init() { _init() {
super._init({ super._init({
vertical: true, vertical: true,
name: 'screenShieldNotifications', name: 'screenShieldNotifications',
style_class: 'screen-shield-notifications-container' style_class: 'screen-shield-notifications-container',
}); });
this._scrollView = new St.ScrollView({ hscrollbar_policy: St.PolicyType.NEVER }); this._scrollView = new St.ScrollView({ hscrollbar_policy: St.PolicyType.NEVER });
@ -264,7 +264,7 @@ var NotificationsBox = GObject.registerClass({
onComplete: () => { onComplete: () => {
this._scrollView.vscrollbar_policy = St.PolicyType.AUTOMATIC; this._scrollView.vscrollbar_policy = St.PolicyType.AUTOMATIC;
widget.set_height(-1); widget.set_height(-1);
} },
}); });
this._updateVisibility(); this._updateVisibility();
@ -751,9 +751,9 @@ var ScreenShield = class {
arrows[i].ease({ arrows[i].ease({
opacity: 0, opacity: 0,
duration: ARROW_ANIMATION_TIME / 2, duration: ARROW_ANIMATION_TIME / 2,
mode: Clutter.AnimationMode.EASE_IN_QUAD mode: Clutter.AnimationMode.EASE_IN_QUAD,
}); });
} },
}); });
} }
@ -802,7 +802,7 @@ var ScreenShield = class {
onComplete: () => { onComplete: () => {
this._lockScreenGroup.fixed_position_set = false; this._lockScreenGroup.fixed_position_set = false;
this._lockScreenState = MessageTray.State.SHOWN; this._lockScreenState = MessageTray.State.SHOWN;
} },
}); });
this._maybeCancelDialog(); this._maybeCancelDialog();
@ -955,7 +955,7 @@ var ScreenShield = class {
y: -h, y: -h,
duration, duration,
mode: Clutter.AnimationMode.EASE_IN_QUAD, mode: Clutter.AnimationMode.EASE_IN_QUAD,
onComplete: () => this._hideLockScreenComplete() onComplete: () => this._hideLockScreenComplete(),
}); });
} else { } else {
this._hideLockScreenComplete(); this._hideLockScreenComplete();
@ -1022,7 +1022,7 @@ var ScreenShield = class {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this._lockScreenShown({ fadeToBlack, animateFade: true }); this._lockScreenShown({ fadeToBlack, animateFade: true });
} },
}); });
} else { } else {
this._lockScreenGroup.fixed_position_set = false; this._lockScreenGroup.fixed_position_set = false;
@ -1229,7 +1229,7 @@ var ScreenShield = class {
scale_y: 0, scale_y: 0,
duration: animate ? Overview.ANIMATION_TIME : 0, duration: animate ? Overview.ANIMATION_TIME : 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._completeDeactivate() onComplete: () => this._completeDeactivate(),
}); });
} }

View File

@ -272,8 +272,8 @@ var ScreenshotService = class {
color: GLib.Variant.new('(ddd)', [ color: GLib.Variant.new('(ddd)', [
red / 255.0, red / 255.0,
green / 255.0, green / 255.0,
blue / 255.0 blue / 255.0,
]) ]),
}]); }]);
this._removeShooterForSender(invocation.get_sender()); this._removeShooterForSender(invocation.get_sender());
invocation.return_value(retval); invocation.return_value(retval);
@ -287,7 +287,7 @@ var ScreenshotService = class {
}; };
var SelectArea = GObject.registerClass({ var SelectArea = GObject.registerClass({
Signals: { 'finished': { param_types: [Meta.Rectangle.$gtype] } } Signals: { 'finished': { param_types: [Meta.Rectangle.$gtype] } },
}, class SelectArea extends St.Widget { }, class SelectArea extends St.Widget {
_init() { _init() {
this._startX = -1; this._startX = -1;
@ -300,7 +300,7 @@ var SelectArea = GObject.registerClass({
visible: false, visible: false,
reactive: true, reactive: true,
x: 0, x: 0,
y: 0 y: 0,
}); });
Main.uiGroup.add_actor(this); Main.uiGroup.add_actor(this);
@ -312,7 +312,7 @@ var SelectArea = GObject.registerClass({
this._rubberband = new St.Widget({ this._rubberband = new St.Widget({
style_class: 'select-area-rubberband', style_class: 'select-area-rubberband',
visible: false visible: false,
}); });
this.add_actor(this._rubberband); this.add_actor(this._rubberband);
} }
@ -332,7 +332,7 @@ var SelectArea = GObject.registerClass({
x: Math.min(this._startX, this._lastX), x: Math.min(this._startX, this._lastX),
y: Math.min(this._startY, this._lastY), y: Math.min(this._startY, this._lastY),
width: Math.abs(this._startX - this._lastX) + 1, width: Math.abs(this._startX - this._lastX) + 1,
height: Math.abs(this._startY - this._lastY) + 1 height: Math.abs(this._startY - this._lastY) + 1,
}); });
} }
@ -367,7 +367,7 @@ var SelectArea = GObject.registerClass({
opacity: 0, opacity: 0,
duration: 200, duration: 200,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._grabHelper.ungrab() onComplete: () => this._grabHelper.ungrab(),
}); });
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
} }
@ -384,7 +384,7 @@ var SelectArea = GObject.registerClass({
}); });
var PickPixel = GObject.registerClass({ var PickPixel = GObject.registerClass({
Signals: { 'finished': { param_types: [Graphene.Point.$gtype] } } Signals: { 'finished': { param_types: [Graphene.Point.$gtype] } },
}, class PickPixel extends St.Widget { }, class PickPixel extends St.Widget {
_init() { _init() {
super._init({ visible: false, reactive: true }); super._init({ visible: false, reactive: true });
@ -436,7 +436,7 @@ class Flashspot extends Lightbox.Lightbox {
super._init(Main.uiGroup, { super._init(Main.uiGroup, {
inhibitEvents: true, inhibitEvents: true,
width: area.width, width: area.width,
height: area.height height: area.height,
}); });
this.style_class = 'flashspot'; this.style_class = 'flashspot';
this.set_position(area.x, area.y); this.set_position(area.x, area.y);
@ -452,7 +452,7 @@ class Flashspot extends Lightbox.Lightbox {
if (doneCallback) if (doneCallback)
doneCallback(); doneCallback();
this.destroy(); this.destroy();
} },
}); });
} }
}); });

View File

@ -159,7 +159,7 @@ var SearchResultsBase = GObject.registerClass({
'focus-child', 'focus-child', 'focus-child', 'focus-child', 'focus-child', 'focus-child',
GObject.ParamFlags.READABLE, GObject.ParamFlags.READABLE,
Clutter.Actor.$gtype), Clutter.Actor.$gtype),
} },
}, class SearchResultsBase extends St.BoxLayout { }, class SearchResultsBase extends St.BoxLayout {
_init(provider, resultsView) { _init(provider, resultsView) {
super._init({ style_class: 'search-section', vertical: true }); super._init({ style_class: 'search-section', vertical: true });
@ -426,7 +426,7 @@ class GridSearchResults extends SearchResultsBase {
}); });
var SearchResultsView = GObject.registerClass({ var SearchResultsView = GObject.registerClass({
Signals: { 'terms-changed': {} } Signals: { 'terms-changed': {} },
}, class SearchResultsView extends St.BoxLayout { }, class SearchResultsView extends St.BoxLayout {
_init() { _init() {
super._init({ name: 'searchResults', vertical: true }); super._init({ name: 'searchResults', vertical: true });

View File

@ -34,9 +34,9 @@ const _modes = {
panel: { panel: {
left: [], left: [],
center: [], center: [],
right: [] right: [],
}, },
panelStyle: null panelStyle: null,
}, },
'gdm': { 'gdm': {
@ -48,9 +48,9 @@ const _modes = {
panel: { panel: {
left: [], left: [],
center: ['dateMenu'], center: ['dateMenu'],
right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'] right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
}, },
panelStyle: 'login-screen' panelStyle: 'login-screen',
}, },
'lock-screen': { 'lock-screen': {
@ -61,9 +61,9 @@ const _modes = {
panel: { panel: {
left: [], left: [],
center: [], center: [],
right: ['aggregateMenu'] right: ['aggregateMenu'],
}, },
panelStyle: 'lock-screen' panelStyle: 'lock-screen',
}, },
'unlock-dialog': { 'unlock-dialog': {
@ -73,9 +73,9 @@ const _modes = {
panel: { panel: {
left: [], left: [],
center: [], center: [],
right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'] right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
}, },
panelStyle: 'unlock-screen' panelStyle: 'unlock-screen',
}, },
'user': { 'user': {
@ -101,9 +101,9 @@ const _modes = {
panel: { panel: {
left: ['activities', 'appMenu'], left: ['activities', 'appMenu'],
center: ['dateMenu'], center: ['dateMenu'],
right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'] right: ['dwellClick', 'a11y', 'keyboard', 'aggregateMenu'],
} },
} },
}; };
function _loadMode(file, info) { function _loadMode(file, info) {

View File

@ -44,7 +44,7 @@ function _setLabelsForMessage(content, message) {
/* -------------------------------------------------------- */ /* -------------------------------------------------------- */
var ListItem = GObject.registerClass({ var ListItem = GObject.registerClass({
Signals: { 'activate': {} } Signals: { 'activate': {} },
}, class ListItem extends St.Button { }, class ListItem extends St.Button {
_init(app) { _init(app) {
let layout = new St.BoxLayout({ vertical: false }); let layout = new St.BoxLayout({ vertical: false });
@ -257,7 +257,7 @@ class ShellUnmountNotifier extends MessageTray.Source {
}); });
var ShellMountQuestionDialog = GObject.registerClass({ var ShellMountQuestionDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_INT] } } Signals: { 'response': { param_types: [GObject.TYPE_INT] } },
}, class ShellMountQuestionDialog extends ModalDialog.ModalDialog { }, class ShellMountQuestionDialog extends ModalDialog.ModalDialog {
_init(icon) { _init(icon) {
super._init({ styleClass: 'mount-dialog' }); super._init({ styleClass: 'mount-dialog' });
@ -278,7 +278,7 @@ var ShellMountPasswordDialog = GObject.registerClass({
GObject.TYPE_BOOLEAN, GObject.TYPE_BOOLEAN,
GObject.TYPE_BOOLEAN, GObject.TYPE_BOOLEAN,
GObject.TYPE_BOOLEAN, GObject.TYPE_BOOLEAN,
GObject.TYPE_UINT] } } GObject.TYPE_UINT] } },
}, class ShellMountPasswordDialog extends ModalDialog.ModalDialog { }, class ShellMountPasswordDialog extends ModalDialog.ModalDialog {
_init(message, icon, flags) { _init(message, icon, flags) {
let strings = message.split('\n'); let strings = message.split('\n');
@ -489,7 +489,7 @@ var ShellMountPasswordDialog = GObject.registerClass({
}); });
var ShellProcessesDialog = GObject.registerClass({ var ShellProcessesDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_INT] } } Signals: { 'response': { param_types: [GObject.TYPE_INT] } },
}, class ShellProcessesDialog extends ModalDialog.ModalDialog { }, class ShellProcessesDialog extends ModalDialog.ModalDialog {
_init(icon) { _init(icon) {
super._init({ styleClass: 'mount-dialog' }); super._init({ styleClass: 'mount-dialog' });
@ -555,7 +555,7 @@ var ShellMountOperationType = {
NONE: 0, NONE: 0,
ASK_PASSWORD: 1, ASK_PASSWORD: 1,
ASK_QUESTION: 2, ASK_QUESTION: 2,
SHOW_PROCESSES: 3 SHOW_PROCESSES: 3,
}; };
var GnomeShellMountOpHandler = class { var GnomeShellMountOpHandler = class {

View File

@ -10,8 +10,8 @@ var SLIDER_SCROLL_STEP = 0.02; /* Slider scrolling step in % */
var Slider = GObject.registerClass({ var Slider = GObject.registerClass({
Signals: { Signals: {
'drag-begin': {}, 'drag-begin': {},
'drag-end': {} 'drag-end': {},
} },
}, class Slider extends BarLevel.BarLevel { }, class Slider extends BarLevel.BarLevel {
_init(value) { _init(value) {
super._init({ super._init({

View File

@ -12,23 +12,23 @@ const DWELL_CLICK_MODES = {
primary: { primary: {
name: _("Single Click"), name: _("Single Click"),
icon: 'pointer-primary-click-symbolic', icon: 'pointer-primary-click-symbolic',
type: Clutter.PointerA11yDwellClickType.PRIMARY type: Clutter.PointerA11yDwellClickType.PRIMARY,
}, },
double: { double: {
name: _("Double Click"), name: _("Double Click"),
icon: 'pointer-double-click-symbolic', icon: 'pointer-double-click-symbolic',
type: Clutter.PointerA11yDwellClickType.DOUBLE type: Clutter.PointerA11yDwellClickType.DOUBLE,
}, },
drag: { drag: {
name: _("Drag"), name: _("Drag"),
icon: 'pointer-drag-symbolic', icon: 'pointer-drag-symbolic',
type: Clutter.PointerA11yDwellClickType.DRAG type: Clutter.PointerA11yDwellClickType.DRAG,
}, },
secondary: { secondary: {
name: _("Secondary Click"), name: _("Secondary Click"),
icon: 'pointer-secondary-click-symbolic', icon: 'pointer-secondary-click-symbolic',
type: Clutter.PointerA11yDwellClickType.SECONDARY type: Clutter.PointerA11yDwellClickType.SECONDARY,
} },
}; };
var DwellClickIndicator = GObject.registerClass( var DwellClickIndicator = GObject.registerClass(

View File

@ -25,7 +25,7 @@ var GeoclueAccuracyLevel = {
CITY: 4, CITY: 4,
NEIGHBORHOOD: 5, NEIGHBORHOOD: 5,
STREET: 6, STREET: 6,
EXACT: 8 EXACT: 8,
}; };
function accuracyLevelToString(accuracyLevel) { function accuracyLevelToString(accuracyLevel) {
@ -345,7 +345,7 @@ var AppAuthorizer = class {
}; };
var GeolocationDialog = GObject.registerClass({ var GeolocationDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_UINT] } } Signals: { 'response': { param_types: [GObject.TYPE_UINT] } },
}, class GeolocationDialog extends ModalDialog.ModalDialog { }, class GeolocationDialog extends ModalDialog.ModalDialog {
_init(name, subtitle, reqAccuracyLevel) { _init(name, subtitle, reqAccuracyLevel) {
super._init({ styleClass: 'geolocation-dialog' }); super._init({ styleClass: 'geolocation-dialog' });

View File

@ -20,7 +20,7 @@ const NMConnectionCategory = {
WIRED: 'wired', WIRED: 'wired',
WIRELESS: 'wireless', WIRELESS: 'wireless',
WWAN: 'wwan', WWAN: 'wwan',
VPN: 'vpn' VPN: 'vpn',
}; };
const NMAccessPointSecurity = { const NMAccessPointSecurity = {
@ -29,7 +29,7 @@ const NMAccessPointSecurity = {
WPA_PSK: 3, WPA_PSK: 3,
WPA2_PSK: 4, WPA2_PSK: 4,
WPA_ENT: 5, WPA_ENT: 5,
WPA2_ENT: 6 WPA2_ENT: 6,
}; };
var MAX_DEVICE_ITEMS = 4; var MAX_DEVICE_ITEMS = 4;
@ -42,7 +42,7 @@ const NM80211ApSecurityFlags = NM['80211ApSecurityFlags'];
var PortalHelperResult = { var PortalHelperResult = {
CANCELLED: 0, CANCELLED: 0,
COMPLETED: 1, COMPLETED: 1,
RECHECK: 2 RECHECK: 2,
}; };
const PortalHelperIface = loadInterfaceXML('org.gnome.Shell.PortalHelper'); const PortalHelperIface = loadInterfaceXML('org.gnome.Shell.PortalHelper');
@ -620,7 +620,7 @@ var NMDeviceBluetooth = class extends NMConnectionDevice {
var NMWirelessDialogItem = GObject.registerClass({ var NMWirelessDialogItem = GObject.registerClass({
Signals: { Signals: {
'selected': {}, 'selected': {},
} },
}, class NMWirelessDialogItem extends St.BoxLayout { }, class NMWirelessDialogItem extends St.BoxLayout {
_init(network) { _init(network) {
this._network = network; this._network = network;

View File

@ -123,7 +123,7 @@ class Indicator extends PanelMenu.SystemIndicator {
// default fallbacks // default fallbacks
let gicon = new Gio.ThemedIcon({ let gicon = new Gio.ThemedIcon({
name: icon, name: icon,
use_default_fallbacks: false use_default_fallbacks: false,
}); });
this._indicator.gicon = gicon; this._indicator.gicon = gicon;

View File

@ -27,13 +27,13 @@ var Status = {
CONNECTED: 'connected', CONNECTED: 'connected',
AUTHORIZING: 'authorizing', AUTHORIZING: 'authorizing',
AUTH_ERROR: 'auth-error', AUTH_ERROR: 'auth-error',
AUTHORIZED: 'authorized' AUTHORIZED: 'authorized',
}; };
var Policy = { var Policy = {
DEFAULT: 'default', DEFAULT: 'default',
MANUAL: 'manual', MANUAL: 'manual',
AUTO: 'auto' AUTO: 'auto',
}; };
var AuthCtrl = { var AuthCtrl = {
@ -42,7 +42,7 @@ var AuthCtrl = {
var AuthMode = { var AuthMode = {
DISABLED: 'disabled', DISABLED: 'disabled',
ENABLED: 'enabled' ENABLED: 'enabled',
}; };
const BOLT_DBUS_CLIENT_IFACE = 'org.freedesktop.bolt1.Manager'; const BOLT_DBUS_CLIENT_IFACE = 'org.freedesktop.bolt1.Manager';

View File

@ -263,7 +263,7 @@ var InputStreamSlider = class extends StreamSlider {
// as recording because they show the input level // as recording because they show the input level
let skippedApps = [ let skippedApps = [
'org.gnome.VolumeControl', 'org.gnome.VolumeControl',
'org.PulseAudio.pavucontrol' 'org.PulseAudio.pavucontrol',
]; ];
showInput = this._control.get_source_outputs().some(output => { showInput = this._control.get_source_outputs().some(output => {

View File

@ -30,7 +30,7 @@ function primaryModifier(mask) {
} }
var SwitcherPopup = GObject.registerClass({ var SwitcherPopup = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT GTypeFlags: GObject.TypeFlags.ABSTRACT,
}, class SwitcherPopup extends St.Widget { }, class SwitcherPopup extends St.Widget {
_init(items) { _init(items) {
super._init({ style_class: 'switcher-popup', super._init({ style_class: 'switcher-popup',
@ -286,7 +286,7 @@ var SwitcherPopup = GObject.registerClass({
opacity: 0, opacity: 0,
duration: POPUP_FADE_OUT_TIME, duration: POPUP_FADE_OUT_TIME,
mode: Clutter.Animation.EASE_OUT_QUAD, mode: Clutter.Animation.EASE_OUT_QUAD,
onComplete: () => this.destroy() onComplete: () => this.destroy(),
}); });
} else { } else {
this.destroy(); this.destroy();
@ -464,7 +464,7 @@ var SwitcherList = GObject.registerClass({
if (this._highlighted == 0) if (this._highlighted == 0)
this._scrollableLeft = false; this._scrollableLeft = false;
this.queue_relayout(); this.queue_relayout();
} },
}); });
} }
@ -487,7 +487,7 @@ var SwitcherList = GObject.registerClass({
if (this._highlighted == this._items.length - 1) if (this._highlighted == this._items.length - 1)
this._scrollableRight = false; this._scrollableRight = false;
this.queue_relayout(); this.queue_relayout();
} },
}); });
} }

View File

@ -26,7 +26,7 @@ class Avatar extends St.Bin {
style_class: params.styleClass, style_class: params.styleClass,
reactive: params.reactive, reactive: params.reactive,
width: params.iconSize * themeContext.scaleFactor, width: params.iconSize * themeContext.scaleFactor,
height: params.iconSize * themeContext.scaleFactor height: params.iconSize * themeContext.scaleFactor,
}); });
this._iconSize = params.iconSize; this._iconSize = params.iconSize;

View File

@ -20,7 +20,7 @@ var PINCH_GESTURE_THRESHOLD = 0.7;
var ViewPage = { var ViewPage = {
WINDOWS: 1, WINDOWS: 1,
APPS: 2, APPS: 2,
SEARCH: 3 SEARCH: 3,
}; };
var FocusTrap = GObject.registerClass( var FocusTrap = GObject.registerClass(
@ -126,7 +126,7 @@ var ViewSelector = GObject.registerClass({
Signals: { Signals: {
'page-changed': {}, 'page-changed': {},
'page-empty': {}, 'page-empty': {},
} },
}, class ViewSelector extends Shell.Stack { }, class ViewSelector extends Shell.Stack {
_init(searchEntry, showAppsButton) { _init(searchEntry, showAppsButton) {
super._init({ super._init({
@ -327,7 +327,7 @@ var ViewSelector = GObject.registerClass({
this._activePage.ease({ this._activePage.ease({
opacity: 255, opacity: 255,
duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME, duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -337,7 +337,7 @@ var ViewSelector = GObject.registerClass({
opacity: 0, opacity: 0,
duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME, duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this._animateIn(oldPage) onStopped: () => this._animateIn(oldPage),
}); });
} }

View File

@ -124,7 +124,7 @@ class WindowDimmer extends Clutter.BrightnessContrastEffect {
_init() { _init() {
super._init({ super._init({
name: WINDOW_DIMMER_EFFECT_NAME, name: WINDOW_DIMMER_EFFECT_NAME,
enabled: false enabled: false,
}); });
this._enabled = true; this._enabled = true;
} }
@ -147,7 +147,7 @@ class WindowDimmer extends Clutter.BrightnessContrastEffect {
this.actor.ease_property(`@effects.${this.name}.brightness`, color, { this.actor.ease_property(`@effects.${this.name}.brightness`, color, {
mode: Clutter.AnimationMode.LINEAR, mode: Clutter.AnimationMode.LINEAR,
duration: (dimmed ? DIM_TIME : UNDIM_TIME) * (animate ? 1 : 0), duration: (dimmed ? DIM_TIME : UNDIM_TIME) * (animate ? 1 : 0),
onComplete: () => this._syncEnabled() onComplete: () => this._syncEnabled(),
}); });
this._syncEnabled(); this._syncEnabled();
@ -432,7 +432,7 @@ class TilePreview extends St.Widget {
height: tileRect.height, height: tileRect.height,
opacity: 255, opacity: 255,
duration: WINDOW_ANIMATION_TIME, duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
@ -445,7 +445,7 @@ class TilePreview extends St.Widget {
opacity: 0, opacity: 0,
duration: WINDOW_ANIMATION_TIME, duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._reset() onComplete: () => this._reset(),
}); });
} }
@ -1150,7 +1150,7 @@ var WindowManager = class {
y: 0, y: 0,
duration: WINDOW_ANIMATION_TIME, duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._finishWorkspaceSwitch(switchData) onComplete: () => this._finishWorkspaceSwitch(switchData),
}); });
} }
@ -1320,7 +1320,7 @@ var WindowManager = class {
this._minimizeWindowDone(shellwm, actor); this._minimizeWindowDone(shellwm, actor);
else else
this._minimizeWindowOverwritten(shellwm, actor); this._minimizeWindowOverwritten(shellwm, actor);
} },
}); });
} else { } else {
let xDest, yDest, xScale, yScale; let xDest, yDest, xScale, yScale;
@ -1351,7 +1351,7 @@ var WindowManager = class {
y: yDest, y: yDest,
duration: MINIMIZE_WINDOW_ANIMATION_TIME, duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_EXPO, mode: Clutter.AnimationMode.EASE_IN_EXPO,
onStopped: () => this._minimizeWindowDone(shellwm, actor) onStopped: () => this._minimizeWindowDone(shellwm, actor),
}); });
} }
} }
@ -1385,7 +1385,7 @@ var WindowManager = class {
opacity: 255, opacity: 255,
duration: MINIMIZE_WINDOW_ANIMATION_TIME, duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this._unminimizeWindowDone(shellwm, actor) onStopped: () => this._unminimizeWindowDone(shellwm, actor),
}); });
} else { } else {
let [success, geom] = actor.meta_window.get_icon_geometry(); let [success, geom] = actor.meta_window.get_icon_geometry();
@ -1417,7 +1417,7 @@ var WindowManager = class {
y: yDest, y: yDest,
duration: MINIMIZE_WINDOW_ANIMATION_TIME, duration: MINIMIZE_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_EXPO, mode: Clutter.AnimationMode.EASE_IN_EXPO,
onStopped: () => this._unminimizeWindowDone(shellwm, actor) onStopped: () => this._unminimizeWindowDone(shellwm, actor),
}); });
} }
} }
@ -1493,7 +1493,7 @@ var WindowManager = class {
scale_y: scaleY, scale_y: scaleY,
opacity: 0, opacity: 0,
duration: WINDOW_ANIMATION_TIME, duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
actor.translation_x = -targetRect.x + sourceRect.x; actor.translation_x = -targetRect.x + sourceRect.x;
@ -1511,7 +1511,7 @@ var WindowManager = class {
translation_y: 0, translation_y: 0,
duration: WINDOW_ANIMATION_TIME, duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this._sizeChangeWindowDone(shellwm, actor) onStopped: () => this._sizeChangeWindowDone(shellwm, actor),
}); });
// Now unfreeze actor updates, to get it to the new size. // Now unfreeze actor updates, to get it to the new size.
@ -1641,7 +1641,7 @@ var WindowManager = class {
scale_y: 1, scale_y: 1,
duration: SHOW_WINDOW_ANIMATION_TIME, duration: SHOW_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_EXPO, mode: Clutter.AnimationMode.EASE_OUT_EXPO,
onStopped: () => this._mapWindowDone(shellwm, actor) onStopped: () => this._mapWindowDone(shellwm, actor),
}); });
break; break;
case Meta.WindowType.MODAL_DIALOG: case Meta.WindowType.MODAL_DIALOG:
@ -1658,7 +1658,7 @@ var WindowManager = class {
scale_y: 1, scale_y: 1,
duration: DIALOG_SHOW_WINDOW_ANIMATION_TIME, duration: DIALOG_SHOW_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this._mapWindowDone(shellwm, actor) onStopped: () => this._mapWindowDone(shellwm, actor),
}); });
break; break;
default: default:
@ -1712,7 +1712,7 @@ var WindowManager = class {
scale_y: 0.8, scale_y: 0.8,
duration: DESTROY_WINDOW_ANIMATION_TIME, duration: DESTROY_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this._destroyWindowDone(shellwm, actor) onStopped: () => this._destroyWindowDone(shellwm, actor),
}); });
break; break;
case Meta.WindowType.MODAL_DIALOG: case Meta.WindowType.MODAL_DIALOG:
@ -1732,7 +1732,7 @@ var WindowManager = class {
scale_y: 0, scale_y: 0,
duration: DIALOG_DESTROY_WINDOW_ANIMATION_TIME, duration: DIALOG_DESTROY_WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => this._destroyWindowDone(shellwm, actor) onStopped: () => this._destroyWindowDone(shellwm, actor),
}); });
break; break;
default: default:
@ -1978,7 +1978,7 @@ var WindowManager = class {
y: yDest, y: yDest,
duration: WINDOW_ANIMATION_TIME, duration: WINDOW_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this._switchWorkspaceDone(shellwm) onComplete: () => this._switchWorkspaceDone(shellwm),
}); });
} }

View File

@ -101,7 +101,7 @@ var WindowClone = GObject.registerClass({
'hide-chrome': {}, 'hide-chrome': {},
'selected': { param_types: [GObject.TYPE_UINT] }, 'selected': { param_types: [GObject.TYPE_UINT] },
'show-chrome': {}, 'show-chrome': {},
'size-changed': {} 'size-changed': {},
}, },
}, class WindowClone extends St.Widget { }, class WindowClone extends St.Widget {
_init(realWindow, workspace) { _init(realWindow, workspace) {
@ -126,7 +126,7 @@ var WindowClone = GObject.registerClass({
reactive: true, reactive: true,
can_focus: true, can_focus: true,
accessible_role: Atk.Role.PUSH_BUTTON, accessible_role: Atk.Role.PUSH_BUTTON,
layout_manager: new WindowCloneLayout() layout_manager: new WindowCloneLayout(),
}); });
this.set_offscreen_redirect(Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY); this.set_offscreen_redirect(Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY);
@ -647,7 +647,7 @@ var WindowOverlay = class {
let params = { let params = {
x, y, width, x, y, width,
duration: Overview.ANIMATION_TIME, duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}; };
if (height !== undefined) if (height !== undefined)
@ -686,7 +686,7 @@ var WindowOverlay = class {
a.ease({ a.ease({
opacity: 255, opacity: 255,
duration: WINDOW_OVERLAY_FADE_TIME, duration: WINDOW_OVERLAY_FADE_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
}); });
} }
@ -697,7 +697,7 @@ var WindowOverlay = class {
a.ease({ a.ease({
opacity: 0, opacity: 0,
duration: WINDOW_OVERLAY_FADE_TIME, duration: WINDOW_OVERLAY_FADE_TIME,
mode: Clutter.AnimationMode.EASE_IN_QUAD mode: Clutter.AnimationMode.EASE_IN_QUAD,
}); });
}); });
} }
@ -759,7 +759,7 @@ Signals.addSignalMethods(WindowOverlay.prototype);
var WindowPositionFlags = { var WindowPositionFlags = {
NONE: 0, NONE: 0,
INITIAL: 1 << 0, INITIAL: 1 << 0,
ANIMATE: 1 << 1 ANIMATE: 1 << 1,
}; };
// Window Thumbnail Layout Algorithm // Window Thumbnail Layout Algorithm
@ -1387,7 +1387,7 @@ class Workspace extends St.Widget {
clone.ease({ clone.ease({
opacity: 255, opacity: 255,
mode: Clutter.AnimationMode.EASE_IN_QUAD, mode: Clutter.AnimationMode.EASE_IN_QUAD,
duration: Overview.ANIMATION_TIME duration: Overview.ANIMATION_TIME,
}); });
} }
@ -1432,7 +1432,7 @@ class Workspace extends St.Widget {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this._showWindowOverlay(clone, overlay); this._showWindowOverlay(clone, overlay);
} },
}); });
clone.overlay.relayout(true); clone.overlay.relayout(true);
} }
@ -1488,7 +1488,7 @@ class Workspace extends St.Widget {
win._overviewHint = { win._overviewHint = {
x: stageX, x: stageX,
y: stageY, y: stageY,
scale: stageWidth / clone.width scale: stageWidth / clone.width,
}; };
} }
clone.destroy(); clone.destroy();
@ -1730,7 +1730,7 @@ class Workspace extends St.Widget {
clone.ease({ clone.ease({
opacity, opacity,
duration, duration,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} else { } else {
// The window is hidden // The window is hidden
@ -1782,7 +1782,7 @@ class Workspace extends St.Widget {
scale_y: 1, scale_y: 1,
opacity: 255, opacity: 255,
duration: Overview.ANIMATION_TIME, duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} else { } else {
// The window is hidden, make it shrink and fade it out // The window is hidden, make it shrink and fade it out
@ -1791,7 +1791,7 @@ class Workspace extends St.Widget {
scale_y: 0, scale_y: 0,
opacity: 0, opacity: 0,
duration: Overview.ANIMATION_TIME, duration: Overview.ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
} }
} }
@ -2033,7 +2033,7 @@ class Workspace extends St.Widget {
win._overviewHint = { win._overviewHint = {
x: actor.x, x: actor.x,
y: actor.y, y: actor.y,
scale: actor.scale_x scale: actor.scale_x,
}; };
let metaWindow = win.get_meta_window(); let metaWindow = win.get_meta_window();

View File

@ -183,7 +183,7 @@ class WorkspaceSwitcherPopup extends St.Widget {
this._container.ease({ this._container.ease({
opacity: 255, opacity: 255,
duration: ANIMATION_TIME, duration: ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
this.show(); this.show();
} }
@ -207,7 +207,7 @@ class WorkspaceSwitcherPopup extends St.Widget {
opacity: 0.0, opacity: 0.0,
duration: ANIMATION_TIME, duration: ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => this.destroy() onComplete: () => this.destroy(),
}); });
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
} }

View File

@ -49,13 +49,13 @@ var WindowClone = GObject.registerClass({
'drag-cancelled': {}, 'drag-cancelled': {},
'drag-end': {}, 'drag-end': {},
'selected': { param_types: [GObject.TYPE_UINT] }, 'selected': { param_types: [GObject.TYPE_UINT] },
} },
}, class WindowClone extends Clutter.Actor { }, class WindowClone extends Clutter.Actor {
_init(realWindow) { _init(realWindow) {
let clone = new Clutter.Clone({ source: realWindow }); let clone = new Clutter.Clone({ source: realWindow });
super._init({ super._init({
layout_manager: new PrimaryActorLayout(clone), layout_manager: new PrimaryActorLayout(clone),
reactive: true reactive: true,
}); });
this._delegate = this; this._delegate = this;
@ -237,7 +237,7 @@ var ThumbnailState = {
ANIMATING_OUT: 4, ANIMATING_OUT: 4,
ANIMATED_OUT: 5, ANIMATED_OUT: 5,
COLLAPSING: 6, COLLAPSING: 6,
DESTROYED: 7 DESTROYED: 7,
}; };
/** /**
@ -253,12 +253,12 @@ var WorkspaceThumbnail = GObject.registerClass({
'slide-position', 'slide-position', 'slide-position', 'slide-position', 'slide-position', 'slide-position',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
0, 1, 0), 0, 1, 0),
} },
}, class WorkspaceThumbnail extends St.Widget { }, class WorkspaceThumbnail extends St.Widget {
_init(metaWorkspace) { _init(metaWorkspace) {
super._init({ super._init({
clip_to_allocation: true, clip_to_allocation: true,
style_class: 'workspace-thumbnail' style_class: 'workspace-thumbnail',
}); });
this._delegate = this; this._delegate = this;
@ -625,8 +625,8 @@ var ThumbnailsBox = GObject.registerClass({
'scale': GObject.ParamSpec.double( 'scale': GObject.ParamSpec.double(
'scale', 'scale', 'scale', 'scale', 'scale', 'scale',
GObject.ParamFlags.READWRITE, GObject.ParamFlags.READWRITE,
0, Infinity, 0) 0, Infinity, 0),
} },
}, class ThumbnailsBox extends St.Widget { }, class ThumbnailsBox extends St.Widget {
_init() { _init() {
super._init({ reactive: true, super._init({ reactive: true,
@ -741,7 +741,7 @@ var ThumbnailsBox = GObject.registerClass({
_onDragBegin() { _onDragBegin() {
this._dragCancelled = false; this._dragCancelled = false;
this._dragMonitor = { this._dragMonitor = {
dragMotion: this._onDragMotion.bind(this) dragMotion: this._onDragMotion.bind(this),
}; };
DND.addDragMonitor(this._dragMonitor); DND.addDragMonitor(this._dragMonitor);
} }
@ -1104,7 +1104,7 @@ var ThumbnailsBox = GObject.registerClass({
onComplete: () => { onComplete: () => {
this._setThumbnailState(thumbnail, ThumbnailState.ANIMATED_OUT); this._setThumbnailState(thumbnail, ThumbnailState.ANIMATED_OUT);
this._queueUpdateStates(); this._queueUpdateStates();
} },
}); });
}); });
@ -1127,7 +1127,7 @@ var ThumbnailsBox = GObject.registerClass({
thumbnail.destroy(); thumbnail.destroy();
this._queueUpdateStates(); this._queueUpdateStates();
} },
}); });
}); });
@ -1135,7 +1135,7 @@ var ThumbnailsBox = GObject.registerClass({
this.ease_property('scale', this._targetScale, { this.ease_property('scale', this._targetScale, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: RESCALE_ANIMATION_TIME, duration: RESCALE_ANIMATION_TIME,
onComplete: () => this._queueUpdateStates() onComplete: () => this._queueUpdateStates(),
}); });
this._pendingScaleUpdate = false; this._pendingScaleUpdate = false;
} }
@ -1152,7 +1152,7 @@ var ThumbnailsBox = GObject.registerClass({
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => { onComplete: () => {
this._setThumbnailState(thumbnail, ThumbnailState.NORMAL); this._setThumbnailState(thumbnail, ThumbnailState.NORMAL);
} },
}); });
}); });
} }
@ -1371,7 +1371,7 @@ var ThumbnailsBox = GObject.registerClass({
onComplete: () => { onComplete: () => {
this._animatingIndicator = false; this._animatingIndicator = false;
this._queueUpdateStates(); this._queueUpdateStates();
} },
}); });
} }
}); });

View File

@ -11,13 +11,13 @@ var WORKSPACE_SWITCH_TIME = 250;
var AnimationType = { var AnimationType = {
ZOOM: 0, ZOOM: 0,
FADE: 1 FADE: 1,
}; };
const MUTTER_SCHEMA = 'org.gnome.mutter'; const MUTTER_SCHEMA = 'org.gnome.mutter';
var WorkspacesViewBase = GObject.registerClass({ var WorkspacesViewBase = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT GTypeFlags: GObject.TypeFlags.ABSTRACT,
}, class WorkspacesViewBase extends St.Widget { }, class WorkspacesViewBase extends St.Widget {
_init(monitorIndex) { _init(monitorIndex) {
super._init({ style_class: 'workspaces-view', reactive: true }); super._init({ style_class: 'workspaces-view', reactive: true });
@ -197,7 +197,7 @@ class WorkspacesView extends WorkspacesViewBase {
if (showAnimation) { if (showAnimation) {
let easeParams = Object.assign(params, { let easeParams = Object.assign(params, {
duration: WORKSPACE_SWITCH_TIME, duration: WORKSPACE_SWITCH_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD mode: Clutter.AnimationMode.EASE_OUT_QUAD,
}); });
// we have to call _updateVisibility() once before the // we have to call _updateVisibility() once before the
// animation and once afterwards - it does not really // animation and once afterwards - it does not really
@ -243,7 +243,7 @@ class WorkspacesView extends WorkspacesViewBase {
this.scrollAdjustment.ease(index, { this.scrollAdjustment.ease(index, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD, mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: WORKSPACE_SWITCH_TIME, duration: WORKSPACE_SWITCH_TIME,
onComplete: () => (this._animatingScroll = false) onComplete: () => (this._animatingScroll = false),
}); });
} }

View File

@ -88,7 +88,7 @@ var XdndHandler = class {
y, y,
dragActor: this._cursorWindowClone ? this._cursorWindowClone : this._dummy, dragActor: this._cursorWindowClone ? this._cursorWindowClone : this._dummy,
source: this, source: this,
targetActor: pickedActor targetActor: pickedActor,
}; };
for (let i = 0; i < DND.dragMonitors.length; i++) { for (let i = 0; i < DND.dragMonitors.length; i++) {