webkitpdf.vala
authorAlan Knowles <alan@roojs.com>
Tue, 16 Aug 2016 05:18:09 +0000 (13:18 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 16 Aug 2016 05:18:09 +0000 (13:18 +0800)
webkitpdf.vala

index 4595ef4..15606c5 100644 (file)
@@ -1,5 +1,6 @@
 
-// valac   --vapidir=. --thread  webkitpdf.vala  BrowserWindow.vala --pkg glib-2.0 --pkg webkit-1.0 --pkg gtk+-2.0 -o /usr/bin/webkitpdf --target-glib=2.32 
+// valac   --vapidir=. --thread  webkitpdf.vala  BrowserWindow.vala  --vapi=./vapi
+//    --pkg glib-2.0 --pkg webkit-1.0 --pkg gtk+-2.0 -o /usr/bin/webkitpdf --target-glib=2.32 
  
 public class webkitpdf {
  
@@ -53,6 +54,18 @@ public class webkitpdf {
   
         var browser = new BrowserWindow();
         browser.el.show_all();
+ /*
+               var ses = WebKit.get_default_session();
+               ses.request_queued.connect((msg) => {
+                       print("queued request %s\n", msg.uri.to_string(false));
+                       msg.got_headers.connect(() => {
+                               print("got conent type %s\n", msg.response_headers.get_content_type (null));
+                               if (msg.response_headers.get_content_type (null) == "image/jpeg") {
+                                       ses.cancel_message(msg,Soup.KnownStatusCode.CANCELLED);
+                               }
+                       });                     
+               });
+ */
  
         Gtk.main();