[gnome-shell-extensions] places-menu: report errors for mounting of volumes
- From: Christian Kellner <gicmo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] places-menu: report errors for mounting of volumes
- Date: Fri, 28 Apr 2017 13:38:20 +0000 (UTC)
commit c82f8a995bb1c9dd5f6b772454f8c52f76677389
Author: Christian Kellner <christian kellner me>
Date: Fri Apr 28 11:02:10 2017 +0200
places-menu: report errors for mounting of volumes
When launching an application for an uri we detect the case that
the volume is not mounted and try to mount it. If this fails we
don't report any error, so there is no feedback for the user.
extensions/places-menu/placeDisplay.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js
index 3037900..4f27bb6 100644
--- a/extensions/places-menu/placeDisplay.js
+++ b/extensions/places-menu/placeDisplay.js
@@ -50,7 +50,13 @@ const PlaceInfo = new Lang.Class({
Gio.AppInfo.launch_default_for_uri_finish(result);
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) {
this.file.mount_enclosing_volume(0, null, null, (file, result) => {
- file.mount_enclosing_volume_finish(result);
+ try {
+ file.mount_enclosing_volume_finish(result);
+ } catch(e) {
+ Main.notifyError(_("Failed to mount volume for ā%sā").format(this.name), e.message);
+ return;
+ }
+
if (tryMount) {
let callback = this._createLaunchCallback(launchContext, false);
Gio.AppInfo.launch_default_for_uri_async(file.get_uri(),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]