[gnome-documents] selections: fix Print selection toolbar action



commit ff48ea2766374360a02e6397ca824a0236c014ad
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Jul 17 14:59:27 2012 -0400

    selections: fix Print selection toolbar action
    
    This broke when we recently changed the callback from Document.load() to
    return an EvDocumentModel instead of an EvDocument.

 src/selections.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/selections.js b/src/selections.js
index 50abf89..685b8cc 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -972,13 +972,13 @@ const SelectionToolbar = new Lang.Class({
 
         let doc = Global.documentManager.getItemById(selection[0]);
         doc.load(null, Lang.bind(this,
-            function(doc, evDoc, error) {
-                if (!evDoc) {
+            function(doc, docModel, error) {
+                if (error) {
                     // TODO: handle error here!
                     return;
                 }
 
-                let printOp = EvView.PrintOperation.new(evDoc);
+                let printOp = EvView.PrintOperation.new(docModel.get_document());
                 let printNotification = new Notifications.PrintNotification(printOp, doc);
 
                 let toplevel = this.widget.get_toplevel();



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