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



commit dda8999f8af357b5b408820f7576d6deab9cbdf4
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 2569000..c13e033 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]