[gnome-shell/wip/aggregate-menu: 52/56] panelMenu: Remove the gicon parameter from addIndicator, and make private
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/aggregate-menu: 52/56] panelMenu: Remove the gicon parameter from addIndicator, and make private
- Date: Tue, 16 Jul 2013 20:58:24 +0000 (UTC)
commit 5167e4856c47150fd1b55b431171a3b1596b8ccb
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 0c1c569..fc6198d 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -27,7 +27,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 424910c..09aa327 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1116,8 +1116,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 81e2ee4..a0a1399 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 615c22a..133a4b4 100644
--- a/js/ui/status/rfkill.js
+++ b/js/ui/status/rfkill.js
@@ -33,7 +33,8 @@ const Indicator = new Lang.Class({
this._syncAirplaneMode();
}));
- 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]