[gnome-shell/wip/aggregate-menu: 65/74] panelMenu: Remove the gicon parameter from addIndicator, and make private



commit a8e30f135eb5ae6ab0eadab8707b35ffe4811fd2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jun 17 18:21:26 2013 -0400

    panelMenu: Remove the gicon parameter from addIndicator, and make private
    
    There's only one use of the parameter left, which can easily be added as a
    separate line below. Since it's really a private interface meant for the
    indicators, make it private as well so external users are less likely to
    use it.

 js/ui/panelMenu.js        |    5 ++---
 js/ui/status/bluetooth.js |    3 ++-
 js/ui/status/network.js   |    4 ++--
 js/ui/status/power.js     |    2 +-
 js/ui/status/rfkill.js    |    3 ++-
 js/ui/status/volume.js    |    2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js
index 64049d5..a0decf6 100644
--- a/js/ui/panelMenu.js
+++ b/js/ui/panelMenu.js
@@ -256,9 +256,8 @@ const SystemIndicator = new Lang.Class({
         });
     },
 
-    addIndicator: function(gicon) {
-        let icon = new St.Icon({ gicon: gicon,
-                                 style_class: 'system-status-icon' });
+    _addIndicator: function() {
+        let icon = new St.Icon({ style_class: 'system-status-icon' });
         this.indicators.add_actor(icon);
         icon.connect('notify::visible', Lang.bind(this, this._syncIndicatorsVisible));
         this._syncIndicatorsVisible();
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index 81c4325..043a11a 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -20,7 +20,8 @@ const Indicator = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._indicator = this.addIndicator('bluetooth-active-symbolic');
+        this._indicator = this._addIndicator();
+        this._indicator.icon_name = 'bluetooth-active-symbolic';
 
         // The Bluetooth menu only appears when Bluetooth is turned on.
         this._item = new PopupMenu.PopupSubMenuMenuItem(_("Bluetooth"), true);
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 61fdf7e..c679b79 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1075,8 +1075,8 @@ const NMApplet = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._primaryIndicator = this.addIndicator(null);
-        this._vpnIndicator = this.addIndicator(null);
+        this._primaryIndicator = this._addIndicator();
+        this._vpnIndicator = this._addIndicator();
 
         // Device types
         this._dtypes = { };
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index c3e9ed4..59911d7 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -30,7 +30,7 @@ const Indicator = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._indicator = this.addIndicator(null);
+        this._indicator = this._addIndicator();
 
         this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH,
                                             Lang.bind(this, function(proxy, error) {
diff --git a/js/ui/status/rfkill.js b/js/ui/status/rfkill.js
index 2b90e22..9628f2d 100644
--- a/js/ui/status/rfkill.js
+++ b/js/ui/status/rfkill.js
@@ -33,7 +33,8 @@ const Indicator = new Lang.Class({
                                                  this._sync();
                                              }));
 
-        this._indicator = this.addIndicator(new Gio.ThemedIcon({ name: 'airplane-mode-symbolic' }));
+        this._indicator = this._addIndicator();
+        this._indicator.icon_name = 'airplane-mode-symbolic';
         this._indicator.hide();
 
         // The menu only appears when airplane mode is on, so just
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 5a9fed9..b461585 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -301,7 +301,7 @@ const Indicator = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._primaryIndicator = this.addIndicator(null);
+        this._primaryIndicator = this._addIndicator();
 
         this._control = getMixerControl();
         this._volumeMenu = new VolumeMenu(this._control);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]