Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aayush
purr-data
Commits
d08c480f
Commit
d08c480f
authored
Nov 08, 2017
by
Jonathan Wilkes
Browse files
Merge branch 'startup-fixes'
parents
7476eae5
d200a723
Changes
4
Hide whitespace changes
Inline
Side-by-side
pd/nw/index.html
View file @
d08c480f
...
...
@@ -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;"
>
...
...
pd/nw/index.js
View file @
d08c480f
...
...
@@ -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.
...
...
pd/nw/locales/en/translation.json
View file @
d08c480f
{
"hello"
:
"world"
,
"iem"
:
{
"prop"
:
{
"heading"
:
{
...
...
pd/nw/pdgui.js
View file @
d08c480f
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment