[gnome-shell/wip/aggregate-menu: 8/17] 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: 8/17] panelMenu: Remove the gicon parameter from addIndicator, and make private
- Date: Fri, 19 Jul 2013 10:07:58 +0000 (UTC)
commit 8ed0454227d064509f8f5abbfcf7d83b7f9d3d06
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.
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 f7e6ab4..aac691b 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 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]