[gnome-shell/wip/aggregate-menu: 95/101] 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: 95/101] power: Add an Airplane Mode indicator
- Date: Mon, 15 Jul 2013 17:19:51 +0000 (UTC)
commit fdd6f1c0a22b6c427591c1c8da46e4949836a26f
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 e38afd3..82568da 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]