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
This commit is contained in:
parent
37487c243e
commit
73e1f238cf
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -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 = { };
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user