[gnome-documents] Please enter the ciommit message for your changes. Lines starting



commit 7ad98cd948ca4e80098ae09c37c9540a21924c82
Author: Anna Zacchi <annazacchi src gnome org>
Date:   Tue Jul 17 23:08:31 2012 +0200

     Please enter the ciommit message for your changes. Lines starting

 src/global.js      |    1 +
 src/mainToolbar.js |    9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/global.js b/src/global.js
index a24c356..e72e2cd 100644
--- a/src/global.js
+++ b/src/global.js
@@ -49,6 +49,7 @@ let settings = null;
 let sourceManager = null;
 let trackerController = null;
 let screen = null;
+let menuWidget = null;
 
 function initSearch() {
     sourceManager = new Sources.SourceManager();
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index c7822e2..40115c4 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -254,6 +254,7 @@ const MainToolbar = new Lang.Class({
         menu.show();
         this._menuButton.set_menu( menu );
         Global.screen = this.widget.get_screen();
+        Global.menuWidget = this._menuButton;//TO DO change this, not global
     },
 
     _populateForOverview: function() {
@@ -398,16 +399,16 @@ function filePrint() {
     let doc = Global.documentManager.getActiveItem();
     //let doc = documentManager.getActiveItem();
     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();
+                let toplevel = Global.menuWidget.get_toplevel();
                 printOp.run(toplevel);
             }));
 };



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