[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:
parent
d1108e1e7d
commit
cc8a95572e
@ -97,7 +97,14 @@ PlaceDeviceInfo.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_removeFinish: function(o, res, data) {
|
_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"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user