quickSettings: Add a "Power Settings" entry to the Power Profiles submenu

This change adds the shortcut so it can be accessible by devices without a battery and to keep consistency with other submenus like the Wi-Fi submenu and the upcoming Bluetooth submenu (Teams/Design/os-mockups#178).

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6111

Part of <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2559>

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2559>
This commit is contained in:
sunflowerskater 2023-01-13 13:09:25 -03:00 committed by Marge Bot
parent ed364e4e41
commit 37c0906755

View File

@ -68,6 +68,8 @@ class PowerProfilesToggle extends QuickMenuToggle {
this._profileSection = new PopupMenu.PopupMenuSection(); this._profileSection = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(this._profileSection); this.menu.addMenuItem(this._profileSection);
this.menu.setHeader('power-profile-balanced-symbolic', _('Power Profiles')); this.menu.setHeader('power-profile-balanced-symbolic', _('Power Profiles'));
this.menu.addSettingsAction(_('Power Settings'),
'gnome-power-panel.desktop');
this._sync(); this._sync();
} }