diff --git a/pd/nw/index.html b/pd/nw/index.html index 0a51f10d54003da1c586e0c8ee6ee29a5bbb93ee..32da532bc10216281b13124ef8e17e571715f6b8 100644 --- a/pd/nw/index.html +++ b/pd/nw/index.html @@ -26,9 +26,7 @@ <input style="display:none;" id="saveDialog" type="file" nwsaveas /> <div id = "console_bottom"> <div id = "printout"> - <pre id="p1" - style="white-space: pre-wrap;">Welcome to Pd GUI using Node-Webkit - <script>document.write(process.versions['node-webkit'])</script><br/></pre> + <pre id="p1" style="white-space: pre-wrap;"></pre> </div> </div> <div id="console_find" style="display:none;"> diff --git a/pd/nw/index.js b/pd/nw/index.js index b852054c0b56cd793d3af171933927df7cd76086..474fec9f98bbfa66b0e2372d59304be948d0916c 100644 --- a/pd/nw/index.js +++ b/pd/nw/index.js @@ -62,11 +62,6 @@ function set_vars(win) { // nw context callbacks (mostly just creating/destroying windows) pdgui.set_new_window_fn(nw_create_window); pdgui.set_close_window_fn(nw_close_window); - if (!font_engine_sanity) { - pdgui.post("warning: your system's font stack is maintained by troglodytes."); - } else { - pdgui.post("font stack check: using optimal font sizes."); - } } function app_quit() { @@ -743,12 +738,25 @@ function nw_create_pd_window_menus(gui, w) { }); } +function post_startup_messages() { + // These will be the first messages printed to the main Pd window. + // Later let's use a link to the docs for new users. + pdgui.post("Welcome to Purr Data"); + // Warn the user if the font sizes aren't optimal. Font sizes which + // aren't optimal result in extra space at the end of object/message + // boxes + if (!pdgui.get_font_engine_sanity()) { + pdgui.post("warning: your system's font stack is not optimal"); + } +} + function gui_init(win) { set_vars(win); add_events(); nw_create_pd_window_menus(gui, win); // Set up the Pd Window gui.Window.get().setMinimumSize(350, 250); + post_startup_messages(); // Now we create a connection from the GUI to Pd, in one of two ways: // 1) If the GUI was started by Pd, then we create a tcp client and // connect on the port Pd fed us in our command line arguments. diff --git a/pd/nw/locales/en/translation.json b/pd/nw/locales/en/translation.json index 979a0dad38da431bba2b1dc46cdc6770a717f36b..5490615cd9f2d169b50bb7e8a576b4bc6b76e214 100644 --- a/pd/nw/locales/en/translation.json +++ b/pd/nw/locales/en/translation.json @@ -1,5 +1,4 @@ { - "hello": "world", "iem": { "prop": { "heading": { diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index f1fcf288257c5205ceac666881976aba49a105c8..80f3c217d8b8361ab6cc21c1c64eb46bb2cc4e83 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -127,6 +127,9 @@ exports.set_font_engine_sanity = function(win) { font_engine_sanity = false; } canvas.parentNode.removeChild(canvas); +} + +exports.get_font_engine_sanity = function() { return font_engine_sanity; }