mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
[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
1 changed files with 8 additions and 1 deletions
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue