[gnome-shell/wip/aggregate-menu: 59/59] 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: 59/59] panelMenu: Remove the gicon parameter from addIndicator, and make private
- Date: Mon, 24 Jun 2013 20:06:34 +0000 (UTC)
commit 963ba66ca0b5b26ed9fa893904bf729a23899f75
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 | 2 +-
js/ui/status/network.js | 4 ++--
js/ui/status/power.js | 5 +++--
js/ui/status/volume.js | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js
index 4d13ddd..03af4a8 100644
--- a/js/ui/panelMenu.js
+++ b/js/ui/panelMenu.js
@@ -240,9 +240,8 @@ const SystemIndicator = new Lang.Class({
this.menu = new PopupMenu.PopupMenuSection();
},
- 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);
return icon;
}
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index a7c9646..13b35bf 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -27,7 +27,7 @@ const Indicator = new Lang.Class({
_init: function() {
this.parent();
- this._indicator = this.addIndicator(null);
+ this._indicator = this._addIndicator();
this._applet = new GnomeBluetoothApplet.Applet();
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index e2210e8..16e758e 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1146,8 +1146,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 3d2b078..a1bd1f1 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -32,7 +32,7 @@ const Indicator = new Lang.Class({
_init: function() {
this.parent();
- this._primaryIndicator = this.addIndicator(null);
+ this._primaryIndicator = this._addIndicator();
this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH,
Lang.bind(this, function(proxy, error) {
@@ -49,7 +49,8 @@ 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 = this._addIndicator();
+ this._airplaneModeIndicator.icon_name = 'airplane-mode-symbolic';
this._airplaneModeIndicator.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 8eb68a0..f737e9f 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]