NetworkMenu: destroy the wifi dialog when the associate device disappears

When the device is removed by NetworkManager, we can't use it
to connect, so the dialog is useless and should be destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=723935
This commit is contained in:
Giovanni Campagna 2014-02-24 17:25:38 +01:00
parent ac76940530
commit c2cc504837

View File

@ -1170,6 +1170,10 @@ const NMDeviceWireless = new Lang.Class({
this._client.disconnect(this._wirelessHwEnabledChangedId);
this._wirelessHwEnabledChangedId = 0;
}
if (this._dialog) {
this._dialog.destroy();
this._dialog = null;
}
this.item.destroy();
},