mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
mountOperation: Close when drive gets disconnected
If the volume that corresponds to the mount operation has an associated drive, we should withdraw any pending dialogs or notifications when the drive gets physically disconnected, as they've become obsolete. Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7302 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3089>
This commit is contained in:
parent
075df42d01
commit
723ccb70ee
1 changed files with 9 additions and 0 deletions
|
|
@ -74,6 +74,10 @@ export class ShellMountOperation {
|
|||
this.close.bind(this));
|
||||
this.mountOp.connect('show-unmount-progress',
|
||||
this._onShowUnmountProgress.bind(this));
|
||||
|
||||
this._drive = source.get_drive();
|
||||
this._drive?.connectObject('disconnected',
|
||||
this.close.bind(this), this);
|
||||
}
|
||||
|
||||
_closeExistingDialog() {
|
||||
|
|
@ -141,6 +145,11 @@ export class ShellMountOperation {
|
|||
this._notifier.done();
|
||||
this._notifier = null;
|
||||
}
|
||||
|
||||
if (this._drive) {
|
||||
this._drive.disconnectObject(this);
|
||||
this._drive = null;
|
||||
}
|
||||
}
|
||||
|
||||
_onShowProcesses2(op) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue