[gnome-documents] documents: Don't open docs without a recommended app
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] documents: Don't open docs without a recommended app
- Date: Fri, 19 Dec 2014 18:44:28 +0000 (UTC)
commit eeb945148a500662622b7e33bc809fb6fd3d4d6c
Author: Bastien Nocera <hadess hadess net>
Date: Tue Dec 16 15:07:31 2014 +0100
documents: Don't open docs without a recommended app
When a document type doesn't have a recommended application (or no
external application at all), don't try to force open it.
This prevents selected but unhandled files from being opened if one
of the selected files can be opened (eg. one ePub + one PDF should only
open the PDF file, and ePub shouldn't get opened in file-roller).
https://bugzilla.gnome.org/show_bug.cgi?id=740978
src/documents.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 3d7ddcf..24c8d08 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -585,6 +585,9 @@ const DocCommon = new Lang.Class({
},
open: function(screen, timestamp) {
+ if (!this.defaultAppName)
+ return;
+
try {
Gtk.show_uri(screen, this.uri, timestamp);
} catch (e) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]