status/system: Use new indentation style
... before moving stuff around. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
This commit is contained in:
parent
0b56416d30
commit
c723a1b72a
@ -70,9 +70,8 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|||||||
this.menu.addMenuItem(item);
|
this.menu.addMenuItem(item);
|
||||||
this._orientationLockItem = item;
|
this._orientationLockItem = item;
|
||||||
this._systemActions.bind_property('can-lock-orientation',
|
this._systemActions.bind_property('can-lock-orientation',
|
||||||
this._orientationLockItem,
|
this._orientationLockItem, 'visible',
|
||||||
'visible',
|
bindFlags);
|
||||||
bindFlags);
|
|
||||||
this._systemActions.connect('notify::orientation-lock-icon', () => {
|
this._systemActions.connect('notify::orientation-lock-icon', () => {
|
||||||
let iconName = this._systemActions.orientation_lock_icon;
|
let iconName = this._systemActions.orientation_lock_icon;
|
||||||
let labelText = this._systemActions.getName("lock-orientation");
|
let labelText = this._systemActions.getName("lock-orientation");
|
||||||
@ -84,8 +83,8 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|||||||
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
|
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
|
||||||
'gnome-control-center.desktop');
|
'gnome-control-center.desktop');
|
||||||
if (app) {
|
if (app) {
|
||||||
let [icon, name] = [app.app_info.get_icon().names[0],
|
const [icon] = app.app_info.get_icon().names;
|
||||||
app.get_name()];
|
const name = app.app_info.get_name();
|
||||||
item = new PopupMenu.PopupImageMenuItem(name, icon);
|
item = new PopupMenu.PopupImageMenuItem(name, icon);
|
||||||
item.connect('activate', () => {
|
item.connect('activate', () => {
|
||||||
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
|
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
|
||||||
@ -107,9 +106,8 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|||||||
this.menu.addMenuItem(item);
|
this.menu.addMenuItem(item);
|
||||||
this._lockScreenItem = item;
|
this._lockScreenItem = item;
|
||||||
this._systemActions.bind_property('can-lock-screen',
|
this._systemActions.bind_property('can-lock-screen',
|
||||||
this._lockScreenItem,
|
this._lockScreenItem, 'visible',
|
||||||
'visible',
|
bindFlags);
|
||||||
bindFlags);
|
|
||||||
|
|
||||||
this._sessionSubMenu = new PopupMenu.PopupSubMenuMenuItem(
|
this._sessionSubMenu = new PopupMenu.PopupSubMenuMenuItem(
|
||||||
_('Power Off / Log Out'), true);
|
_('Power Off / Log Out'), true);
|
||||||
@ -123,9 +121,8 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|||||||
this._sessionSubMenu.menu.addMenuItem(item);
|
this._sessionSubMenu.menu.addMenuItem(item);
|
||||||
this._logoutItem = item;
|
this._logoutItem = item;
|
||||||
this._systemActions.bind_property('can-logout',
|
this._systemActions.bind_property('can-logout',
|
||||||
this._logoutItem,
|
this._logoutItem, 'visible',
|
||||||
'visible',
|
bindFlags);
|
||||||
bindFlags);
|
|
||||||
|
|
||||||
item = new PopupMenu.PopupMenuItem(_("Switch User…"));
|
item = new PopupMenu.PopupMenuItem(_("Switch User…"));
|
||||||
item.connect('activate', () => {
|
item.connect('activate', () => {
|
||||||
@ -135,9 +132,8 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|||||||
this._sessionSubMenu.menu.addMenuItem(item);
|
this._sessionSubMenu.menu.addMenuItem(item);
|
||||||
this._loginScreenItem = item;
|
this._loginScreenItem = item;
|
||||||
this._systemActions.bind_property('can-switch-user',
|
this._systemActions.bind_property('can-switch-user',
|
||||||
this._loginScreenItem,
|
this._loginScreenItem, 'visible',
|
||||||
'visible',
|
bindFlags);
|
||||||
bindFlags);
|
|
||||||
|
|
||||||
this._sessionSubMenu.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this._sessionSubMenu.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
|
|
||||||
@ -149,9 +145,8 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|||||||
this._sessionSubMenu.menu.addMenuItem(item);
|
this._sessionSubMenu.menu.addMenuItem(item);
|
||||||
this._suspendItem = item;
|
this._suspendItem = item;
|
||||||
this._systemActions.bind_property('can-suspend',
|
this._systemActions.bind_property('can-suspend',
|
||||||
this._suspendItem,
|
this._suspendItem, 'visible',
|
||||||
'visible',
|
bindFlags);
|
||||||
bindFlags);
|
|
||||||
|
|
||||||
item = new PopupMenu.PopupMenuItem(_("Power Off…"));
|
item = new PopupMenu.PopupMenuItem(_("Power Off…"));
|
||||||
item.connect('activate', () => {
|
item.connect('activate', () => {
|
||||||
@ -161,9 +156,8 @@ class Indicator extends PanelMenu.SystemIndicator {
|
|||||||
this._sessionSubMenu.menu.addMenuItem(item);
|
this._sessionSubMenu.menu.addMenuItem(item);
|
||||||
this._powerOffItem = item;
|
this._powerOffItem = item;
|
||||||
this._systemActions.bind_property('can-power-off',
|
this._systemActions.bind_property('can-power-off',
|
||||||
this._powerOffItem,
|
this._powerOffItem, 'visible',
|
||||||
'visible',
|
bindFlags);
|
||||||
bindFlags);
|
|
||||||
|
|
||||||
this.menu.addMenuItem(this._sessionSubMenu);
|
this.menu.addMenuItem(this._sessionSubMenu);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user