From de73128d47959cd8938b0ea0d7ed767251355427 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 19 Jun 2012 16:41:39 -0400 Subject: [PATCH] mount-operation: close the password entry on operation abort If the device disappears in the middle of a mount operation, make sure to dismiss the password prompt automatically. https://bugzilla.gnome.org/show_bug.cgi?id=673787 --- js/ui/shellMountOperation.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index f7fbb1890..b91850fa2 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -157,11 +157,19 @@ const ShellMountOperation = new Lang.Class({ }, _onAborted: function(op) { - if (!this._dialog) + if (!this._dialog && !this._source) return; - this._dialog.close(global.get_current_time()); - this._dialog = null; + if (this._dialog) { + this._dialog.close(global.get_current_time()); + this._dialog = null; + } + + if (this._source) { + this._notificationShowing = false; + this._source.destroy(); + this._source = null; + } }, _onShowProcesses2: function(op) {