[gnome-shell] panelMenu: Remove the gicon parameter from addIndicator, and make private



commit 73e1f238cfa93e17384769e65abe6baab1619f61
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jul 19 06:05:47 2013 -0400

    panelMenu: Remove the gicon parameter from addIndicator, and make private
    
    There's only two uses 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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705845

 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/volume.js    |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js
index 8bad21d..118ed39 100644
--- a/js/ui/panelMenu.js
+++ b/js/ui/panelMenu.js
@@ -251,9 +251,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 29f8ad8..94ce0c4 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(new Gio.ThemedIcon({ name: 'bluetooth-active-symbolic' }));
+        this._indicator = this._addIndicator();
+        this._indicator.icon_name = 'bluetooth-active-symbolic';
 
         // The Bluetooth menu only appears when Bluetooth is in use,
         // so just statically build it with a "Turn Off" menu item.
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 9be93b1..3ced9ca 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1157,8 +1157,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 bfbc40d..2994f09 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/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]