BrowserWindow.bjs
[app.webkitpdf] / BrowserWindow.vala
index 6efbbd4..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, () => { 
-                       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;
+        
                });