[gnome-shell/wip/aggregate-menu: 49/51] power: Add an Airplane Mode indicator



commit da153b4a966e5d9777e1cff04976c13faa28000b
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]