[gnome-shell/wip/aggregate-menu: 74/75] power: Move the Power Off indicator to the power menu
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/aggregate-menu: 74/75] power: Move the Power Off indicator to the power menu
- Date: Mon, 1 Jul 2013 18:14:18 +0000 (UTC)
commit 4474b6491eb19f5baf3f87b1da3f135a14876800
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jun 17 18:19:20 2013 -0400
power: Move the Power Off indicator to the power menu
It's only supposed to show if we have a battery, and hooking into
the power system is the easiest way of making that happen.
js/ui/panel.js | 3 +--
js/ui/status/power.js | 4 ++--
js/ui/status/system.js | 2 --
3 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index bf3311d..45de02c 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -863,9 +863,8 @@ const AggregateMenu = new Lang.Class({
this._system = new imports.ui.status.system.Indicator();
this._indicators.add_child(this._network.indicators);
- this._indicators.add_child(this._power.indicators);
this._indicators.add_child(this._volume.indicators);
- this._indicators.add_child(this._system.indicators);
+ this._indicators.add_child(this._power.indicators);
this._indicators.add_child(new St.Label({ text: '\u25BE' }));
this.menu.addMenuItem(this._volume.menu);
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index 82568da..3d2b078 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -126,10 +126,10 @@ const Indicator = new Lang.Class({
if (icon) {
let gicon = Gio.icon_new_for_string(icon);
this._primaryIndicator.gicon = gicon;
- this._primaryIndicator.show();
this._batteryItem.icon.gicon = gicon;
} else {
- this._primaryIndicator.hide();
+ // If there's no battery, then we use the power icon.
+ this._primaryIndicator.gicon = 'system-shutdown-symbolic';
}
},
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index ca67f36..370ade3 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -47,8 +47,6 @@ const Indicator = new Lang.Class({
_init: function() {
this.parent();
- this._primaryIndicator = this.addIndicator(new Gio.ThemedIcon({ name: 'system-shutdown-symbolic' }));
-
this._screenSaverSettings = new Gio.Settings({ schema: SCREENSAVER_SCHEMA });
this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
this._privacySettings = new Gio.Settings({ schema: PRIVACY_SCHEMA });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]