status/system: Use new indentation style

... before moving stuff around.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
This commit is contained in:
Florian Müllner 2020-07-01 17:38:41 +02:00 committed by Florian Müllner
parent 0b56416d30
commit c723a1b72a

View File

@ -70,8 +70,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this.menu.addMenuItem(item);
this._orientationLockItem = item;
this._systemActions.bind_property('can-lock-orientation',
this._orientationLockItem,
'visible',
this._orientationLockItem, 'visible',
bindFlags);
this._systemActions.connect('notify::orientation-lock-icon', () => {
let iconName = this._systemActions.orientation_lock_icon;
@ -84,8 +83,8 @@ class Indicator extends PanelMenu.SystemIndicator {
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
'gnome-control-center.desktop');
if (app) {
let [icon, name] = [app.app_info.get_icon().names[0],
app.get_name()];
const [icon] = app.app_info.get_icon().names;
const name = app.app_info.get_name();
item = new PopupMenu.PopupImageMenuItem(name, icon);
item.connect('activate', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
@ -107,8 +106,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this.menu.addMenuItem(item);
this._lockScreenItem = item;
this._systemActions.bind_property('can-lock-screen',
this._lockScreenItem,
'visible',
this._lockScreenItem, 'visible',
bindFlags);
this._sessionSubMenu = new PopupMenu.PopupSubMenuMenuItem(
@ -123,8 +121,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this._sessionSubMenu.menu.addMenuItem(item);
this._logoutItem = item;
this._systemActions.bind_property('can-logout',
this._logoutItem,
'visible',
this._logoutItem, 'visible',
bindFlags);
item = new PopupMenu.PopupMenuItem(_("Switch User…"));
@ -135,8 +132,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this._sessionSubMenu.menu.addMenuItem(item);
this._loginScreenItem = item;
this._systemActions.bind_property('can-switch-user',
this._loginScreenItem,
'visible',
this._loginScreenItem, 'visible',
bindFlags);
this._sessionSubMenu.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
@ -149,8 +145,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this._sessionSubMenu.menu.addMenuItem(item);
this._suspendItem = item;
this._systemActions.bind_property('can-suspend',
this._suspendItem,
'visible',
this._suspendItem, 'visible',
bindFlags);
item = new PopupMenu.PopupMenuItem(_("Power Off…"));
@ -161,8 +156,7 @@ class Indicator extends PanelMenu.SystemIndicator {
this._sessionSubMenu.menu.addMenuItem(item);
this._powerOffItem = item;
this._systemActions.bind_property('can-power-off',
this._powerOffItem,
'visible',
this._powerOffItem, 'visible',
bindFlags);
this.menu.addMenuItem(this._sessionSubMenu);