BrowserWindow.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 6 May 2016 04:38:17 +0000 (12:38 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 6 May 2016 04:38:17 +0000 (12:38 +0800)
BrowserWindow.vala

BrowserWindow.bjs
BrowserWindow.vala

index d0a1971..16d413b 100644 (file)
@@ -10,7 +10,7 @@
   {
    "listeners" : {
     "destroy" : "() => {\n    Gtk.main_quit();\n}",
-    "show" : "() => {\n\t\n\tprint(\"resizing window\\n\");\n\tthis.el.resize(1200,500);\n\tprint(\"loading url\\n\");\n\tthis.view.el.load_uri(webkitpdf.opt_url);\n\n}"
+    "show" : "() => {\n\t\n\tprint(\"resizing window\\n\");\n\tthis.el.resize(1200,500);\n\tprint(\"loading url\\n\");\n\tthis.view.el.load_uri(webkitpdf.opt_url);\n\t\n\t// if we have not finished in 25 seconds\n\t// call printit...\n\t  GLib.Timeout.add_seconds(25, () => { \n\t\t\t_this.view.printit();\n\t\t\t});\n\t\n\n}"
    },
    "xtype" : "Window",
    "$ xns" : "Gtk",
index 9511d15..b8004ec 100644 (file)
@@ -40,6 +40,13 @@ public class BrowserWindow : Object
                this.el.resize(1200,500);
                print("loading url\n");
                this.view.el.load_uri(webkitpdf.opt_url);
+               
+               // if we have not finished in 25 seconds
+               // call printit...
+                 GLib.Timeout.add_seconds(25, () => { 
+                               _this.view.printit();
+                               });
+               
         
         });
     }