BrowserWindow.bjs
[app.webkitpdf] / BrowserWindow.vala
index f182747..45734ee 100644 (file)
@@ -47,10 +47,17 @@ public class BrowserWindow : Object
                
                // if we have not finished in 25 seconds
                // call printit...
-                 GLib.Timeout.add_seconds(25, () => { 
-                       stdout.print("Calling printit - timeout 25 seconds");
+               var cd = 25;
+                 GLib.Timeout.add_seconds(1, () => { 
+                       cd--;
+                       print("timeout 25 seconds :%d", cd);
+                       if (cd < 1) {
+                               print("calling printit - timed out", cd);
                                _this.view.printit();
-                               return true;
+                               return true;                    
+                       }
+                       return false;
+        
                });
                
         
@@ -286,7 +293,6 @@ public class BrowserWindow : Object
                    
                    
         
-                       this.el.print(pe);
         
         
                    try {