[gnome-shell/wip/aggregate-menu: 94/99] power: Add an Airplane Mode indicator
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/aggregate-menu: 94/99] power: Add an Airplane Mode indicator
- Date: Wed, 12 Jun 2013 20:19:57 +0000 (UTC)
commit e96469108605facc90cad4e853dd142e67f76cff
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jun 6 18:06:38 2013 -0400
power: Add an Airplane Mode indicator
js/ui/status/power.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index 26c607b..ea69316 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -49,6 +49,9 @@ const Indicator = new Lang.Class({
this._batteryItem.menu.addSettingsAction(_("Power Settings"), 'gnome-power-panel.desktop');
this.menu.addMenuItem(this._batteryItem);
+ this._airplaneModeIndicator = this.addIndicator(new Gio.ThemedIcon({ name: 'airplane-mode-symbolic'
}));
+ this._airplaneModeIndicator.hide();
+
// The menu only appears when airplane mode is on, so just
// statically build it as if it was on, rather than dynamically
// changing the menu contents.
@@ -131,7 +134,9 @@ const Indicator = new Lang.Class({
},
_syncAirplaneMode: function() {
- this._airplaneModeMenu.actor.visible = this._proxy.AirplaneMode;
+ let airplaneMode = this._proxy.AirplaneMode;
+ this._airplaneModeIndicator.visible = airplaneMode;
+ this._airplaneModeMenu.actor.visible = airplaneMode;
},
_propertiesChanged: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]