network: Make sure to set the signal icon at dialog item construction time
We forgot to set it here; it would be updated if there was changes in the signal, but not when it was created. https://bugzilla.gnome.org/show_bug.cgi?id=708442
This commit is contained in:
parent
0c57d53e03
commit
fb561f10a7
@ -547,18 +547,24 @@ const NMWirelessDialogItem = new Lang.Class({
|
|||||||
|
|
||||||
this._signalIcon = new St.Icon({ style_class: 'nm-dialog-icon' });
|
this._signalIcon = new St.Icon({ style_class: 'nm-dialog-icon' });
|
||||||
this._icons.add_actor(this._signalIcon);
|
this._icons.add_actor(this._signalIcon);
|
||||||
|
|
||||||
|
this._sync();
|
||||||
|
},
|
||||||
|
|
||||||
|
_sync: function() {
|
||||||
|
this._signalIcon.icon_name = this._getSignalIcon();
|
||||||
},
|
},
|
||||||
|
|
||||||
updateBestAP: function(ap) {
|
updateBestAP: function(ap) {
|
||||||
this._ap = ap;
|
this._ap = ap;
|
||||||
this._signalIcon.icon_name = this._getIcon();
|
this._sync();
|
||||||
},
|
},
|
||||||
|
|
||||||
setActive: function(isActive) {
|
setActive: function(isActive) {
|
||||||
this._selectedIcon.opacity = isActive ? 255 : 0;
|
this._selectedIcon.opacity = isActive ? 255 : 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
_getIcon: function() {
|
_getSignalIcon: function() {
|
||||||
if (this._ap.mode == NM80211Mode.ADHOC)
|
if (this._ap.mode == NM80211Mode.ADHOC)
|
||||||
return 'network-workgroup-symbolic';
|
return 'network-workgroup-symbolic';
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user