network: Close Wifi selection dialog when appropriate
Currently when the wifi selection dialog is open when the screen lock is activated, the dialog remains visible above the shield. This is clearly broken, so close the dialog automatically on session mode changes if the mode doesn't allow settings (as changing the access point is arguably a user setting). https://bugzilla.gnome.org/show_bug.cgi?id=780054
This commit is contained in:
parent
577e261d1a
commit
f97a3522e5
@ -769,6 +769,14 @@ const NMWirelessDialog = new Lang.Class({
|
|||||||
this._scanTimeoutId = Mainloop.timeout_add_seconds(15, Lang.bind(this, this._onScanTimeout));
|
this._scanTimeoutId = Mainloop.timeout_add_seconds(15, Lang.bind(this, this._onScanTimeout));
|
||||||
GLib.Source.set_name_by_id(this._scanTimeoutId, '[gnome-shell] this._onScanTimeout');
|
GLib.Source.set_name_by_id(this._scanTimeoutId, '[gnome-shell] this._onScanTimeout');
|
||||||
this._onScanTimeout();
|
this._onScanTimeout();
|
||||||
|
|
||||||
|
let id = Main.sessionMode.connect('updated', () => {
|
||||||
|
if (Main.sessionMode.allowSettings)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Main.sessionMode.disconnect(id);
|
||||||
|
this.close();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user