[gnome-documents] documents: Don't offer to open in file-roller



commit 4d5256f3fc24263423b8e90dabc5b83d7d013415
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Jun 4 18:08:24 2016 +0200

    documents: Don't offer to open in file-roller
    
    Don't offer to open CBR or CBZ files in file-roller, even if it is
    listed as a recommended application.
    
    file-roller has explicitely handled cbr and cbz files for a long while,
    and despite our efforts to stop documents being opened as archives
    (which worked correctly for EPubs and LibreOffice formats), we should
    try and be more forceful.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=767244
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767252

 src/documents.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index faac2cb..40b3b4e 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -738,6 +738,9 @@ const LocalDocument = new Lang.Class({
             let apps = Gio.app_info_get_recommended_for_type (this.mimeType);
             for (let i = 0; i < apps.length; i++) {
                 if (apps[i].supports_uris ()) {
+                    // Never offer to open in an archive handler
+                    if (apps[i].get_id() == 'org.gnome.FileRoller.desktop')
+                        continue;
                     if (defaultApp && apps[i].equal (defaultApp)) {
                         // Found the recommended app that's also the default
                         recommendedApp = apps[i];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]