BrowserWindow.bjs
[app.webkitpdf] / BrowserWindow.vala
index cddb205..b1dc3b9 100644 (file)
@@ -48,6 +48,7 @@ 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");
                                _this.view.printit();
                                return true;
                });
@@ -122,10 +123,10 @@ public class BrowserWindow : Object
             
             #else
              //listeners
-                        this.el.resource_request_starting.connect( (p0, webres, netreq ) => {
-                          print("resource req. started %s\n", netreq.uri);
+                      //  this.el.resource_request_starting.connect( (p0, webres, netreq ) => {
+                        //  print("resource req. started %s\n", netreq.uri);
                              
-                        });
+                      //  });
                         
                         this.el.load_finished.connect( ( ) => {
                                         
@@ -285,7 +286,7 @@ public class BrowserWindow : Object
                    
                    
         
-                       this.el.print(pe);
+                       this.el.get_main_frame().print(pe);
         
         
                    try {
@@ -309,7 +310,9 @@ public class BrowserWindow : Object
         // what size is the documet.
         
              print("making screenshot\n");
-             
+        #if GTK3
+        
+        #else     
             // fix vapi - get_snapshot add '?' to all null.
             var pixmap = _this.view.el.get_snapshot( null );
         
@@ -333,7 +336,7 @@ public class BrowserWindow : Object
             //});
             Gtk.main_quit();
              
-           
+        #endif