[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
This commit is contained in:
Florian Müllner 2010-03-10 15:25:08 +01:00
parent d1108e1e7d
commit cc8a95572e

View File

@ -97,7 +97,14 @@ PlaceDeviceInfo.prototype = {
}, },
_removeFinish: function(o, res, data) { _removeFinish: function(o, res, data) {
try {
this._mount.unmount_finish(res); 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"));
}
} }
}; };