cleanup: Use consistent 4-space indent
This is another bit where we've made good progress, and just need a final push to complete the transition. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2866>
This commit is contained in:
parent
071f92cfb6
commit
9a3913d4a0
@ -70,7 +70,8 @@ export const UserListItem = GObject.registerClass({
|
||||
this._userWidget = new UserWidget.UserWidget(this.user);
|
||||
layout.add(this._userWidget);
|
||||
|
||||
this._userWidget.bind_property('label-actor', this, 'label-actor',
|
||||
this._userWidget.bind_property('label-actor',
|
||||
this, 'label-actor',
|
||||
GObject.BindingFlags.SYNC_CREATE);
|
||||
|
||||
this._timedLoginIndicator = new St.Bin({
|
||||
@ -168,7 +169,8 @@ const UserList = GObject.registerClass({
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.set_policy(St.PolicyType.NEVER,
|
||||
this.set_policy(
|
||||
St.PolicyType.NEVER,
|
||||
St.PolicyType.AUTOMATIC);
|
||||
|
||||
this._box = new St.BoxLayout({
|
||||
@ -833,11 +835,12 @@ export const LoginDialog = GObject.registerClass({
|
||||
this._logoBin.destroy_all_children();
|
||||
const resourceScale = this._logoBin.get_resource_scale();
|
||||
if (this._logoFile) {
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
|
||||
const scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
const texture = this._textureCache.load_file_async(
|
||||
this._logoFile,
|
||||
-1, -1,
|
||||
scaleFactor,
|
||||
resourceScale));
|
||||
scaleFactor, resourceScale);
|
||||
this._logoBin.add_child(texture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,10 @@ const PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface);
|
||||
* @returns {Gio.DBusProxy}
|
||||
*/
|
||||
export function Presence(initCallback, cancellable) {
|
||||
return new PresenceProxy(Gio.DBus.session, 'org.gnome.SessionManager',
|
||||
'/org/gnome/SessionManager/Presence', initCallback, cancellable);
|
||||
return new PresenceProxy(Gio.DBus.session,
|
||||
'org.gnome.SessionManager',
|
||||
'/org/gnome/SessionManager/Presence',
|
||||
initCallback, cancellable);
|
||||
}
|
||||
|
||||
// Note inhibitors are immutable objects, so they don't
|
||||
|
@ -18,8 +18,8 @@ const IntrospectDBusIface = loadInterfaceXML('org.gnome.Shell.Introspect');
|
||||
|
||||
export class IntrospectService {
|
||||
constructor() {
|
||||
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(IntrospectDBusIface,
|
||||
this);
|
||||
this._dbusImpl =
|
||||
Gio.DBusExportedObject.wrapJSObject(IntrospectDBusIface, this);
|
||||
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell/Introspect');
|
||||
Gio.DBus.session.own_name('org.gnome.Shell.Introspect',
|
||||
Gio.BusNameOwnerFlags.REPLACE,
|
||||
@ -32,15 +32,13 @@ export class IntrospectService {
|
||||
this._animationsEnabled = true;
|
||||
|
||||
this._appSystem = Shell.AppSystem.get_default();
|
||||
this._appSystem.connect('app-state-changed',
|
||||
() => {
|
||||
this._appSystem.connect('app-state-changed', () => {
|
||||
this._runningApplicationsDirty = true;
|
||||
this._syncRunningApplications();
|
||||
});
|
||||
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
tracker.connect('notify::focus-app',
|
||||
() => {
|
||||
tracker.connect('notify::focus-app', () => {
|
||||
this._activeApplicationDirty = true;
|
||||
this._syncRunningApplications();
|
||||
});
|
||||
|
@ -38,7 +38,8 @@ function versionCompare(required, reference) {
|
||||
export function canLock() {
|
||||
try {
|
||||
let params = GLib.Variant.new('(ss)', ['org.gnome.DisplayManager.Manager', 'Version']);
|
||||
let result = Gio.DBus.system.call_sync('org.gnome.DisplayManager',
|
||||
let result = Gio.DBus.system.call_sync(
|
||||
'org.gnome.DisplayManager',
|
||||
'/org/gnome/DisplayManager/Manager',
|
||||
'org.freedesktop.DBus.Properties',
|
||||
'Get', params, null,
|
||||
|
@ -98,7 +98,8 @@ export function spawnCommandLine(commandLine) {
|
||||
*/
|
||||
export function spawnApp(argv) {
|
||||
try {
|
||||
let app = Gio.AppInfo.create_from_commandline(argv.join(' '), null,
|
||||
const app = Gio.AppInfo.create_from_commandline(argv.join(' '),
|
||||
null,
|
||||
Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION);
|
||||
|
||||
let context = global.create_app_launch_context(0, -1);
|
||||
|
@ -270,7 +270,8 @@ export class WeatherClient extends Signals.EventEmitter {
|
||||
|
||||
_onGClueLocationChanged() {
|
||||
let geoLocation = this._gclueService.location;
|
||||
let location = GWeather.Location.new_detached(geoLocation.description,
|
||||
let location = GWeather.Location.new_detached(
|
||||
geoLocation.description,
|
||||
null,
|
||||
geoLocation.latitude,
|
||||
geoLocation.longitude);
|
||||
|
@ -96,7 +96,8 @@ class AccessDialog extends ModalDialog.ModalDialog {
|
||||
|
||||
CloseAsync(invocation, _params) {
|
||||
if (this._invocation.get_sender() != invocation.get_sender()) {
|
||||
invocation.return_error_literal(Gio.DBusError,
|
||||
invocation.return_error_literal(
|
||||
Gio.DBusError,
|
||||
Gio.DBusError.ACCESS_DENIED,
|
||||
'');
|
||||
return;
|
||||
@ -120,8 +121,8 @@ class AccessDialog extends ModalDialog.ModalDialog {
|
||||
|
||||
// Delay actual response until the end of the close animation (if any)
|
||||
this.connect('closed', () => {
|
||||
this._invocation.return_value(new GLib.Variant('(ua{sv})',
|
||||
[response, results]));
|
||||
this._invocation.return_value(
|
||||
new GLib.Variant('(ua{sv})', [response, results]));
|
||||
});
|
||||
this.close();
|
||||
}
|
||||
@ -141,7 +142,8 @@ export class AccessDialogDBus {
|
||||
|
||||
AccessDialogAsync(params, invocation) {
|
||||
if (this._accessDialog) {
|
||||
invocation.return_error_literal(Gio.DBusError,
|
||||
invocation.return_error_literal(
|
||||
Gio.DBusError,
|
||||
Gio.DBusError.LIMITS_EXCEEDED,
|
||||
'Already showing a system access dialog');
|
||||
return;
|
||||
@ -151,7 +153,8 @@ export class AccessDialogDBus {
|
||||
// We probably want to use parentWindow and global.display.focus_window
|
||||
// for this check in the future
|
||||
if (appId && `${appId}.desktop` !== this._windowTracker.focus_app.id) {
|
||||
invocation.return_error_literal(Gio.DBusError,
|
||||
invocation.return_error_literal(
|
||||
Gio.DBusError,
|
||||
Gio.DBusError.ACCESS_DENIED,
|
||||
'Only the focused app is allowed to show a system access dialog');
|
||||
return;
|
||||
|
@ -142,7 +142,8 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
||||
// We actually want the second window if we're in the unset state
|
||||
if (this._currentWindow == -1)
|
||||
this._currentWindow = 0;
|
||||
return SwitcherPopup.mod(this._currentWindow + 1,
|
||||
return SwitcherPopup.mod(
|
||||
this._currentWindow + 1,
|
||||
this._items[this._selectedIndex].cachedWindows.length);
|
||||
}
|
||||
|
||||
@ -150,7 +151,8 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
|
||||
// Also assume second window here
|
||||
if (this._currentWindow == -1)
|
||||
this._currentWindow = 1;
|
||||
return SwitcherPopup.mod(this._currentWindow - 1,
|
||||
return SwitcherPopup.mod(
|
||||
this._currentWindow - 1,
|
||||
this._items[this._selectedIndex].cachedWindows.length);
|
||||
}
|
||||
|
||||
@ -1032,8 +1034,8 @@ class WindowIcon extends St.BoxLayout {
|
||||
this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor));
|
||||
|
||||
if (this.app) {
|
||||
this._icon.add_actor(this._createAppIcon(this.app,
|
||||
APP_ICON_SIZE_SMALL));
|
||||
this._icon.add_actor(
|
||||
this._createAppIcon(this.app, APP_ICON_SIZE_SMALL));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -168,7 +168,8 @@ export class AudioDeviceSelectionDBus {
|
||||
let info = this._dbusImpl.get_info();
|
||||
const deviceName = Object.keys(AudioDevice)
|
||||
.filter(dev => AudioDevice[dev] === device)[0].toLowerCase();
|
||||
connection.emit_signal(this._audioSelectionDialog._sender,
|
||||
connection.emit_signal(
|
||||
this._audioSelectionDialog._sender,
|
||||
this._dbusImpl.get_object_path(),
|
||||
info ? info.name : null,
|
||||
'DeviceSelected',
|
||||
|
@ -445,7 +445,8 @@ const Background = GObject.registerClass({
|
||||
let nSteps = 255 / ANIMATION_OPACITY_STEP_INCREMENT;
|
||||
let timePerStep = (this._animation.transitionDuration * 1000) / nSteps;
|
||||
|
||||
let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
|
||||
let interval = Math.max(
|
||||
ANIMATION_MIN_WAKEUP_INTERVAL * 1000,
|
||||
timePerStep);
|
||||
|
||||
if (interval > GLib.MAXUINT32)
|
||||
|
@ -348,7 +348,8 @@ export const BoxPointer = GObject.registerClass({
|
||||
|
||||
if (!skipTopRight) {
|
||||
cr.lineTo(x2 - borderRadius, y1);
|
||||
cr.arc(x2 - borderRadius, y1 + borderRadius, borderRadius,
|
||||
cr.arc(
|
||||
x2 - borderRadius, y1 + borderRadius, borderRadius,
|
||||
3 * Math.PI / 2, Math.PI * 2);
|
||||
}
|
||||
|
||||
@ -369,7 +370,8 @@ export const BoxPointer = GObject.registerClass({
|
||||
|
||||
if (!skipBottomRight) {
|
||||
cr.lineTo(x2, y2 - borderRadius);
|
||||
cr.arc(x2 - borderRadius, y2 - borderRadius, borderRadius,
|
||||
cr.arc(
|
||||
x2 - borderRadius, y2 - borderRadius, borderRadius,
|
||||
0, Math.PI / 2);
|
||||
}
|
||||
|
||||
@ -390,7 +392,8 @@ export const BoxPointer = GObject.registerClass({
|
||||
|
||||
if (!skipBottomLeft) {
|
||||
cr.lineTo(x1 + borderRadius, y2);
|
||||
cr.arc(x1 + borderRadius, y2 - borderRadius, borderRadius,
|
||||
cr.arc(
|
||||
x1 + borderRadius, y2 - borderRadius, borderRadius,
|
||||
Math.PI / 2, Math.PI);
|
||||
}
|
||||
|
||||
@ -411,7 +414,8 @@ export const BoxPointer = GObject.registerClass({
|
||||
|
||||
if (!skipTopLeft) {
|
||||
cr.lineTo(x1, y1 + borderRadius);
|
||||
cr.arc(x1 + borderRadius, y1 + borderRadius, borderRadius,
|
||||
cr.arc(
|
||||
x1 + borderRadius, y1 + borderRadius, borderRadius,
|
||||
Math.PI, 3 * Math.PI / 2);
|
||||
}
|
||||
|
||||
|
@ -226,8 +226,7 @@ class AutomountManager {
|
||||
let prevOperation = this._activeOperations.get(volume);
|
||||
const existingDialog = prevOperation?.borrowDialog();
|
||||
let operation =
|
||||
new ShellMountOperation.ShellMountOperation(volume,
|
||||
{existingDialog});
|
||||
new ShellMountOperation.ShellMountOperation(volume, {existingDialog});
|
||||
this._mountVolume(volume, operation);
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,8 @@ class ChatSource extends MessageTray.Source {
|
||||
_updateAvatarIcon() {
|
||||
this.iconUpdated();
|
||||
if (this._notification) {
|
||||
this._notification.update(this._notification.title,
|
||||
this._notification.update(
|
||||
this._notification.title,
|
||||
this._notification.bannerBodyText,
|
||||
{gicon: this.getIcon()});
|
||||
}
|
||||
@ -631,7 +632,8 @@ class ChatSource extends MessageTray.Source {
|
||||
|
||||
_presenceChanged(_contact, _presence, _status, _message) {
|
||||
if (this._notification) {
|
||||
this._notification.update(this._notification.title,
|
||||
this._notification.update(
|
||||
this._notification.title,
|
||||
this._notification.bannerBodyText,
|
||||
{secondaryGIcon: this.getSecondaryIcon()});
|
||||
}
|
||||
|
@ -130,8 +130,7 @@ export class CtrlAltTabManager {
|
||||
this._popup = new CtrlAltTabPopup(items);
|
||||
this._popup.show(backward, binding, mask);
|
||||
|
||||
this._popup.connect('destroy',
|
||||
() => {
|
||||
this._popup.connect('destroy', () => {
|
||||
this._popup = null;
|
||||
});
|
||||
}
|
||||
|
@ -99,7 +99,8 @@ class DashItemContainer extends St.Widget {
|
||||
let themeNode = this.get_theme_node();
|
||||
forWidth = themeNode.adjust_for_width(forWidth);
|
||||
let [minHeight, natHeight] = super.vfunc_get_preferred_height(forWidth);
|
||||
return themeNode.adjust_preferred_height(minHeight * this.scale_y,
|
||||
return themeNode.adjust_preferred_height(
|
||||
minHeight * this.scale_y,
|
||||
natHeight * this.scale_y);
|
||||
}
|
||||
|
||||
@ -107,7 +108,8 @@ class DashItemContainer extends St.Widget {
|
||||
let themeNode = this.get_theme_node();
|
||||
forHeight = themeNode.adjust_for_height(forHeight);
|
||||
let [minWidth, natWidth] = super.vfunc_get_preferred_width(forHeight);
|
||||
return themeNode.adjust_preferred_width(minWidth * this.scale_x,
|
||||
return themeNode.adjust_preferred_width(
|
||||
minWidth * this.scale_x,
|
||||
natWidth * this.scale_x);
|
||||
}
|
||||
|
||||
@ -512,8 +514,7 @@ export const Dash = GObject.registerClass({
|
||||
_createAppItem(app) {
|
||||
let appIcon = new DashIcon(app);
|
||||
|
||||
appIcon.connect('menu-state-changed',
|
||||
(o, opened) => {
|
||||
appIcon.connect('menu-state-changed', (o, opened) => {
|
||||
this._itemMenuStateChanged(item, opened);
|
||||
});
|
||||
|
||||
@ -663,7 +664,8 @@ export const Dash = GObject.registerClass({
|
||||
|
||||
// Scale the icon's texture to the previous size and
|
||||
// tween to the new size
|
||||
icon.icon.set_size(icon.icon.width * scale,
|
||||
icon.icon.set_size(
|
||||
icon.icon.width * scale,
|
||||
icon.icon.height * scale);
|
||||
|
||||
icon.icon.ease({
|
||||
@ -782,7 +784,8 @@ export const Dash = GObject.registerClass({
|
||||
}
|
||||
|
||||
for (let i = 0; i < addedItems.length; i++) {
|
||||
this._box.insert_child_at_index(addedItems[i].item,
|
||||
this._box.insert_child_at_index(
|
||||
addedItems[i].item,
|
||||
addedItems[i].pos);
|
||||
}
|
||||
|
||||
@ -925,7 +928,8 @@ export const Dash = GObject.registerClass({
|
||||
this._dragPlaceholder = new DragPlaceholderItem();
|
||||
this._dragPlaceholder.child.set_width(this.iconSize);
|
||||
this._dragPlaceholder.child.set_height(this.iconSize / 2);
|
||||
this._box.insert_child_at_index(this._dragPlaceholder,
|
||||
this._box.insert_child_at_index(
|
||||
this._dragPlaceholder,
|
||||
this._dragPlaceholderPos);
|
||||
this._dragPlaceholder.show(fadeIn);
|
||||
}
|
||||
|
14
js/ui/dnd.js
14
js/ui/dnd.js
@ -573,8 +573,8 @@ class _Draggable extends Signals.EventEmitter {
|
||||
}
|
||||
|
||||
_pickTargetActor() {
|
||||
return this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
|
||||
this._dragX, this._dragY);
|
||||
return this._dragActor.get_stage().get_actor_at_pos(
|
||||
Clutter.PickMode.ALL, this._dragX, this._dragY);
|
||||
}
|
||||
|
||||
_updateDragHover() {
|
||||
@ -619,7 +619,8 @@ class _Draggable extends Signals.EventEmitter {
|
||||
// We currently loop through all parents on drag-over even if one of the children has handled it.
|
||||
// We can check the return value of the function and break the loop if it's true if we don't want
|
||||
// to continue checking the parents.
|
||||
let result = target._delegate.handleDragOver(this.actor._delegate,
|
||||
let result = target._delegate.handleDragOver(
|
||||
this.actor._delegate,
|
||||
this._dragActor,
|
||||
targX,
|
||||
targY,
|
||||
@ -648,7 +649,8 @@ class _Draggable extends Signals.EventEmitter {
|
||||
let [stageX, stageY] = event.get_coords();
|
||||
this._dragX = stageX;
|
||||
this._dragY = stageY;
|
||||
this._dragActor.set_position(stageX + this._dragOffsetX,
|
||||
this._dragActor.set_position(
|
||||
stageX + this._dragOffsetX,
|
||||
stageY + this._dragOffsetY);
|
||||
|
||||
this._queueUpdateDragHover();
|
||||
@ -657,8 +659,8 @@ class _Draggable extends Signals.EventEmitter {
|
||||
|
||||
_dragActorDropped(event) {
|
||||
let [dropX, dropY] = event.get_coords();
|
||||
let target = this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL,
|
||||
dropX, dropY);
|
||||
let target = this._dragActor.get_stage().get_actor_at_pos(
|
||||
Clutter.PickMode.ALL, dropX, dropY);
|
||||
|
||||
// We call observers only once per motion with the innermost
|
||||
// target actor. If necessary, the observer can walk the
|
||||
|
@ -272,8 +272,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._rebootButton = null;
|
||||
this._rebootButtonAlt = null;
|
||||
|
||||
this.connect('opened',
|
||||
this._onOpened.bind(this));
|
||||
this.connect('opened', this._onOpened.bind(this));
|
||||
|
||||
this._user.connectObject(
|
||||
'notify::is-loaded', this._sync.bind(this),
|
||||
@ -379,9 +378,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._batteryWarning.visible = this._shouldShowLowBatteryWarning(dialogContent);
|
||||
|
||||
let description;
|
||||
let displayTime = _roundSecondsToInterval(this._totalSecondsToStayOpen,
|
||||
this._secondsLeft,
|
||||
10);
|
||||
let displayTime = _roundSecondsToInterval(
|
||||
this._totalSecondsToStayOpen, this._secondsLeft, 10);
|
||||
|
||||
if (this._user.is_loaded) {
|
||||
let realName = this._user.get_real_name();
|
||||
@ -748,7 +746,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._sessionSection.list.destroy_all_children();
|
||||
|
||||
if (!(this._type in DialogContent)) {
|
||||
invocation.return_dbus_error('org.gnome.Shell.ModalDialog.TypeError',
|
||||
invocation.return_dbus_error(
|
||||
'org.gnome.Shell.ModalDialog.TypeError',
|
||||
'Unknown dialog type requested');
|
||||
return;
|
||||
}
|
||||
@ -781,7 +780,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._updateButtons();
|
||||
|
||||
if (!this.open(timestamp)) {
|
||||
invocation.return_dbus_error('org.gnome.Shell.ModalDialog.GrabError',
|
||||
invocation.return_dbus_error(
|
||||
'org.gnome.Shell.ModalDialog.GrabError',
|
||||
'Cannot grab pointer and keyboard');
|
||||
return;
|
||||
}
|
||||
|
@ -227,10 +227,8 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
|
||||
this._preeditText.text = text.get_text();
|
||||
|
||||
let attrs = text.get_attributes();
|
||||
if (attrs) {
|
||||
this._setTextAttributes(this._preeditText.clutter_text,
|
||||
attrs);
|
||||
}
|
||||
if (attrs)
|
||||
this._setTextAttributes(this._preeditText.clutter_text, attrs);
|
||||
});
|
||||
panelService.connect('show-preedit-text', () => {
|
||||
this._preeditText.show();
|
||||
|
@ -39,16 +39,16 @@ function isPopupMetaWindow(actor) {
|
||||
|
||||
export const MonitorConstraint = GObject.registerClass({
|
||||
Properties: {
|
||||
'primary': GObject.ParamSpec.boolean('primary',
|
||||
'Primary', 'Track primary monitor',
|
||||
'primary': GObject.ParamSpec.boolean(
|
||||
'primary', 'Primary', 'Track primary monitor',
|
||||
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
|
||||
false),
|
||||
'index': GObject.ParamSpec.int('index',
|
||||
'Monitor index', 'Track specific monitor',
|
||||
'index': GObject.ParamSpec.int(
|
||||
'index', 'Monitor index', 'Track specific monitor',
|
||||
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
|
||||
-1, 64, -1),
|
||||
'work-area': GObject.ParamSpec.boolean('work-area',
|
||||
'Work-area', 'Track monitor\'s work-area',
|
||||
'work-area': GObject.ParamSpec.boolean(
|
||||
'work-area', 'Work-area', 'Track monitor\'s work-area',
|
||||
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
|
||||
false),
|
||||
},
|
||||
@ -548,7 +548,8 @@ export const LayoutManager = GObject.registerClass({
|
||||
}
|
||||
|
||||
_updateKeyboardBox() {
|
||||
this.keyboardBox.set_position(this.keyboardMonitor.x,
|
||||
this.keyboardBox.set_position(
|
||||
this.keyboardMonitor.x,
|
||||
this.keyboardMonitor.y + this.keyboardMonitor.height);
|
||||
this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
|
||||
}
|
||||
@ -1148,10 +1149,10 @@ class HotCorner extends Clutter.Actor {
|
||||
|
||||
this._setupFallbackCornerIfNeeded(layoutManager);
|
||||
|
||||
this._pressureBarrier = new PressureBarrier(HOT_CORNER_PRESSURE_THRESHOLD,
|
||||
this._pressureBarrier = new PressureBarrier(
|
||||
HOT_CORNER_PRESSURE_THRESHOLD,
|
||||
HOT_CORNER_PRESSURE_TIMEOUT,
|
||||
Shell.ActionMode.NORMAL |
|
||||
Shell.ActionMode.OVERVIEW);
|
||||
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW);
|
||||
this._pressureBarrier.connect('trigger', this._toggleOverview.bind(this));
|
||||
|
||||
let px = 0.0;
|
||||
|
@ -699,9 +699,8 @@ const Inspector = GObject.registerClass({
|
||||
|
||||
_update(event) {
|
||||
let [stageX, stageY] = event.get_coords();
|
||||
let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL,
|
||||
stageX,
|
||||
stageY);
|
||||
let target = global.stage.get_actor_at_pos(
|
||||
Clutter.PickMode.ALL, stageX, stageY);
|
||||
|
||||
if (target != this._pointerTarget)
|
||||
this._target = target;
|
||||
@ -1590,7 +1589,8 @@ class LookingGlass extends St.BoxLayout {
|
||||
this.width = myWidth;
|
||||
this.height = myHeight;
|
||||
this._objInspector.set_size(Math.floor(myWidth * 0.8), Math.floor(myHeight * 0.8));
|
||||
this._objInspector.set_position(this.x + Math.floor(myWidth * 0.1),
|
||||
this._objInspector.set_position(
|
||||
this.x + Math.floor(myWidth * 0.1),
|
||||
this._targetY + Math.floor(myHeight * 0.1));
|
||||
}
|
||||
|
||||
@ -1663,7 +1663,8 @@ class LookingGlass extends St.BoxLayout {
|
||||
this.setBorderPaintTarget(null);
|
||||
|
||||
let settings = St.Settings.get();
|
||||
let duration = Math.min(LG_ANIMATION_TIME / settings.slow_down_factor,
|
||||
let duration = Math.min(
|
||||
LG_ANIMATION_TIME / settings.slow_down_factor,
|
||||
LG_ANIMATION_TIME);
|
||||
this.ease({
|
||||
y: this._hiddenY,
|
||||
|
@ -1889,7 +1889,8 @@ class Crosshairs extends Clutter.Actor {
|
||||
this._clones.push(crosshairsActor);
|
||||
|
||||
// Clones don't share visibility.
|
||||
this.bind_property('visible', crosshairsActor, 'visible',
|
||||
this.bind_property('visible',
|
||||
crosshairsActor, 'visible',
|
||||
GObject.BindingFlags.SYNC_CREATE);
|
||||
}
|
||||
|
||||
|
@ -107,14 +107,13 @@ function _sessionUpdated() {
|
||||
if (sessionMode.isPrimary)
|
||||
_loadDefaultStylesheet();
|
||||
|
||||
wm.allowKeybinding('overlay-key', Shell.ActionMode.NORMAL |
|
||||
Shell.ActionMode.OVERVIEW);
|
||||
wm.allowKeybinding('overlay-key',
|
||||
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW);
|
||||
|
||||
wm.allowKeybinding('locate-pointer-key', Shell.ActionMode.ALL);
|
||||
|
||||
wm.setCustomKeybindingHandler('panel-run-dialog',
|
||||
Shell.ActionMode.NORMAL |
|
||||
Shell.ActionMode.OVERVIEW,
|
||||
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
|
||||
sessionMode.hasRunDialog ? openRunDialog : null);
|
||||
|
||||
if (!sessionMode.hasRunDialog) {
|
||||
|
@ -216,10 +216,8 @@ class ScaleLayout extends Clutter.BinLayout {
|
||||
|
||||
const LabelExpanderLayout = GObject.registerClass({
|
||||
Properties: {
|
||||
'expansion': GObject.ParamSpec.double('expansion',
|
||||
'Expansion',
|
||||
'Expansion of the layout, between 0 (collapsed) ' +
|
||||
'and 1 (fully expanded',
|
||||
'expansion': GObject.ParamSpec.double(
|
||||
'expansion', 'Expansion', 'Expansion',
|
||||
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
|
||||
0, 1, 0),
|
||||
},
|
||||
|
@ -906,8 +906,7 @@ export const MessageTray = GObject.registerClass({
|
||||
Main.wm.addKeybinding('focus-active-notification',
|
||||
new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}),
|
||||
Meta.KeyBindingFlags.NONE,
|
||||
Shell.ActionMode.NORMAL |
|
||||
Shell.ActionMode.OVERVIEW,
|
||||
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
|
||||
this._expandActiveNotification.bind(this));
|
||||
|
||||
this._sources = new Set();
|
||||
|
@ -26,7 +26,8 @@ export const State = {
|
||||
|
||||
export const ModalDialog = GObject.registerClass({
|
||||
Properties: {
|
||||
'state': GObject.ParamSpec.int('state', 'Dialog state', 'state',
|
||||
'state': GObject.ParamSpec.int(
|
||||
'state', 'Dialog state', 'state',
|
||||
GObject.ParamFlags.READABLE,
|
||||
Math.min(...Object.values(State)),
|
||||
Math.max(...Object.values(State)),
|
||||
|
@ -48,8 +48,13 @@ class FdoNotificationDaemon {
|
||||
width, height, rowStride, hasAlpha,
|
||||
bitsPerSample, nChannels_, data,
|
||||
] = hints['image-data'];
|
||||
return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
|
||||
bitsPerSample, width, height, rowStride);
|
||||
return Shell.util_create_pixbuf_from_data(data,
|
||||
GdkPixbuf.Colorspace.RGB,
|
||||
hasAlpha,
|
||||
bitsPerSample,
|
||||
width,
|
||||
height,
|
||||
rowStride);
|
||||
} else if (hints['image-path']) {
|
||||
return this._iconForNotificationData(hints['image-path']);
|
||||
}
|
||||
|
@ -76,7 +76,8 @@ export class OsdMonitorLabeler {
|
||||
return this._client == client;
|
||||
|
||||
this._client = client;
|
||||
this._clientWatchId = Gio.bus_watch_name(Gio.BusType.SESSION, client, 0, null,
|
||||
this._clientWatchId = Gio.bus_watch_name(Gio.BusType.SESSION,
|
||||
client, 0, null,
|
||||
(c, name) => {
|
||||
this.hide(name);
|
||||
});
|
||||
|
@ -292,20 +292,17 @@ const ActionEditor = GObject.registerClass({
|
||||
|
||||
const PadDiagram = GObject.registerClass({
|
||||
Properties: {
|
||||
'left-handed': GObject.ParamSpec.boolean('left-handed',
|
||||
'left-handed', 'Left handed',
|
||||
GObject.ParamFlags.READWRITE |
|
||||
GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||
'left-handed': GObject.ParamSpec.boolean(
|
||||
'left-handed', 'left-handed', 'Left handed',
|
||||
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||
false),
|
||||
'image': GObject.ParamSpec.string('image', 'image', 'Image',
|
||||
GObject.ParamFlags.READWRITE |
|
||||
GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||
'image': GObject.ParamSpec.string(
|
||||
'image', 'image', 'Image',
|
||||
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||
null),
|
||||
'editor-actor': GObject.ParamSpec.object('editor-actor',
|
||||
'editor-actor',
|
||||
'Editor actor',
|
||||
GObject.ParamFlags.READWRITE |
|
||||
GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||
'editor-actor': GObject.ParamSpec.object(
|
||||
'editor-actor', 'editor-actor', 'Editor actor',
|
||||
GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY,
|
||||
Clutter.Actor.$gtype),
|
||||
},
|
||||
}, class PadDiagram extends St.DrawingArea {
|
||||
@ -899,7 +896,8 @@ export const PadOsd = GObject.registerClass({
|
||||
this._editedAction = {type, number, dir, mode};
|
||||
|
||||
const settingsPath = `${this._settings.path}${key}/`;
|
||||
this._editedActionSettings = Gio.Settings.new_with_path('org.gnome.desktop.peripherals.tablet.pad-button',
|
||||
this._editedActionSettings = Gio.Settings.new_with_path(
|
||||
'org.gnome.desktop.peripherals.tablet.pad-button',
|
||||
settingsPath);
|
||||
this._actionEditor.setSettings(this._editedActionSettings, type);
|
||||
this._padDiagram.startEdition(type, number, dir);
|
||||
@ -964,7 +962,8 @@ export class PadOsdService extends Signals.EventEmitter {
|
||||
});
|
||||
|
||||
if (padDevice == null) {
|
||||
invocation.return_error_literal(Gio.IOErrorEnum,
|
||||
invocation.return_error_literal(
|
||||
Gio.IOErrorEnum,
|
||||
Gio.IOErrorEnum.CANCELLED,
|
||||
'Invalid params');
|
||||
return;
|
||||
|
@ -496,7 +496,8 @@ class Panel extends St.Widget {
|
||||
});
|
||||
|
||||
Main.layoutManager.panelBox.add(this);
|
||||
Main.ctrlAltTabManager.addGroup(this, _('Top Bar'), 'focus-top-bar-symbolic',
|
||||
Main.ctrlAltTabManager.addGroup(this,
|
||||
_('Top Bar'), 'focus-top-bar-symbolic',
|
||||
{sortGroup: CtrlAltTab.SortGroup.TOP});
|
||||
|
||||
Main.sessionMode.connect('updated', this._updatePanel.bind(this));
|
||||
@ -542,14 +543,13 @@ class Panel extends St.Widget {
|
||||
childBox.y1 = 0;
|
||||
childBox.y2 = allocHeight;
|
||||
if (this.get_text_direction() == Clutter.TextDirection.RTL) {
|
||||
childBox.x1 = Math.max(allocWidth - Math.min(Math.floor(sideWidth),
|
||||
leftNaturalWidth),
|
||||
childBox.x1 = Math.max(
|
||||
allocWidth - Math.min(Math.floor(sideWidth), leftNaturalWidth),
|
||||
0);
|
||||
childBox.x2 = allocWidth;
|
||||
} else {
|
||||
childBox.x1 = 0;
|
||||
childBox.x2 = Math.min(Math.floor(sideWidth),
|
||||
leftNaturalWidth);
|
||||
childBox.x2 = Math.min(Math.floor(sideWidth), leftNaturalWidth);
|
||||
}
|
||||
this._leftBox.allocate(childBox);
|
||||
|
||||
@ -563,11 +563,10 @@ class Panel extends St.Widget {
|
||||
childBox.y2 = allocHeight;
|
||||
if (this.get_text_direction() == Clutter.TextDirection.RTL) {
|
||||
childBox.x1 = 0;
|
||||
childBox.x2 = Math.min(Math.floor(sideWidth),
|
||||
rightNaturalWidth);
|
||||
childBox.x2 = Math.min(Math.floor(sideWidth), rightNaturalWidth);
|
||||
} else {
|
||||
childBox.x1 = Math.max(allocWidth - Math.min(Math.floor(sideWidth),
|
||||
rightNaturalWidth),
|
||||
childBox.x1 = Math.max(
|
||||
allocWidth - Math.min(Math.floor(sideWidth), rightNaturalWidth),
|
||||
0);
|
||||
childBox.x2 = allocWidth;
|
||||
}
|
||||
|
@ -65,10 +65,12 @@ export function arrowIcon(side) {
|
||||
|
||||
export const PopupBaseMenuItem = GObject.registerClass({
|
||||
Properties: {
|
||||
'active': GObject.ParamSpec.boolean('active', 'active', 'active',
|
||||
'active': GObject.ParamSpec.boolean(
|
||||
'active', 'active', 'active',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
false),
|
||||
'sensitive': GObject.ParamSpec.boolean('sensitive', 'sensitive', 'sensitive',
|
||||
'sensitive': GObject.ParamSpec.boolean(
|
||||
'sensitive', 'sensitive', 'sensitive',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
true),
|
||||
},
|
||||
|
@ -232,8 +232,13 @@ class RemoteSearchProvider {
|
||||
width, height, rowStride, hasAlpha,
|
||||
bitsPerSample, nChannels_, data,
|
||||
] = meta['icon-data'];
|
||||
gicon = Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
|
||||
bitsPerSample, width, height, rowStride);
|
||||
gicon = Shell.util_create_pixbuf_from_data(data,
|
||||
GdkPixbuf.Colorspace.RGB,
|
||||
hasAlpha,
|
||||
bitsPerSample,
|
||||
width,
|
||||
height,
|
||||
rowStride);
|
||||
}
|
||||
|
||||
if (gicon)
|
||||
|
@ -2328,9 +2328,8 @@ export class ScreenshotService {
|
||||
}
|
||||
|
||||
let shooter = new Shell.Screenshot();
|
||||
shooter._watchNameId =
|
||||
Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
||||
this._onNameVanished.bind(this));
|
||||
shooter._watchNameId = Gio.bus_watch_name(Gio.BusType.SESSION,
|
||||
sender, 0, null, this._onNameVanished.bind(this));
|
||||
|
||||
this._screenShooter.set(sender, shooter);
|
||||
|
||||
@ -2460,7 +2459,8 @@ export class ScreenshotService {
|
||||
let [x, y, width, height, flash, filename] = params;
|
||||
[x, y, width, height] = this._scaleArea(x, y, width, height);
|
||||
if (!this._checkArea(x, y, width, height)) {
|
||||
invocation.return_error_literal(Gio.IOErrorEnum,
|
||||
invocation.return_error_literal(
|
||||
Gio.IOErrorEnum,
|
||||
Gio.IOErrorEnum.CANCELLED,
|
||||
'Invalid params');
|
||||
return;
|
||||
@ -2565,7 +2565,8 @@ export class ScreenshotService {
|
||||
let [x, y, width, height] = params;
|
||||
[x, y, width, height] = this._scaleArea(x, y, width, height);
|
||||
if (!this._checkArea(x, y, width, height)) {
|
||||
invocation.return_error_literal(Gio.IOErrorEnum,
|
||||
invocation.return_error_literal(
|
||||
Gio.IOErrorEnum,
|
||||
Gio.IOErrorEnum.CANCELLED,
|
||||
'Invalid params');
|
||||
return;
|
||||
|
@ -172,9 +172,8 @@ export async function disableHelperAutoExit() {
|
||||
* within a performance automation script
|
||||
*/
|
||||
export function defineScriptEvent(name, description) {
|
||||
Shell.PerfLog.get_default().define_event(`script.${name}`,
|
||||
description,
|
||||
'');
|
||||
Shell.PerfLog.get_default().define_event(
|
||||
`script.${name}`, description, '');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -218,7 +217,8 @@ function _collect(scriptModule, outputFile) {
|
||||
|
||||
if (outputFile) {
|
||||
let f = Gio.file_new_for_path(outputFile);
|
||||
let raw = f.replace(null, false,
|
||||
let raw = f.replace(null,
|
||||
false,
|
||||
Gio.FileCreateFlags.NONE,
|
||||
null);
|
||||
let out = Gio.BufferedOutputStream.new_sized(raw, 4096);
|
||||
|
@ -135,8 +135,9 @@ class GridSearchResult extends SearchResult {
|
||||
|
||||
this.style_class = 'grid-search-result';
|
||||
|
||||
this.icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
||||
{createIcon: this.metaInfo['createIcon']});
|
||||
this.icon = new IconGrid.BaseIcon(this.metaInfo['name'], {
|
||||
createIcon: this.metaInfo['createIcon'],
|
||||
});
|
||||
let content = new St.Bin({
|
||||
child: this.icon,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
|
@ -194,7 +194,8 @@ export class SessionMode extends Signals.EventEmitter {
|
||||
let params = _modes[this.currentMode];
|
||||
let defaults;
|
||||
if (params.parentMode) {
|
||||
defaults = Params.parse(_modes[params.parentMode],
|
||||
defaults = Params.parse(
|
||||
_modes[params.parentMode],
|
||||
_modes[DEFAULT_MODE]);
|
||||
} else {
|
||||
defaults = _modes[DEFAULT_MODE];
|
||||
|
@ -303,8 +303,8 @@ export class GnomeShell {
|
||||
this._grabbedAccelerators.set(bindingAction, sender);
|
||||
|
||||
if (!this._grabbers.has(sender)) {
|
||||
let id = Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null,
|
||||
this._onGrabberBusNameVanished.bind(this));
|
||||
let id = Gio.bus_watch_name(Gio.BusType.SESSION,
|
||||
sender, 0, null, this._onGrabberBusNameVanished.bind(this));
|
||||
this._grabbers.set(sender, id);
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ class GnomeShellExtensions {
|
||||
new GLib.Variant('(sa{sv})', [newState.uuid, state]));
|
||||
|
||||
this._dbusImpl.emit_signal('ExtensionStatusChanged',
|
||||
GLib.Variant.new('(sis)', [newState.uuid, newState.state, newState.error]));
|
||||
new GLib.Variant('(sis)', [newState.uuid, newState.state, newState.error]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,8 +141,9 @@ export function addContextMenu(entry, params) {
|
||||
params = Params.parse(params, {actionMode: Shell.ActionMode.POPUP});
|
||||
|
||||
entry.menu = new EntryMenu(entry);
|
||||
entry._menuManager = new PopupMenu.PopupMenuManager(entry,
|
||||
{actionMode: params.actionMode});
|
||||
entry._menuManager = new PopupMenu.PopupMenuManager(entry, {
|
||||
actionMode: params.actionMode,
|
||||
});
|
||||
entry._menuManager.addMenu(entry.menu);
|
||||
|
||||
// Add an event handler to both the entry and its clutter_text; the former
|
||||
|
@ -543,7 +543,8 @@ export class GnomeShellMountOpHandler {
|
||||
constructor() {
|
||||
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellMountOpIface, this);
|
||||
this._dbusImpl.export(Gio.DBus.session, '/org/gtk/MountOperationHandler');
|
||||
Gio.bus_own_name_on_connection(Gio.DBus.session, 'org.gtk.MountOperationHandler',
|
||||
Gio.bus_own_name_on_connection(Gio.DBus.session,
|
||||
'org.gtk.MountOperationHandler',
|
||||
Gio.BusNameOwnerFlags.REPLACE, null, null);
|
||||
|
||||
this._dialog = null;
|
||||
|
@ -46,34 +46,39 @@ class ATIndicator extends PanelMenu.Button {
|
||||
let highContrast = this._buildItem(_('High Contrast'), A11Y_INTERFACE_SCHEMA, KEY_HIGH_CONTRAST);
|
||||
this.menu.addMenuItem(highContrast);
|
||||
|
||||
let magnifier = this._buildItem(_('Zoom'), APPLICATIONS_SCHEMA,
|
||||
'screen-magnifier-enabled');
|
||||
const magnifier = this._buildItem(_('Zoom'),
|
||||
APPLICATIONS_SCHEMA, 'screen-magnifier-enabled');
|
||||
this.menu.addMenuItem(magnifier);
|
||||
|
||||
let textZoom = this._buildFontItem();
|
||||
this.menu.addMenuItem(textZoom);
|
||||
|
||||
let screenReader = this._buildItem(_('Screen Reader'), APPLICATIONS_SCHEMA,
|
||||
'screen-reader-enabled');
|
||||
const screenReader = this._buildItem(_('Screen Reader'),
|
||||
APPLICATIONS_SCHEMA, 'screen-reader-enabled');
|
||||
this.menu.addMenuItem(screenReader);
|
||||
|
||||
let screenKeyboard = this._buildItem(_('Screen Keyboard'), APPLICATIONS_SCHEMA,
|
||||
'screen-keyboard-enabled');
|
||||
const screenKeyboard = this._buildItem(_('Screen Keyboard'),
|
||||
APPLICATIONS_SCHEMA, 'screen-keyboard-enabled');
|
||||
this.menu.addMenuItem(screenKeyboard);
|
||||
|
||||
let visualBell = this._buildItem(_('Visual Alerts'), WM_SCHEMA, KEY_VISUAL_BELL);
|
||||
const visualBell = this._buildItem(_('Visual Alerts'),
|
||||
WM_SCHEMA, KEY_VISUAL_BELL);
|
||||
this.menu.addMenuItem(visualBell);
|
||||
|
||||
let stickyKeys = this._buildItem(_('Sticky Keys'), A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED);
|
||||
const stickyKeys = this._buildItem(_('Sticky Keys'),
|
||||
A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED);
|
||||
this.menu.addMenuItem(stickyKeys);
|
||||
|
||||
let slowKeys = this._buildItem(_('Slow Keys'), A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED);
|
||||
const slowKeys = this._buildItem(_('Slow Keys'),
|
||||
A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED);
|
||||
this.menu.addMenuItem(slowKeys);
|
||||
|
||||
let bounceKeys = this._buildItem(_('Bounce Keys'), A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
|
||||
const bounceKeys = this._buildItem(_('Bounce Keys'),
|
||||
A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
|
||||
this.menu.addMenuItem(bounceKeys);
|
||||
|
||||
let mouseKeys = this._buildItem(_('Mouse Keys'), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
|
||||
const mouseKeys = this._buildItem(_('Mouse Keys'),
|
||||
A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
|
||||
this.menu.addMenuItem(mouseKeys);
|
||||
|
||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
|
@ -1020,13 +1020,13 @@ class InputSourceIndicator extends PanelMenu.Button {
|
||||
if (group[j] == item) {
|
||||
item.setOrnament(PopupMenu.Ornament.DOT);
|
||||
item.prop.set_state(IBus.PropState.CHECKED);
|
||||
ibusManager.activateProperty(item.prop.get_key(),
|
||||
IBus.PropState.CHECKED);
|
||||
ibusManager.activateProperty(
|
||||
item.prop.get_key(), IBus.PropState.CHECKED);
|
||||
} else {
|
||||
group[j].setOrnament(PopupMenu.Ornament.NONE);
|
||||
group[j].prop.set_state(IBus.PropState.UNCHECKED);
|
||||
ibusManager.activateProperty(group[j].prop.get_key(),
|
||||
IBus.PropState.UNCHECKED);
|
||||
ibusManager.activateProperty(
|
||||
group[j].prop.get_key(), IBus.PropState.UNCHECKED);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1038,12 +1038,12 @@ class InputSourceIndicator extends PanelMenu.Button {
|
||||
item.connect('toggled', () => {
|
||||
if (item.state) {
|
||||
item.prop.set_state(IBus.PropState.CHECKED);
|
||||
ibusManager.activateProperty(item.prop.get_key(),
|
||||
IBus.PropState.CHECKED);
|
||||
ibusManager.activateProperty(
|
||||
item.prop.get_key(), IBus.PropState.CHECKED);
|
||||
} else {
|
||||
item.prop.set_state(IBus.PropState.UNCHECKED);
|
||||
ibusManager.activateProperty(item.prop.get_key(),
|
||||
IBus.PropState.UNCHECKED);
|
||||
ibusManager.activateProperty(
|
||||
item.prop.get_key(), IBus.PropState.UNCHECKED);
|
||||
}
|
||||
});
|
||||
break;
|
||||
@ -1052,8 +1052,8 @@ class InputSourceIndicator extends PanelMenu.Button {
|
||||
item = new PopupMenu.PopupMenuItem(prop.get_label().get_text());
|
||||
item.prop = prop;
|
||||
item.connect('activate', () => {
|
||||
ibusManager.activateProperty(item.prop.get_key(),
|
||||
item.prop.get_state());
|
||||
ibusManager.activateProperty(
|
||||
item.prop.get_key(), item.prop.get_state());
|
||||
});
|
||||
break;
|
||||
|
||||
|
@ -97,9 +97,7 @@ class Client extends Signals.EventEmitter {
|
||||
|
||||
_onDeviceAdded(proxy, emitter, params) {
|
||||
let [path] = params;
|
||||
let device = new BoltDeviceProxy(Gio.DBus.system,
|
||||
BOLT_DBUS_NAME,
|
||||
path);
|
||||
let device = new BoltDeviceProxy(Gio.DBus.system, BOLT_DBUS_NAME, path);
|
||||
this.emit('device-added', device);
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,8 @@ class UserWidget extends St.BoxLayout {
|
||||
this._label = new UserWidgetLabel(user);
|
||||
this.add_child(this._label);
|
||||
|
||||
this._label.bind_property('label-actor', this, 'label-actor',
|
||||
this._label.bind_property('label-actor',
|
||||
this, 'label-actor',
|
||||
GObject.BindingFlags.SYNC_CREATE);
|
||||
|
||||
this._user.connectObject(
|
||||
|
@ -897,8 +897,8 @@ export class WindowManager {
|
||||
Main.osdWindowManager.show(monitorIndex, icon, label, null);
|
||||
});
|
||||
|
||||
this._gsdWacomProxy = new GsdWacomProxy(Gio.DBus.session, GSD_WACOM_BUS_NAME,
|
||||
GSD_WACOM_OBJECT_PATH,
|
||||
this._gsdWacomProxy = new GsdWacomProxy(Gio.DBus.session,
|
||||
GSD_WACOM_BUS_NAME, GSD_WACOM_OBJECT_PATH,
|
||||
(proxy, error) => {
|
||||
if (error)
|
||||
log(error.message);
|
||||
@ -1243,7 +1243,8 @@ export class WindowManager {
|
||||
let [success, geom] = actor.meta_window.get_icon_geometry();
|
||||
if (success) {
|
||||
actor.set_position(geom.x, geom.y);
|
||||
actor.set_scale(geom.width / actor.width,
|
||||
actor.set_scale(
|
||||
geom.width / actor.width,
|
||||
geom.height / actor.height);
|
||||
} else {
|
||||
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
|
||||
|
@ -998,7 +998,8 @@ export const ThumbnailsBox = GObject.registerClass({
|
||||
for (let k = start; k < start + count; k++) {
|
||||
let metaWorkspace = workspaceManager.get_workspace_by_index(k);
|
||||
let thumbnail = new WorkspaceThumbnail(metaWorkspace, this._monitorIndex);
|
||||
thumbnail.setPorthole(this._porthole.x, this._porthole.y,
|
||||
thumbnail.setPorthole(
|
||||
this._porthole.x, this._porthole.y,
|
||||
this._porthole.width, this._porthole.height);
|
||||
this._thumbnails.push(thumbnail);
|
||||
this.add_actor(thumbnail);
|
||||
|
@ -1,12 +1,5 @@
|
||||
rules:
|
||||
eqeqeq: off
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
- ignoredNodes:
|
||||
- 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child'
|
||||
CallExpression:
|
||||
arguments: first
|
||||
jsdoc/check-alignment: off
|
||||
jsdoc/check-param-names: off
|
||||
jsdoc/check-tag-names: off
|
||||
|
Loading…
Reference in New Issue
Block a user