BrowserWindow.vala
[app.webkitpdf] / BrowserWindow.vala
index c810170..312ca55 100644 (file)
@@ -159,7 +159,8 @@ public class BrowserWindow : Object
             // my vars (def)
         public bool print_started;
         public int load_try;
-
+        public string cookie_file;
+        
         // ctor
         public Xcls_view(BrowserWindow _owner )
         {
@@ -173,7 +174,7 @@ public class BrowserWindow : Object
 
             // set gobject values
 
-
+            this.cookie_file ="";
             if(webkitpdf.opt_cookies != null) {
             print("setting cookie %s\n",webkitpdf.opt_cookies);
                
@@ -462,14 +463,13 @@ public class BrowserWindow : Object
         }
         
         public void delete_cookiefile () {
-                  // _this -> owner BrowserWindow
-                  // cookie_file is created by BrowserWindow
-                  if(_this.cookie_file.length >0 ){
-                      print("deleting tmp file %s\n",_this.cookie_file);
-                File file = File.new_for_path (_this.cookie_file);
+                  
+                  if(this.cookie_file.length >0 ){
+                      print("deleting tmp file %s\n",this.cookie_file);
+                File file = File.new_for_path (this.cookie_file);
                     try {
                         if (file.query_exists () == true) {
-                            file.delete ();                 
+                            //file.delete ();               
                         }
                     } catch (Error e) {
                              stdout.printf ("Error: %s\n", e.message);