[gnome-shell/eos3.8: 30/255] systemMenu: Customize the system popup menu according to Endless' designs
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/eos3.8: 30/255] systemMenu: Customize the system popup menu according to Endless' designs
- Date: Wed, 10 Jun 2020 19:00:28 +0000 (UTC)
commit 03551b3f4708fcdd8bbb059c03fc5b8c9c55038f
Author: Mario Sanchez Prada <mario endlessm com>
Date: Thu May 4 18:55:14 2017 +0100
systemMenu: Customize the system popup menu according to Endless' designs
Reordered items in system indicator menu, removed the "system" section with
the settings/lock/power buttons and added a new "All Settingsā¦" menu item
on top, separated from the rest of the menu.
js/ui/panel.js | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 9a1af1a25c..218506d960 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -5,6 +5,8 @@ const { Atk, Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Cairo = imports.cairo;
const Animation = imports.ui.animation;
+const AppActivation = imports.ui.appActivation;
+const BoxPointer = imports.ui.boxpointer;
const Config = imports.misc.config;
const CtrlAltTab = imports.ui.ctrlAltTab;
const DND = imports.ui.dnd;
@@ -19,6 +21,9 @@ var APP_MENU_ICON_MARGIN = 0;
var BUTTON_DND_ACTIVATION_TIMEOUT = 250;
+const SETTINGS_TEXT = _('All Settingsā¦');
+const CONTROL_CENTER_LAUNCHER = "gnome-control-center.desktop";
+
// To make sure the panel corners blend nicely with the panel,
// we draw background and borders the same way, e.g. drawing
// them as filled shapes from the outside inwards instead of
@@ -743,7 +748,6 @@ class AggregateMenu extends PanelMenu.Button {
this._rfkill = new imports.ui.status.rfkill.Indicator();
this._volume = new imports.ui.status.volume.Indicator();
this._brightness = new imports.ui.status.brightness.Indicator();
- this._system = new imports.ui.status.system.Indicator();
this._screencast = new imports.ui.status.screencast.Indicator();
this._location = new imports.ui.status.location.Indicator();
this._nightLight = new imports.ui.status.nightLight.Indicator();
@@ -764,8 +768,16 @@ class AggregateMenu extends PanelMenu.Button {
if (!userMode)
this._indicators.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
- this.menu.addMenuItem(this._volume.menu);
- this.menu.addMenuItem(this._brightness.menu);
+ let gicon = new Gio.ThemedIcon({ name: 'applications-system-symbolic' });
+ this.menu.addAction(SETTINGS_TEXT, () => {
+ this.menu.close(BoxPointer.PopupAnimation.NONE);
+ Main.overview.hide();
+
+ let app = Shell.AppSystem.get_default().lookup_app(CONTROL_CENTER_LAUNCHER);
+ let context = new AppActivation.AppActivationContext(app);
+ context.activate();
+ }, gicon);
+
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
if (this._network)
this.menu.addMenuItem(this._network.menu);
@@ -779,12 +791,12 @@ class AggregateMenu extends PanelMenu.Button {
this.menu.addMenuItem(this._power.menu);
this.menu.addMenuItem(this._nightLight.menu);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.menu.addMenuItem(this._system.menu);
+ this.menu.addMenuItem(this._volume.menu);
+ this.menu.addMenuItem(this._brightness.menu);
menuLayout.addSizeChild(this._location.menu.actor);
menuLayout.addSizeChild(this._rfkill.menu.actor);
menuLayout.addSizeChild(this._power.menu.actor);
- menuLayout.addSizeChild(this._system.menu.actor);
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]