BrowserView.js
authorChris <chris@roojs.com>
Tue, 17 Sep 2013 06:07:25 +0000 (14:07 +0800)
committerChris <chris@roojs.com>
Tue, 17 Sep 2013 06:07:25 +0000 (14:07 +0800)
BrowserView.js

index 4f108ac..511c5ac 100644 (file)
@@ -134,11 +134,12 @@ BrowserView = new GType({
         {
             print("load finished");
             
-            var mf = _t.get_main_frame();
-            var p = new Gtk.PrintOperation({ export_filename : '/home/chris/test_pdf/test.pdf' });
+            GLib.timeout_add(GLib.PRIORITY_LOW, 500, function() {
+                var mf = _t.get_main_frame();
+                var p = new Gtk.PrintOperation({ export_filename : '/home/chris/test_pdf/test.pdf' });
 
-            print(mf.print_full(p, Gtk.PrintOperationAction.EXPORT));
-            
+                print(mf.print_full(p, Gtk.PrintOperationAction.EXPORT));
+            });
             
             return;
             tab.get_toolbar().set_progress(0);