diff --git a/pd/nw/dialog_canvas.html b/pd/nw/dialog_canvas.html index be780483a303fa8ac81d8c9cfc8b1f884dbca782..e5c2a3afb3c6ac54866811fce91c8d4ec500f132 100644 --- a/pd/nw/dialog_canvas.html +++ b/pd/nw/dialog_canvas.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <html> <head> + <meta charset="UTF-8"> <link id="page_style" rel="stylesheet" type="text/css" href="css/default.css"> <title>Pd Preferences</title> </head> @@ -277,14 +278,14 @@ <script> "use strict"; -var gui = require("nw.gui"); +var gui = require("nw.gui"); var pdgui = require("./pdgui.js"); // For translations var l = pdgui.get_local_string; // gui preset -pdgui.skin.apply(this); +pdgui.skin.apply(window); var pd_object_callback; @@ -422,9 +423,9 @@ function array_choose(array_index) { } var arrays_select = document.getElementById("arrays_select"); -arrays_select.addEventListener("change", function() { - pdgui.post("changed the thing is " + this.value); - array_choose(this.value); +arrays_select.addEventListener("change", function(evt) { + pdgui.post("changing to array index " + evt.target.value); + array_choose(evt.target.value); }); var gop_label = document.getElementById("gop_label"); @@ -487,9 +488,10 @@ function substitute_space(arg) { } function strip_problem_chars(arg) { - var problem_chars = [";", ",", "{", "}", "\\"]; - var ret = arg; - for(var i = 0; i < problem_chars.length; i++) { + var problem_chars = [";", ",", "{", "}", "\\"], + ret = arg, + i; + for (i = 0; i < problem_chars.length; i++) { ret = ret.split(";").join(""); } return ret; @@ -598,10 +600,10 @@ function populate_array_form(objects) { opt.textContent = "Array #" + (i+1); arrays_select.appendChild(opt); } - // We're permanently hiding the checkbutton for creating a new array + // We're permanently hiding the checkbutton for creating a new array // inside an existing graph. It's just a weird interface with very - // few benefits. However, patches that already have multiple arrays - // inside a graph will continue to work. (And if users really want + // few benefits. However, patches that already have multiple arrays + // inside a graph will continue to work. (And if users really want // this feature back it's easy to turn it back on. if (!new_array_dialog || 1) { // to re-enable, remove the "|| 1" document.getElementsByClassName("array_in_existing_graph")[0] @@ -616,7 +618,7 @@ function populate_array_form(objects) { } // Set up arrays in an object - + function init_arrays(attr_objects) { if (attr_objects.length) { // populate form with first array @@ -648,7 +650,7 @@ function register_window_id(gfxstub, attr_objects) { // If this is a new array dialog we might not have any canvas // properties to set. If so, just show the array form elements if (attr_objects[0].hasOwnProperty("array_gfxstub")) { - pd_garray_attrs = attr_objects; + pd_garray_attrs = attr_objects; new_array_dialog = true; // this is a new array dialog canvas_fieldsets = document.getElementsByClassName("canvas"); for (i = 0; i < canvas_fieldsets.length; i++) { @@ -709,7 +711,7 @@ function populate_form(attr_object) { // Set the gop-related parts of the form to be // enabled/disabled based on state set_gop(!!flag); - } + } var elem = document.getElementsByName(prop); if (elem.length > 0) { if(prop.slice(-5) === "color") { diff --git a/pd/nw/dialog_font.html b/pd/nw/dialog_font.html index 0a6b04765eb0e6d0887ead10213c129ddc7ef6c7..b334af23910f9c0bc4df0561bdf7b0c1646785f7 100644 --- a/pd/nw/dialog_font.html +++ b/pd/nw/dialog_font.html @@ -94,7 +94,7 @@ var pdgui = require("./pdgui.js"); // For translations var l = pdgui.get_local_string; -pdgui.skin.apply(this); +pdgui.skin.apply(window); var pd_object_callback; var current_size; diff --git a/pd/nw/dialog_gatom.html b/pd/nw/dialog_gatom.html index 725c51b0eaa0ba4c6a9140a4d884d5167d1cba2a..26828f55a0ddbd624898d47024757134b29748f6 100644 --- a/pd/nw/dialog_gatom.html +++ b/pd/nw/dialog_gatom.html @@ -152,7 +152,7 @@ var pdgui = require("./pdgui.js"); // For translations var l = pdgui.get_local_string; -pdgui.skin.apply(this); +pdgui.skin.apply(window); var pd_object_callback, old_attrs = {}, // original state. Used if we cancel the dialog diff --git a/pd/nw/dialog_iemgui.html b/pd/nw/dialog_iemgui.html index f71d177fd50afc3831d11750076c5a09a167adc2..0e66710a7df96c6f9d3b9d183003c51bde5d46ab 100644 --- a/pd/nw/dialog_iemgui.html +++ b/pd/nw/dialog_iemgui.html @@ -334,7 +334,7 @@ var pdgui = require("./pdgui.js"); var l = pdgui.get_local_string; // gui preset -pdgui.skin.apply(this); +pdgui.skin.apply(window); var pd_object_callback, old_attrs = {}, // original state. Used if we cancel the dialog diff --git a/pd/nw/dialog_prefs.html b/pd/nw/dialog_prefs.html index df5bf774a95b97f5fab868916d2c99216a2a7d4a..618113fdd83dfb18f646f118fcb91f9ded31e604 100644 --- a/pd/nw/dialog_prefs.html +++ b/pd/nw/dialog_prefs.html @@ -259,7 +259,7 @@ var pdgui = require("./pdgui.js"); var l = pdgui.get_local_string; // Gui presets -pdgui.skin.apply(this); +pdgui.skin.apply(window); var pd_object_callback; diff --git a/pd/nw/dialog_search.html b/pd/nw/dialog_search.html index 281ab93832c49fcb7fbe3ef7a225e98a02e9a630..c2edd3f41a41ef8e088cce4ea24c20a1f3cef792 100644 --- a/pd/nw/dialog_search.html +++ b/pd/nw/dialog_search.html @@ -15,6 +15,9 @@ var dive = require("./dive.js"); // small module to recursively search dirs var l = pdgui.get_local_string; var index = elasticlunr(); + +pdgui.skin.apply(window); + index.addField("title"); index.addField("keywords"); index.addField("description"); @@ -333,6 +336,9 @@ function doc_search() { </script> </head> <body> + <div style="font-family: Courier 10 Pitch; font-size: 2.5em;"> + <span style="color: #c44654;">P</span><span style="color: #ac399c;">u</span><span style="color: #54439c;">r</span><span style="color: #ce4d3d;">e</span><span style="color: #3c9e54;">d</span><span style="color: #7349a4;">a</span><span style="color: purple;">t</span><span style="color: #7349a4;">a</span> + </div> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 450 65" diff --git a/pd/nw/index.js b/pd/nw/index.js index 1701a223ca8048489f57909b1dc279b1f8fc8668..02655fa40abafad577357608f4079acc3442aaf0 100644 --- a/pd/nw/index.js +++ b/pd/nw/index.js @@ -9,7 +9,7 @@ var pd_menus = require("./pd_menus.js"); var pwd = process.env.PWD !== undefined ? process.env.PWD : process.env.HOME; // gui preset -pdgui.skin.apply(this); +pdgui.skin.apply(window); // For translations var l = pdgui.get_local_string; diff --git a/pd/nw/pd_canvas.js b/pd/nw/pd_canvas.js index d997f7f40111a3c70f7979c32bee650a7d44b275..e51bd219c9324eb7a3be05989076e1913c06671d 100644 --- a/pd/nw/pd_canvas.js +++ b/pd/nw/pd_canvas.js @@ -5,7 +5,7 @@ var pdgui = require("./pdgui.js"); var pd_menus = require("./pd_menus.js"); // Apply gui preset to this canvas -pdgui.skin.apply(this); +pdgui.skin.apply(window); //var name = pdgui.last_loaded();