From: Alan Knowles Date: Mon, 7 Nov 2016 04:25:57 +0000 (+0800) Subject: BrowserWindow.bjs X-Git-Url: http://git.roojs.org/?p=app.webkitpdf;a=commitdiff_plain;h=c948c28e56adbb5f6a97e52832b34aa9680e4fa5 BrowserWindow.bjs BrowserWindow.vala --- diff --git a/BrowserWindow.bjs b/BrowserWindow.bjs index fce6cf4..5d75e7b 100644 --- a/BrowserWindow.bjs +++ b/BrowserWindow.bjs @@ -10,7 +10,7 @@ { "listeners" : { "destroy" : "() => {\n Gtk.main_quit();\n}", - "show" : "() => {\n\t\n\tprint(\"resizing window\\n\");\n\tvar w = webkitpdf.opt_width > 0 ? webkitpdf.opt_width : 1200;\n\tvar h = webkitpdf.opt_height > 0 ? webkitpdf.opt_height : 500;\n\t\t\t\n\t\n\tthis.el.resize(w,h);\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\tprint(\"Calling printit - timeout 25 seconds\");\n\t\t\t_this.view.printit();\n\t\t\treturn true;\n\t});\n\t\n\n}" + "show" : "() => {\n\t\n\tprint(\"resizing window\\n\");\n\tvar w = webkitpdf.opt_width > 0 ? webkitpdf.opt_width : 1200;\n\tvar h = webkitpdf.opt_height > 0 ? webkitpdf.opt_height : 500;\n\t\t\t\n\t\n\tthis.el.resize(w,h);\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\tstdout.print(\"Calling printit - timeout 25 seconds\");\n\t\t\t_this.view.printit();\n\t\t\treturn true;\n\t});\n\t\n\n}" }, "xtype" : "Window", "$ xns" : "Gtk", diff --git a/BrowserWindow.vala b/BrowserWindow.vala index b1b6017..f182747 100644 --- a/BrowserWindow.vala +++ b/BrowserWindow.vala @@ -48,7 +48,7 @@ public class BrowserWindow : Object // if we have not finished in 25 seconds // call printit... GLib.Timeout.add_seconds(25, () => { - print("Calling printit - timeout 25 seconds"); + stdout.print("Calling printit - timeout 25 seconds"); _this.view.printit(); return true; });