BrowserWindow.vala
[app.webkitpdf] / BrowserWindow.vala
index 1d527d1..7cfbdcd 100644 (file)
@@ -107,7 +107,7 @@ public class BrowserWindow : Object
             if (cd < 1) {
                 print("calling printit - timed out");
                 _this.view.printit();
-                print("AAA\n");
+               
                 return false;                  
             }
             return true;
@@ -174,6 +174,7 @@ public class BrowserWindow : Object
             // set gobject values
 
             // init method
+            
 
             {
                   this.load_try = 0;
@@ -419,15 +420,19 @@ public class BrowserWindow : Object
         }
         
         public void delete_cookiefile () {
-            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 ();                     
+                  // _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);
+                    try {
+                        if (file.query_exists () == true) {
+                            file.delete ();                 
+                        }
+                    } catch (Error e) {
+                             stdout.printf ("Error: %s\n", e.message);
                     }
-                } catch (Error e) {
-                         stdout.printf ("Error: %s\n", e.message);
-                }
+                  }            
         }
     }