X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=BrowserWindow.vala;h=374f98376fb647a76ed368147876ec589f7ccb53;hb=540e14a6f2e19a4e9753ed2d15abcec9df6187df;hp=e985b4426e68237fc7603c5572709b8bc5cbff1a;hpb=f4fd15964df342c398da3090147ada810d31ce2c;p=app.webkitpdf diff --git a/BrowserWindow.vala b/BrowserWindow.vala index e985b44..374f983 100644 --- a/BrowserWindow.vala +++ b/BrowserWindow.vala @@ -4,7 +4,7 @@ public class BrowserWindow : Object { public Gtk.Window el; private BrowserWindow _this; - + private string cookie_file; public static BrowserWindow singleton() { if (_BrowserWindow == null) { @@ -52,8 +52,6 @@ public class BrowserWindow : Object var r = new Regex ("\\.blogspot\\..*?/"); blog = r.replace(blog, blog.length, 0, ".blogspot.com/ncr/"); } - - var filename=""; if(webkitpdf.opt_cookies != null) { print("setting cookie %s\n",webkitpdf.opt_cookies); @@ -74,7 +72,8 @@ public class BrowserWindow : Object } try { FileIOStream iostream; - File file = File.new_tmp ("cookie-XXXXXX.txt", out iostream); + File file = File.new_tmp ("cookie-XXXXXX.txt", out iostream); + this.cookie_file = file.get_path (); print("cookie tmp file name: %s\n", file.get_path ()); OutputStream ostream = iostream.output_stream; @@ -109,19 +108,13 @@ public class BrowserWindow : Object if (cd < 1) { print("calling printit - timed out"); _this.view.printit(); + print("deleting tmp file %s\n",file.get_path ()); return false; } return true; }); - try { - print("deleting cookie tmp file name: %s\n", file.get_path ()); - - } catch (Error e) { - stdout.printf ("Error: %s\n", e.message); - } - }); }