[gnome-shell] [placeDisplay] Show a message when unmount fails
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [placeDisplay] Show a message when unmount fails
- Date: Thu, 18 Mar 2010 00:34:12 +0000 (UTC)
commit cc8a95572e66db974af52234f5b9cf1daafc02db
Author: Florian Müllner <fmuellner src gnome org>
Date: Wed Mar 10 15:25:08 2010 +0100
[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 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 9e3ed87..67da06c 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"));
+ }
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]