[gnome-documents/rhel-7.4: 9/16] documents: Check whether it is a collection in canPrint



commit c37a9a62610ba301f09d2e53a4004dcbf12dadec
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Apr 20 14:40:40 2017 +0200

    documents: Check whether it is a collection in canPrint
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781533

 src/documents.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index fb0eee9..3bed18c 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -418,6 +418,16 @@ const DocCommon = new Lang.Class({
     },
 
     canPrint: function(docModel, cancellable, callback) {
+        if (this.collection) {
+            Mainloop.idle_add(Lang.bind(this,
+                function() {
+                    callback(this, false);
+                    return GLib.SOURCE_REMOVE;
+                }));
+
+            return;
+        }
+
         if (docModel) {
             Mainloop.idle_add(Lang.bind(this,
                 function() {


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