From cc8a95572e66db974af52234f5b9cf1daafc02db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 10 Mar 2010 15:25:08 +0100 Subject: [PATCH] [placeDisplay] Show a message when unmount fails When an unmount operation fails, the only feedback given currently is an exception on stderr. Use the infoBar to display an error message and allow the user to retry the operation. https://bugzilla.gnome.org/show_bug.cgi?id=612200 --- js/ui/placeDisplay.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js index 9e3ed87b0..67da06c65 100644 --- a/js/ui/placeDisplay.js +++ b/js/ui/placeDisplay.js @@ -97,7 +97,14 @@ PlaceDeviceInfo.prototype = { }, _removeFinish: function(o, res, data) { - this._mount.unmount_finish(res); + try { + this._mount.unmount_finish(res); + } catch (e) { + let message = _("Failed to unmount '%s'").format(o.get_name()); + Main.overview.infoBar.setMessage(message, + Lang.bind(this, this.remove), + _("Retry")); + } } };